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

Disable interface coalescing #862

Merged

Conversation

wsdwsd0829
Copy link
Contributor

@wsdwsd0829 wsdwsd0829 commented Mar 28, 2018

[Fix #853] This trying to disable coalescing feature to avoid coalescing.
It the DisplayNode change is to match behavior exactly before coalescing. Hopefully we can avoid reverting for ease of future work.

Sorry about the troubles it causes. I will try to fix the reported issues in #788 and give it another check.
One potential bug fixed by #847 is one example we found recently (there maybe other issues). It's ok to submit that also since accessing pendingInterfaceState is same as self.interfaceState when the feature is disabled.

if (!isStillInHierarchy && isVisible) {
if (![self supportsRangeManagedInterfaceState]) {
newState = ASInterfaceStateNone;
if (![self supportsRangeManagedInterfaceState]) {
Copy link
Member

Choose a reason for hiding this comment

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

This change is equivalent to the change in the revert, when looking at specifically the disabled codepath flow - by doing this, we ensure that there are no changes to the codepath when in the disabled state.

https://github.com/TextureGroup/Texture/pull/861/files#diff-fb6dadff65468c53595c164828199c83

The root of the issue is that we made some changes to sanitize the handling of non-range managed nodes (e.g. top level nodes / outside of cells) so they behaved more like inside cells. We now have Texture tests running on our internal build system and so we would have caught this at the time, but alas we didn’t notice this broke the tests in the disabled case.

Definitely an oversight on our part, which I think won’t happen again considering the build system and ASConfiguration systems in place. Fortunately I think we are on the path to fixing some long-standing issues where visible state will thrash during UINavigationController transitions, which will be a big help for logging accuracy.

newState = ASInterfaceStateNone;
}
self.interfaceState = newState;
if (!ASCATransactionQueue.sharedQueue.enabled) {
Copy link
Contributor Author

@wsdwsd0829 wsdwsd0829 Mar 28, 2018

Choose a reason for hiding this comment

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

This is to add back reverted code before interface coalescing.
An put current code in "else" for ease of reading & future debugging.

};
}
} else {
// TODO(wsdwsd0829): rework on this piece code that alter interface behavior of non-interfaceCoalescing.
Copy link
Member

Choose a reason for hiding this comment

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

// Rework this code to ensure that interface state behavior is not altered when ASCATransactionQueue is disabled.

@@ -58,6 +58,8 @@
#define TIME_SCOPED(outVar)
#endif

#define ENABLE_NEW_EXIT_HIERARCHY_BEHAVIOR 0
Copy link
Member

Choose a reason for hiding this comment

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

Would you be willing to add a comment describing this macro?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi, you mean I added in code or here?
The new NEW_EXIT_HIERARCHY_BEHAVIOR is trying to merge non-rangeManaged with rangeManaged, so both range-managed and standalone nodes wait before firing their exit-visibility handlers, as UIViewController transitions now do rehosting at both start & end of animation. (that was to try to mitigate interface updating state when coalescing disabled)

Copy link
Member

Choose a reason for hiding this comment

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

OK that makes sense. Could you add that on line 60 so that future developers will know the intention?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

Thanks @wsdwsd0829 for the minimal patch and the quick coding.

Before we compare this to the revert diff, could you describe the new macro and also rebase/merge master for a clean merge?

Copy link
Member

@Adlai-Holler Adlai-Holler left a comment

Choose a reason for hiding this comment

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

This is a very nice complete restoration of the previous behavior. Here's the comparison with the straight-revert, for reference (ignore changes to irrelevant files): AHRevertInterfaceStateQueue...wsdwsd0829:disable-interface-coalescing

So that you guys can continue to iterate easily on the range-managed-change, I'm cool with the new default-0 compile flag, and I think we should land this diff pending CI passing.

@Adlai-Holler Adlai-Holler merged commit df7d2a5 into TextureGroup:master Mar 29, 2018
@Adlai-Holler
Copy link
Member

Thanks for the fast fIx here @appleguy and @wsdwsd0829

@wsdwsd0829
Copy link
Contributor Author

wsdwsd0829 commented Mar 29, 2018 via email

bernieperez pushed a commit to AtomTickets/Texture that referenced this pull request Apr 25, 2018
* fix SIMULATE_WEB_RESPONSE not imported TextureGroup#449

* Fix to make rangeMode update in right time

* disable interface coalescing and fix tests

* Revert to before coalescing for ease of reading

* refactor, make min change

* refactor

* add comments

* Add change log
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.

Interface state tests fail when transaction queue is disabled
3 participants