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

Grid - Label Height calculation is wrong #13092

Closed
omghb opened this issue Feb 2, 2023 · 4 comments
Closed

Grid - Label Height calculation is wrong #13092

omghb opened this issue Feb 2, 2023 · 4 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-stack platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Milestone

Comments

@omghb
Copy link

omghb commented Feb 2, 2023

Description

The Grid - Label Height calculation is wrong when using ColumnSpan and Label with multiple lines. See screenshot with iOS, Android and Windows:

image

Steps to Reproduce

  1. Create new .NET MAUI App with .NET 7
  2. Replace ScrollView content in MainPage.xaml with following content:
    <ScrollView>
        <Grid ColumnDefinitions="*,Auto" RowDefinitions="Auto,Auto,Auto,*" Padding="30,10" RowSpacing="10">

            <Label Grid.ColumnSpan="2" Text="2 line text: Welcome to .NET Multi-platform App UI" FontSize="18" LineBreakMode="WordWrap" />

            <VerticalStackLayout Grid.Row="1" Grid.ColumnSpan="2" >
                <Label Text="2 line text: Welcome to .NET Multi-platform App UI" FontSize="18" LineBreakMode="WordWrap" />
            </VerticalStackLayout>

            <Label Grid.Row="2" Grid.ColumnSpan="2" Text="2 line text: Welcome to .NET Multi-platform App UI" FontSize="18" LineBreakMode="WordWrap" />
            
        </Grid>
    </ScrollView>

Note: If you remove Grid.ColumnSpan="2" then it calculates the height correctly.

Link to public reproduction project repository

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows

Affected platform versions

iOS 16, Android 12, Windows 10

Did you find any workaround?

no

Relevant log output

Installed Workload Id      Manifest Version       Installation Source
---------------------------------------------------------------------
android                    33.0.4/7.0.100         VS 17.4.33213.308
maui-windows               7.0.52/7.0.100         VS 17.4.33213.308
maui-maccatalyst           7.0.52/7.0.100         VS 17.4.33213.308
maccatalyst                16.1.1477/7.0.100      VS 17.4.33213.308
maui-ios                   7.0.52/7.0.100         VS 17.4.33213.308
ios                        16.1.1477/7.0.100      VS 17.4.33213.308
maui-android               7.0.52/7.0.100         VS 17.4.33213.308
@omghb omghb added the t/bug Something isn't working label Feb 2, 2023
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Feb 2, 2023
@mattleibow mattleibow added this to the Backlog milestone Feb 2, 2023
@ghost
Copy link

ghost commented Feb 2, 2023

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@espenrl
Copy link
Contributor

espenrl commented Feb 26, 2023

Thank you very much @omghb. I run into the exact same problem and redoing my layout, and removing the usage of ColumnSpan, solved my problem.

@jinxinjuan jinxinjuan added s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version labels Jun 9, 2023
@ghost
Copy link

ghost commented Jun 9, 2023

Hi @omghb. 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.

@jinxinjuan
Copy link

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Not repro on windows, android and iOS platform with sample project. MauiApp13.zip

@hartez hartez closed this as completed Jun 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 9, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-stack platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 s/triaged Issue has been reviewed s/try-latest-version Please try to reproduce the potential issue on the latest public version t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants