-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Remove MeasureInvalidated
bubble-up mechanism / clean-up legacy layouts / fix iOS CV items resize
#25664
Open
albyrock87
wants to merge
3
commits into
dotnet:main
Choose a base branch
from
albyrock87:legacy-layout-cleanup
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
albyrock87
force-pushed
the
legacy-layout-cleanup
branch
3 times, most recently
from
November 4, 2024 14:27
a465e64
to
5bef429
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
albyrock87
force-pushed
the
legacy-layout-cleanup
branch
3 times, most recently
from
November 5, 2024 12:23
917a208
to
15d5364
Compare
albyrock87
changed the title
Remove
Remove Nov 5, 2024
MeasureInvalidated
bubble-up mechanism and clean-up legacy layouts.MeasureInvalidated
bubble-up mechanism / clean-up legacy layouts / fix iOS CV items resize
albyrock87
commented
Nov 5, 2024
} | ||
if (trigger == InvalidationTrigger.HorizontalOptionsChanged || trigger == InvalidationTrigger.VerticalOptionsChanged) | ||
{ | ||
ComputeConstraintForView(view); |
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.
This has been moved to VisualElement.InvalidateMeasureInternal()
albyrock87
force-pushed
the
legacy-layout-cleanup
branch
from
November 5, 2024 13:18
15d5364
to
46b0c6a
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of Change
This PR includes #25465 and improves it more in order to have iOS CV1 and CV2 handlers rely on native invalidation mechanism rather than subscribing to
MeasureInvalidated
.I'd prefer to simply merge this one and just close #25465.
What's included
MeasureInvalidated
bubble-up mechanism (basically "revert"s MakeMeasureInvalidated
event work correctly #23052 and goes back to 8.0.82) behaviorSetNeedsLayout
mechanism which now relies on a more-measurable while-loopUIScrollView
sIMauiPlatformView
interface on iOS with two methodsInvalidateAncestorsMeasuresWhenMovedToWindow()
to schedule propagating invalidation when view is attached toWindow
InvalidateMeasure(bool isPropagating)
to normally simply callSetNeedsLayout
on the viewUsing a initial version of the #25671 UI test I've been able to measure the benefits of this PR over
main
branch using CV1, and it is impressive:main
: Measure passes: 877, Arrange passes: 541PR
: Measure passes: 409, Arrange passes: 395CV2 was not handling measure changes so we don't have data to compare with
main
.On the other side we can compare CV1 and CV2 with the new fix and the latest version of #25671
As we can see, CV2 is doing better with measure passes which is very likely the most expensive operation, so we should be good.
Issues Fixed
Fixes #25650
Fixes #24996
Fixes #25391
Fixes #25264
Videos of AllTheLists
Captured using a modified version of https://github.com/davidortinau/AllTheLists.git compiled in
Release
mode with a constant number of lessons generated (high number).challenging.patch
Using CV1
It has some usual hiccups but nothing weird.
PR-25664-CV1-AllTheLists.mp4
Using CV2
Resizing of item works, but it has some hiccups.
Notice how the scrollbar acts weird in comparison to CV1.
PR-25664-CV2-AllTheLists.mp4