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

Fix layout when MinimumWidth/HeightRequest is removed on Windows #24639

Merged
merged 3 commits into from
Sep 8, 2024

Conversation

spadapet
Copy link
Contributor

@spadapet spadapet commented Sep 6, 2024

Description of Change

ViewExtensions.UpdateMinimumHeight|Width for WinUI is supposed to update FrameworkElement.MinHeight|Width based on the MAUI property MinimumHeightRequest/MinimumWidthRequest. But it would completely skip the update when the value was removed, so the previously set value would stay in effect. That locks in the old FrameworkElement.MinHeight|Width, and layout doesn't change.

The fix is to remove FrameworkElement.MinHeight|Width when MinimumHeightRequest/MinimumWidthRequest is removed.

Issues Fixed

Fixes #24638

@spadapet spadapet self-assigned this Sep 6, 2024
@spadapet spadapet requested a review from a team as a code owner September 6, 2024 22:59
Copy link
Member

@PureWeen PureWeen left a comment

Choose a reason for hiding this comment

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

@spadapet
Copy link
Contributor Author

spadapet commented Sep 7, 2024

test is faiing

https://dev.azure.com/xamarin/public/_build/results?buildId=123366&view=ms.vss-test-web.build-test-results-tab&runId=3123614&resultId=100011&paneView=debug

Ack, the test passed locally on Windows and Android. Maybe I need to request a smaller min width/height since the height ended up being 486 instead of 500.

@PureWeen

@spadapet spadapet enabled auto-merge (squash) September 8, 2024 18:00
@spadapet spadapet merged commit cf00253 into main Sep 8, 2024
97 checks passed
@spadapet spadapet deleted the dev/peterspa/ClearMinimumSizeRequest branch September 8, 2024 18:45
@samhouts samhouts added the fixed-in-net9.0-nightly This may be available in a nightly release! label Oct 1, 2024
@samhouts samhouts added fixed-in-9.0.0-rc.2.24503.2 and removed fixed-in-net9.0-nightly This may be available in a nightly release! labels Oct 14, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Nov 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When MinimumWidthRequest or MinimumHeightRequest are cleared on Windows, the old values stay in effect
3 participants