question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[regression/8.0.0-preview.5.8529] Incorrect layout when using a Grid with Star and Auto Columns with a child with HeightRequest placed in the Auto column

See original GitHub issue

Description

Duplicate of: #14494 A Grid that has two elements inside is not getting laid our properly. The two elements are: an Entry in a Star column, and a Button in an Auto column. The Button has a HeightRequest smaller than the intrinsic size of the Entry. The end result is that the Entry is getting clipped at the bottom.

<VerticalStackLayout>
    <Grid ColumnDefinitions="*, Auto">
        <Entry Text="qwerty" />
        <Button Grid.Column="1" HeightRequest="26" />
    </Grid>
</VerticalStackLayout>

The order of the ColumnDefinitions is not of great importance because the issue is reproduced even if the first column is Auto:

<VerticalStackLayout>
    <Grid ColumnDefinitions="Auto, *">
        <Button HeightRequest="26" />
        <Entry Grid.Column="1" Text="qwerty" />
    </Grid>
</VerticalStackLayout>

The issue is reproduced both with 7.0.92 and 8.0.0-preview.6.8686.

Steps to Reproduce

  1. Go to the repo from the link
  2. Make sure you have navigated to the folder Maui\GridStarAutoIncorrectLayout
  3. Run the project

Link to public reproduction project repository

https://github.com/telerik/ms-samples/tree/main/Maui/GridStarAutoIncorrectLayout

Version with bug

8.0.0-preview.5.8529

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows, macOS

Affected platform versions

current versions

Did you find any workaround?

I was not able to find any workarounds.

Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 months ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
hartezcommented, Aug 1, 2023

Ah, it is a Grid issue, but the way iOS and Android handle Entry means that it doesn’t manifest on those platforms.

0reactions
hartezcommented, Aug 7, 2023

Ah, it is a Grid issue, but the way iOS and Android handle Entry means that it doesn’t manifest on those platforms.

Hey @hartez , I’m just wondering if this issue - whatever it’s root cause is - might also be the root cause of CommunityToolkit/Maui#1136? That is also an issue on Windows only with GridLength.Auto, so seems like it might be related?

It’s certainly possible, but I can’t say for certain without digging into it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

grid-auto-columns - CSS: Cascading Style Sheets | MDN
The grid-auto-columns CSS property specifies the size of an implicitly-created grid column track or pattern of tracks.
Read more >
css - grid-row-start/grid-row-end puts item in wrong column
Position anything that's not auto-positioned. Process the items locked to a given row. Determine the columns in the implicit grid.
Read more >
grid-auto-columns
A grid can have an explicit column defined by grid-template-areas without having its size set explicitly by the grid-template-columns property.
Read more >
Xamarin.Forms Grid
The Xamarin.Forms Grid is a layout that organizes its children into rows and columns of cells.
Read more >
Ion-Grid: Display Grids to Build Mobile-First Custom ...
It is based on a 12 column layout with different breakpoints based on the screen size. The number of columns can be customized...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found