Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ASTextNode2] Integrate Google's changes to ASTN2 and accessibility #2017

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Aug 4, 2021

This PR takes the changes related to ASTextNode2 from #1986 and merges them into master.

The largest changes were:

  • Improved layout (with Yoga) for ASTN2
  • Improved truncating with ASTN2
  • Improved accessibility

My biggest concern is that there were many changes on master around accessibility that conflicted with what Google implemented. In Google's PR #1986, the changes on master were placed behind these experimental feature checks:

ASExperimentalDoNotCacheAccessibilityElements
ASExperimentalEnableNodeIsHiddenFromAcessibility
ASExperimentalEnableAcessibilityElementsReturnNil 

However, since the changes behind these flags are currently live on master, I think this is the behavior that should still be the default on master. I would say that we either add code to opt-in to these experiments in this PR or we switch the logic so that the changes from Google's PR are the "experimental" path.

This time I included the accessibility changes, which required adding some of the new accessibility features in other parts of the code. Note, there are cases where not all of the accessibility was brought over because that was supposed to be covered in a separate PR made by someone from Google.
@rcancro
Copy link
Contributor Author

rcancro commented Aug 4, 2021

@wiseoldduck Here is a second attempt that includes the accessibility changes. Maybe the first time around i left those out because I thought someone from Google was looking in making an accessibility PR?

rcancro and others added 11 commits August 6, 2021 09:23
This test passes on master but fails on the merge branch. Looking at the snapshot difference, it appears that google figured out a way to get more characters in before truncating. The text is still within its provided max size.
… collision (TextureGroup#2020)

As of iOS15 the AuthenticationServices framework has a class named `ASNavigationController`. We need to rename our `ASNavigationController` to protect against undefined behavior.

Note: This change was based on this PR TextureGroup#2014. We were slow in merging it and the author has not replied, so I'm making a new one to get this landed.
With the breaking change of renaming ASNavigationController to ASDKNavigationController, we have released a new version of Texture. Please see `ThreeMigrationGuide.md` for how to handle the breaking changes in 3.1.0.
- The framework isn't available on tvOS. This causes CocoaPods linting to fail which prevented me from pushing the new release out.
- One way to fix this is to have a different `default_subspecs` for tvOS that doesn't have AssetsLibrary subspec, but per-platform `default_subspecs` doesn't seem to be supported by CocoaPods. So I updated the subspec itself to only depend on the framework for iOS. This means the subspec is empty/useless for tvOS (and other platforms FWIW).
- Tested with `pod spec lint Texture.podspec`.
- Fixes TextureGroup#1992 and part of TextureGroup#1549. Also unblocks 3.1.0 release.
- For the long term, we can remove the subspec entirely when iOS 9 is deprecated (TextureGroup#1828).
It looks like github updated so that `macos-latest` is now macos-11. It can't find Xcode_11_5. Let's try to set the runs-on version explicitly and see if some magic happens.

also allow warnings for podlint because that started failing too
@rcancro rcancro changed the title [ASTextNode2] Second try to merge Google's ASTextNode2 changes [ASTextNode2] Integrate Google's changes to ASTN2 and accessibility Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants