-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Treat */Auto spans as resolvable finite measures rather than infinite #14648
Conversation
970feeb
to
e1eeffb
Compare
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
Thank you for your pull request. We are auto-formatting your source code to follow our code guidelines. |
/backport to net7.0 |
Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/4745395453 |
/backport to release/7.0.2xx-sr5 |
Started backporting to release/7.0.2xx-sr5: https://github.com/dotnet/maui/actions/runs/4745400816 |
@Redth backporting to release/7.0.2xx-sr5 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: Treat */Auto spans as finite measurable values rather than infinite Fixes #14537
.git/rebase-apply/patch:171: trailing whitespace.
public void AutoStarColumnSpanMeasureIsSumOfAutoAndStar(double determinantViewWidth, double widthConstraint)
warning: 1 line adds whitespace errors.
Using index info to reconstruct a base tree...
M src/Core/src/Layouts/GridLayoutManager.cs
M src/Core/tests/UnitTests/Layouts/GridLayoutManagerTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Core/tests/UnitTests/Layouts/GridLayoutManagerTests.cs
CONFLICT (content): Merge conflict in src/Core/tests/UnitTests/Layouts/GridLayoutManagerTests.cs
Auto-merging src/Core/src/Layouts/GridLayoutManager.cs
CONFLICT (content): Merge conflict in src/Core/src/Layouts/GridLayoutManager.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 Treat */Auto spans as finite measurable values rather than infinite Fixes #14537
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
@Redth an error occurred while backporting to release/7.0.2xx-sr5, please check the run log for details! Error: git am failed, most likely due to a merge conflict. |
@Redth when can we expect another "service release" with this fix? |
@nor0x A new service release was created a few hours ago: https://github.com/dotnet/maui/releases/tag/7.0.86 |
That service release does not have this fix in it. |
As a workaround (if you don't want to wait for the service release), you can grab the updated Grid code from main and drop it into your app using a custom layout manager: https://github.com/hartez/CustomLayoutExamples#custom-layoutmanagers-for-existing-layouts |
@hartez |
it is mentioned in the bug fixes 🤔 |
The release notes clearly include a reference to the a backport of this pull request here. Is "the process" not working again (#14520) ? |
I was wrong about this, I apologize. I must have been looking at the wrong branch, the commit is clearly there. |
Description of Change
When revising the Grid to handle more
*
column/row cases as resolvable from the outset (rather than having to measure them multiple times), combination values ofAuto
/*
were treated as requiring unconstrained measures (because of theAuto
component). This causes a couple of problems - for one, it means that Labels spanningAuto
/*
column combinations are always measured as if they will be allowed infinite width; this means they will never wrap. For another, we see problems like #14537 where the native Windows layout system only sees unconstrained width measures and assumes that the native control's DesiredSize is correct even when the container's width expands. This results in a situation where expanding the container does not expand the content, even though we request that it lay out at a larger width.These changes make the cross-platform Grid treat constrained
Auto
/*
combinations as resolvable (the size theAuto
value + the size of the*
value, if any) to a finite size and measure accordingly, rather then treating those values as unconstrained. With tests to that effect.Issues Fixed
Fixes #14537