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

MeasureInvalidated events are now fired too often #25264

Open
filipnavara opened this issue Oct 14, 2024 · 0 comments · May be fixed by #25664
Open

MeasureInvalidated events are now fired too often #25264

filipnavara opened this issue Oct 14, 2024 · 0 comments · May be fixed by #25664
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed t/bug Something isn't working

Comments

@filipnavara
Copy link
Member

Description

PR #23052 broke our unit tests where we ensure that we don't get too many layout cycles from changing the binding contexts. While the PR itself fixed a real problem it introduces another one. Visual elements that are constrained to certain size from the top of the hierarchy don't break the propagation of the MeasureInvalidated event from the children here:

if (child.IsVisible)
{
// We need to invalidate measures only if child is actually visible
MeasureInvalidated?.Invoke(this, new InvalidationEventArgs(InvalidationTrigger.MeasureChanged));
(Parent as VisualElement)?.OnChildMeasureInvalidatedInternal(this, InvalidationTrigger.MeasureChanged);
}

Steps to Reproduce

No response

Link to public reproduction project repository

No response

Version with bug

8.0.90 SR9

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

8.0.82 SR8.2

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

@filipnavara filipnavara added the t/bug Something isn't working label Oct 14, 2024
@PureWeen PureWeen added the potential-regression This issue described a possible regression on a currently supported version., verification pending label Oct 14, 2024
@PureWeen PureWeen added this to the .NET 9 SR1 milestone Oct 14, 2024
@PureWeen PureWeen added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Oct 14, 2024
@StephaneDelcroix StephaneDelcroix added the s/triaged Issue has been reviewed label Oct 16, 2024
@PureWeen PureWeen moved this from Todo to In Progress in MAUI SDK Ongoing Oct 30, 2024
@PureWeen PureWeen modified the milestones: .NET 9 SR1, .NET 9 Servicing Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter platform/android 🤖 platform/iOS 🍎 platform/macOS 🍏 macOS / Mac Catalyst platform/windows 🪟 potential-regression This issue described a possible regression on a currently supported version., verification pending s/triaged Issue has been reviewed t/bug Something isn't working
Projects
Status: In Progress
4 participants