dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.06k stars 1.73k forks source link

[regression/8.0.0-preview.4.8333] Grid ColV isn't constrained to row #15121

Closed davidortinau closed 1 year ago

davidortinau commented 1 year ago

Description

I have 3 rows in a grid, and the ColV used to take up only the space between, but now it's much to tall and I cannot see row 3 which is a button.

Simulator Screenshot - iPhone 14 Pro - 2023-05-17 at 00 42 36

Should look like Android:

Screenshot_1684315103

Steps to Reproduce

Update csproj to net8 and run it on iOS sim

<Grid RowDefinitions="Auto, *, 66" Margin="20">
        <VerticalStackLayout VerticalOptions="Start" Spacing="8">
            <Label Text="Current Order" Style="{StaticResource LargeTitle}"/>
            <Label Text="{Binding Order.Table, StringFormat='TABLE {0}'}"/>
            <BoxView Style="{StaticResource HRule}"/>
        </VerticalStackLayout>

        <CollectionView Grid.Row="1" ItemsSource="{Binding Order.Items}" VerticalScrollBarVisibility="Never" Background="Transparent">
            <CollectionView.ItemTemplate>
                <DataTemplate x:DataType="models:Item">
                    <Grid ColumnDefinitions="160,60,*" ColumnSpacing="8" Margin="0,8" HeightRequest="70">
                        <Label Text="{Binding Title}" Grid.Column="0" VerticalOptions="Center"/>
                        <Label Text="{Binding Quantity}" Grid.Column="1" VerticalOptions="Center" HorizontalOptions="Start"/>
                        <Label Text="{Binding Price, StringFormat='${0:N2}'}" Grid.Column="2" VerticalOptions="Center" HorizontalOptions="Start"/>
                    </Grid>
                </DataTemplate>
            </CollectionView.ItemTemplate>
            <CollectionView.Header>
                <Grid ColumnDefinitions="160,60,*" Margin="0,8" HeightRequest="40" ColumnSpacing="8">
                        <Label Text="Item" Grid.Column="0" VerticalOptions="Center" Style="{StaticResource Headline}"/>
                        <Label Text="Quantity" Grid.Column="1" VerticalOptions="Center" Style="{StaticResource Headline}"/>
                        <Label Text="Price" Grid.Column="2" VerticalOptions="Center" HorizontalOptions="Start" Style="{StaticResource Headline}"/>
                        <!-- <BoxView Style="{StaticResource HRule}" VerticalOptions="End" Grid.ColumnSpan="3" /> -->
                    </Grid>
            </CollectionView.Header>
        </CollectionView>

        <Grid Grid.Row="2">
            <Button Text="Pay" Command="{Binding PayCommand}" HorizontalOptions="Fill"/>
        </Grid>

    </Grid>

Link to public reproduction project repository

https://github.com/dotnet/maui-samples/blob/main/7.0/Apps/PointOfSale/src/PointOfSale/Pages/Handheld/OrderDetailsPage.xaml

Version with bug

8.0.0-preview.4.8384/8.0.100-preview.4

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

iOS 16.4

Did you find any workaround?

No response

Relevant log output

No response

ghost commented 1 year ago

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

samhouts commented 1 year ago

Looks fixed to me on p7.

ghost commented 1 year ago

Hi @davidortinau. We have added the "s/try-latest-version" label to this issue, which indicates that we'd like you to try and reproduce this issue on the latest available public version. This can happen because we think that this issue was fixed in a version that has just been released, or the information provided by you indicates that you might be working with an older version.

You can install the latest version by installing the latest Visual Studio (Preview) with the .NET MAUI workload installed. If the issue still persists, please let us know with any additional details and ideally a reproduction project provided through a GitHub repository.

This issue will be closed automatically in 7 days if we do not hear back from you by then - please feel free to re-open it if you come back to this issue after that time.