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

Allow * rows/columns treated as Auto to expand during 2nd measure pass #16488

Merged
merged 1 commit into from Aug 3, 2023

Conversation

hartez
Copy link
Contributor

@hartez hartez commented Aug 1, 2023

Description of Change

A confluence of Auto columns/rows in one dimension and de facto Auto columns/rows in the other dimension (because of a container layout which gives that dimension an unconstrained measurement) is causing an erroneous size value for a Star row/column. This change allows the Star row/column value to be updated to account for the size of the largest child View.

Our unit tests were technically covering a slight variation of this situation, but an error in the test setup meant that the two tests covering the scenario were passing inaccurately. This PR updates the test methods to account for the problem (by disallowing the test Views' DesiredSize property to return the test value prior to calling Measure()). This PR also adds two additional tests specific to this scenario just in case.

Issues Fixed

Fixes #16368
Fixes #16334

@PureWeen PureWeen added the backport/suggested The PR author or issue review has suggested that the change should be backported. label Aug 2, 2023
@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

No commit pushedDate could be found for PR 16488 in repo dotnet/maui

@Eilon Eilon added the area/layout 🔲 StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Aug 2, 2023
@rmarinho
Copy link
Member

rmarinho commented Aug 2, 2023

/azp run MAUI-DeviceTests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -480,7 +480,7 @@ void SecondMeasurePass()
}
else if (cell.ColumnSpan == 1)
{
if (_columns[cell.Column].IsAuto)
if (TreatCellWidthAsAuto(cell))
Copy link
Member

Choose a reason for hiding this comment

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

Should we add a comment why the corner case?

@rmarinho rmarinho merged commit 74181e7 into main Aug 3, 2023
39 checks passed
@rmarinho rmarinho deleted the fix-16368 branch August 3, 2023 21:14
@PureWeen
Copy link
Member

PureWeen commented Aug 9, 2023

/backport to net7.0

@PureWeen PureWeen added the backport/approved After some discussion or review, this PR or change was approved to be backported. label Aug 9, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 9, 2023

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5811126482

@github-actions github-actions bot locked and limited conversation to collaborators Dec 7, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area/layout 🔲 StackLayout, GridLayout, ScrollView, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported.
Projects
None yet
6 participants