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 grid not getting invalidated when changing the Height/Width of Row/ColumnDefinitions declared with the short syntax #26046

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

OvrBtn
Copy link

@OvrBtn OvrBtn commented Nov 22, 2024

Description of Change

Issues Fixed

Fixes #25983

After change

2024-11-22.05-21-30.mp4

@OvrBtn OvrBtn requested a review from a team as a code owner November 22, 2024 04:29
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 22, 2024
@OvrBtn
Copy link
Author

OvrBtn commented Nov 22, 2024

Ooops last time I checked no one was assigned to the issue... sorry @sheiksyedm

@jsuarezruiz jsuarezruiz added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Nov 22, 2024
Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

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

Could include an UITest?

@OvrBtn
Copy link
Author

OvrBtn commented Nov 23, 2024

@jsuarezruiz is this alright? If yes I'd need screenshots from CI

@mattleibow
Copy link
Member

Might not need a uitest, could be a unit test. I wonder if some of the existing test check for the update and can be copied for this scenario.

@OvrBtn
Copy link
Author

OvrBtn commented Nov 24, 2024

@mattleibow I guess I could do something similar to this but additionaly change row/column size with grid.RowDefinitions[0].Height

public void TwoAbsoluteColumnsOneAbsoluteRow()
{
var grid = CreateGridLayout(columns: "100, 100", rows: "10");
var viewSize = new Size(10, 10);
var view0 = CreateTestView(viewSize);
var view1 = CreateTestView(viewSize);
SubstituteChildren(grid, view0, view1);
SetLocation(grid, view0);
SetLocation(grid, view1, col: 1);
// Assuming no constraints on space
MeasureAndArrangeAuto(grid);
// Column width is 100, viewSize is less than that, so it should be able to layout out at full size
AssertArranged(view0, 0, 0, 100, 10);
// Since the first column is 100 wide, we expect the view in the second column to start at x = 100
AssertArranged(view1, 100, 0, 100, 10);
}

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 community ✨ Community Contribution
Projects
None yet
3 participants