-
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
Change iOS SetNeedsLayout propagation mechanism #26629
base: main
Are you sure you want to change the base?
Change iOS SetNeedsLayout propagation mechanism #26629
Conversation
Hey there @albyrock87! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
@@ -147,7 +147,10 @@ await CreateHandlerAndAddToWindow<CarouselViewHandler>(carouselView, async (hand | |||
Assert.False(data.IsCollectionChangedEventEmpty); | |||
}); | |||
|
|||
carouselView.Handler?.DisconnectHandler(); | |||
await InvokeOnMainThreadAsync(() => |
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.
I wonder if this change could be a separate PR. I suppose that DisconnectHandler should always run on the main thread (or not?).
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 is just a device test which randomly fails due to the fact it may run on a background thread. I came across it and it was a quick fix to do.
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.
So that's a great PR-stuff actually.
(In fact, if there is a way to detect it, it might probably fix a class of bugs.)
2ad0ab2
to
5b5e4b9
Compare
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Description of Change
I've been asked to split #25664 into separate PR.
This is the first piece which aims to change the way we propagate
SetNeedsLayout
by doing that only when MAUI commands.As seen in the linked issue, there are situations where iOS triggers
SetNeedsLayout
natively and we don't want to propagate those.This enables us to receive a
SetNeedsLayout
inTemplatedCell
which will allow us to resize the cell without relaying onMeasureInvalidated
cross platform event propagation.There will be a follow-up PR to tackle this.
Issues Fixed
Fixes #24996