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] Integrating Google’s changes #2005

Closed
wants to merge 1 commit into from

Conversation

rcancro
Copy link
Contributor

@rcancro rcancro commented Jun 10, 2021

I isolated the changes from ASTextNode2 from the large google diff. I got things building, but some snapshot tests are failing for ASTextNode2. The tests that are failing are:

-[ASTextNode2SnapshotTests testTextContainerInsetHighlight_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTintColor_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTruncationModes_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTruncationModes_ASTextNode2]
-[ASTextNode2SnapshotTests testThatDefaultTruncationTokenAttributesAreInheritedFromTextWhenTruncated_ASTextNode2]
-[ASTextNode2SnapshotTests testTintColorHierarchyChange]

I also noticed that several tests were removed from ASTextNode2Tests.mm.

Some notes on my merge:

  • I reverted the ASDN namespace back to AS until we can change everything at once
  • I called DISABLED_ASAssertLocked instead of ASAssertLocked. Again thinking if this changed, we could do them all in one diff
  • Brought back AS_TN2_CLASSNAME since the text experiment still exists and ASTextNode is the default text node on master

I’d like to discuss the snapshot failures and if they are expected/how to fix them. I’m also curious why some other tests were removed.

I isolated the changes from ASTextNode2 from the large google diff. I got things building, but some snapshot tests are failing for ASTextNode2. The tests that are failing:

```
-[ASTextNode2SnapshotTests testTextContainerInsetHighlight_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTintColor_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTruncationModes_ASTextNode2]
-[ASTextNode2SnapshotTests testTextTruncationModes_ASTextNode2]
-[ASTextNode2SnapshotTests testThatDefaultTruncationTokenAttributesAreInheritedFromTextWhenTruncated_ASTextNode2]
-[ASTextNode2SnapshotTests testTintColorHierarchyChange]
```

I also noticed that several tests were removed from ASTextNode2Tests.mm.

Some notes on my merge:
* I revert the `ASDN` namespace back to `AS` until we can change everything at once
* I called `DISABLED_ASAssertLocked` unstead of `ASAssertLocked`. Again thinking if this changed, we could do them all in one diff
* Brought back `AS_TN2_CLASSNAME` since the text experiement `ASTextNode` is still the default on master

I’d like to discuss the snapshot failures and if they are expected/how to fix them. I’m also curious why some other tests were removed.
@rcancro rcancro requested a review from wiseoldduck June 10, 2021 21:10
@rcancro
Copy link
Contributor Author

rcancro commented Jun 28, 2021

I ran these tests locally via ./build.sh tests and they passed :/

Test session results, code coverage, and logs:
	/Users/ricky/Library/Developer/Xcode/DerivedData/AsyncDisplayKit-bgqjxckpwiirkzdryzyzpioxrjgf/Logs/Test/Test-AsyncDisplayKit-2021.06.28_15-26-04--0700.xcresult

** TEST SUCCEEDED **

@wiseoldduck
Copy link
Member

wiseoldduck commented Jun 30, 2021

Do you guys think you want the accessibility changes from Google? We're not sure if they are excluded because you don't need/want them (in which case we should just delete them) or if you just thought they belonged in a different PR

@@ -131,8 +137,6 @@ @implementation ASTextCacheValue
return layout;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like our version of the comment on line 120

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I see a different comment

static NSCache<NSAttributedString *, ASTextCacheValue *> *textLayoutCache;
static dispatch_once_t onceToken;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't observed the issue described here #136 but it's not clear how it would come up or how this change corrects it. Can you clarify?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is overall missing several of the google changes, like for text attachments and highlighting. Is this a subset of the Unified PR we put up, or does it include additional changes? Do you think it would be easiest as far as integrating the Google work to essentially break that PR into smaller topical pieces, perhaps with modifications?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We haven't observed the issue described here #136 but it's not clear how it would come up or how this change corrects it. Can you clarify?

I'm actually confused as to where this comment came from. I don't see it in master's ASTN2

@rcancro rcancro closed this Dec 2, 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