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 star (Image?) behaviour inconsistent across platforms #14305

Open
Redth opened this issue Mar 30, 2023 · 2 comments · Fixed by #14369
Open

Grid star (Image?) behaviour inconsistent across platforms #14305

Redth opened this issue Mar 30, 2023 · 2 comments · Fixed by #14369
Labels
area-controls-image Image control area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-grid p/2 Work that is important, but is currently not scheduled for release platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@Redth
Copy link
Member

Redth commented Mar 30, 2023

Description

Prefacing that this may be more of an Image handler issue than grid stars, but it's worth exploring in the context of grid as well

Here's an example layout:

<Grid>
  <Grid.RowDefinitions>
    <RowDefinition Height="Auto" />
    <RowDefinition Height="*" />
    <RowDefinition Height="150" />
  </Grid.RowDefinitions>
  <Grid.ColumnDefinitions>
    <ColumnDefinition Width="Auto" />
    <ColumnDefinition Width="*" />
    <ColumnDefinition Width="150" />
  </Grid.ColumnDefinitions>
  
  <Image Grid.Column="1" Grid.Row="1"
    Source="dotnet_bot.png"
    SemanticProperties.Description="Cute dot net bot waving hi to you!"
    HeightRequest="200"
    HorizontalOptions="Center" />

  <Label Grid.Column="2" Grid.Row="2"
    Text="Hello, World!"
    SemanticProperties.HeadingLevel="Level1"
    FontSize="32"
    HorizontalOptions="Center" />

  <Label Grid.Column="1" Grid.Row="2"
    Text="Welcome to .NET Multi-platform App UI"
    SemanticProperties.HeadingLevel="Level2"
    SemanticProperties.Description="Welcome to dot net Multi platform App U I"
    FontSize="18"
    HorizontalOptions="Center" />
  
  <Button Grid.Column="0" Grid.Row="0"
    x:Name="CounterBtn"
    Text="Click me"
    SemanticProperties.Hint="Counts the number of times you click"
    Clicked="OnCounterClicked"
    HorizontalOptions="Center" />
</Grid>

Some videos for showing the behaviour on various platforms:

Android
https://user-images.githubusercontent.com/271950/228933782-08dc7e9f-1fbc-416f-a024-85ed8fd1f917.mp4

Windows
https://user-images.githubusercontent.com/271950/228933852-0fe9f193-7e40-4432-bdd2-438ac8b2ca12.mp4

Notice how horizontal seems to be relatively well respected... The vertical on the other hand acts strangely. On windows it seems to respect the image height until a certain point at which the image disappears and the available space agrees and things size maybe accurately then? On android the image seems to overflow its available assigned space until it goes away and eventually somehow pops into the left outside of where it has any business being.

It gets even more interesting if you add a ScrollView around the grid.

Steps to Reproduce

  1. File -> New MAUI
  2. Paste the xaml into the mainpage from above

Link to public reproduction project repository

https://gist.github.com/Redth/bb1e22edba21716c000da517ae1d6d1b

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android, Windows

Affected platform versions

N/A

Did you find any workaround?

No response

Relevant log output

No response

@Redth Redth added t/bug Something isn't working area-controls-image Image control layout-grid labels Mar 30, 2023
@ghost ghost added the legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor label Mar 30, 2023
@Redth Redth added p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint and removed legacy-area-controls Label, Button, CheckBox, Slider, Stepper, Switch, Picker, Entry, Editor labels Mar 30, 2023
@Eilon Eilon added the area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter label Mar 31, 2023
@rachelkang rachelkang added this to the Backlog milestone Apr 4, 2023
@ghost
Copy link

ghost commented Apr 4, 2023

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.

@mattleibow
Copy link
Member

@samhouts samhouts modified the milestones: Backlog, .NET 8 May 24, 2023
@samhouts samhouts modified the milestone: .NET 8 + Servicing Sep 26, 2023
@PureWeen PureWeen added p/2 Work that is important, but is currently not scheduled for release and removed p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint labels Jul 2, 2024
@PureWeen PureWeen modified the milestones: .NET 8 + Servicing, Backlog Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-image Image control area-layout StackLayout, GridLayout, ContentView, AbsoluteLayout, FlexLayout, ContentPresenter layout-grid p/2 Work that is important, but is currently not scheduled for release platform/android 🤖 platform/iOS 🍎 platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants