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

Label does not get wrapped when in Grid with ColumnSpan #11863

Closed
SokoFromNZ opened this issue Dec 5, 2022 · 5 comments
Closed

Label does not get wrapped when in Grid with ColumnSpan #11863

SokoFromNZ opened this issue Dec 5, 2022 · 5 comments
Labels
area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-grid platform/android 🤖 s/triaged Issue has been reviewed t/bug Something isn't working
Milestone

Comments

@SokoFromNZ
Copy link

Description

When I put a Label in a Grid with a ColumnSpan the Label does not get wrapped as it usually does (the green text should be the same as the blue and the yellow):

image

Steps to Reproduce

ContentPage with the following grid or use my repository example

    <Grid ColumnDefinitions="*" RowDefinitions="Auto,Auto,Auto">
        <Label
            Grid.Row="0"
            Grid.Column="0"
            BackgroundColor="Blue"
            Text="This is a very long text which should be wrapped to the next line when the end of the Android screen is reached" />
        <Grid
            Grid.Row="1"
            Grid.Column="1"
            BackgroundColor="Green"
            ColumnDefinitions="*, Auto, *"
            RowDefinitions="Auto, Auto">
            <Label
                Grid.Row="0"
                Grid.Column="0"
                Grid.ColumnSpan="3"
                Text="This is a very long text which should be wrapped to the next line when the end of the Android screen is reached" />
            <Label
                Grid.Row="1"
                Grid.Column="0"
                HorizontalOptions="End"
                Text="No"
                VerticalOptions="Center" />
            <Switch Grid.Row="1" Grid.Column="1" />
            <Label
                Grid.Row="1"
                Grid.Column="2"
                HorizontalOptions="Start"
                Text="Yes"
                VerticalOptions="Center" />
        </Grid>
        <Label
            Grid.Row="2"
            Grid.Column="0"
            BackgroundColor="Yellow"
            Text="This is a very long text which should be wrapped to the next line when the end of the Android screen is reached" />
    </Grid>

Link to public reproduction project repository

https://github.com/SokoFromNZ/MauiNoLabelWrappingInGrid

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11, 12, 13

Did you find any workaround?

I have to put all Labels in a separate Grid

Relevant log output

No response

@SokoFromNZ SokoFromNZ added the t/bug Something isn't working label Dec 5, 2022
@rmarinho rmarinho added this to the Backlog milestone Dec 5, 2022
@ghost
Copy link

ghost commented Dec 5, 2022

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.

@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Dec 5, 2022
@BioTurboNick
Copy link
Contributor

Another workaround: Wrap the label in a ContentView with a Margin set to force the extra layout pass.

@Zhanglirong-Winnie Zhanglirong-Winnie 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 6, 2023
@ghost
Copy link

ghost commented Jun 6, 2023

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

@Zhanglirong-Winnie
Copy link

Verified this issue with Visual Studio Enterprise 17.7.0 Preview 1.0. Not repro on Android platform with sample project.
MauiNoLabel.zip
Screenshot 2023-06-06 095906

@SokoFromNZ
Copy link
Author

Thanks @Zhanglirong-Winnie for your check with the latest preview. As I'm not allowed to install VS Previews on my machine I'll have to wait until 17.7.0 is official to confirm.
If I still have this issue then I will reopen it.

@ghost ghost removed the s/try-latest-version Please try to reproduce the potential issue on the latest public version label Jun 6, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 6, 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-grid platform/android 🤖 s/triaged Issue has been reviewed t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants