-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Skip invalidation on propagation #25652
Conversation
56246f4
to
0afbdca
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure I understand. there's a special case when depth <=1 and we only ++depth (and never decrement)
The depth is just there so each call knows how far down the tree the element that triggered the invalidation is and then it can make decisions about it Each depth is a throwaway value that just starts over when a new invalidation path is called. The motivation here is that if an element is 4 levels down from a scrollview we don't want that bubbling up to a forced invalidation of the platform element. It's just meant to be informative and then scroll view can decide if it wants to invalidate or not. Thats basically how it's worked in Maui up until 8.0.90 and then that regressed slightly and this pr fixes that regression |
|
* Skip Invalidation unless you're my immediate child * - fix override on test * Fix Legacy Layouts Invalidation Propagation * - use invalidation args to propagate depth # Conflicts: # src/Controls/src/Core/Page/Page.cs # src/Controls/src/Core/VisualElement/VisualElement.cs
* Skip invalidation on propagation (#25652) * Skip Invalidation unless you're my immediate child * - fix override on test * Fix Legacy Layouts Invalidation Propagation * - use invalidation args to propagate depth # Conflicts: # src/Controls/src/Core/Page/Page.cs # src/Controls/src/Core/VisualElement/VisualElement.cs * - fix up UseLegacyMeasureInvalidatedBehaviorEnabled * - fix missing NS * - add test * - add screen shots * - snapshots * - final snapshots
Description
The main purpose of #23052 was to propagate the MeasureInvalidated event up the tree. The problem with doing this is that the
Page
and theCompatibility.Layout
will fireInvalidateMeasure
when that propagation gets to them.This PR shift the needle back a little bit and only fires those paths if the invalidation is fired from a direct child. We still want the event to propagate up the tree for listeners to act on but we don't want anything beyond the immediate parent to invalidate