Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Regression in 4.8.0.1364 : grid row height is not correctly computed, label is truncated #12001

Closed
tranb3r opened this issue Sep 2, 2020 · 16 comments
Assignees
Labels
4.8.0 regression on 4.8.0 a/collectionview a/grid a/layout i/regression in-progress This issue has an associated pull request that may resolve it! m/high impact ⬛ t/bug 🐛
Milestone

Comments

@tranb3r
Copy link

tranb3r commented Sep 2, 2020

Description

I have a collectionView, the itemtemplate is a simple grid with labels.
Whe using the new release of Xamarin Forms (4.8.0.1364), the grid row height is not correct, and some labels are truncated.
No issue when using the previous release (4.8.0.1269), so this is a regression.

Steps to Reproduce

  1. Open repro project with collectionview and grid
  2. Compare the display with both versions of xamarin forms

Expected Behavior

The grid row height should be adjusted to the size of the label.

Actual Behavior

In 4.8.0.1364, the label is truncated.

Basic Information

  • Version with issue: 4.8.0.1364
  • Last known good version: 4.8.0.1269
  • Platform : Android

Screenshots

Untitled

Reproduction Link

Here is the repro project:
TestXF48.zip

@tranb3r tranb3r added s/unverified New report that has yet to be verified t/bug 🐛 labels Sep 2, 2020
@Transis-Felipe
Copy link
Contributor

Transis-Felipe commented Sep 3, 2020

I'm also having this problem with labels in a grid.

This problem occours outside of a collection view also.

@hartez hartez self-assigned this Sep 3, 2020
@hartez hartez added a/collectionview a/grid a/layout and removed s/unverified New report that has yet to be verified labels Sep 3, 2020
@klogeaage
Copy link

I have a similar problem in my application, but it has become worse during the 4.8.xxx releases. In 4.7.0.1351 it works perfectly, in e.g. 4.8.0.1269 it is somewhat broken, and in 4.8.0.1364, it is completely broken.

I have StackLayouts inside a grid row like so:

<CollectionView.ItemTemplate>
	<DataTemplate x:DataType="models:Journey">
		<Grid Padding="10,5,10,5" ColumnSpacing="4" RowSpacing="4" x:DataType="models:Journey" 
			ColumnDefinitions="80, 0.7*, 0.30*" RowDefinitions ="Auto, 0.5" >
			<border:SfBorder Grid.Column="0" CornerRadius="30,0,30,0" IsClippedToBounds="True" BorderWidth= "0" HorizontalOptions="Fill" 
				HeightRequest="100" Margin="0,0,5,0" Padding="0,0,0,5" >
				<Image VerticalOptions="Fill" HorizontalOptions="Fill" Aspect="AspectFill" 
				Source="{Binding ImagePath, Converter={StaticResource ImageSourceConverter} }" >
				</Image>
			</border:SfBorder>
			<StackLayout Grid.Row="0" Grid.Column="1" Orientation="Vertical">
				<Label Text="{Binding GeneralDescription.Name}" LineBreakMode="WordWrap" Style="{StaticResource ListHeadingStyle}" />
				<Label Text="{Binding GeneralDescription.Description}" LineBreakMode="WordWrap" 
					Style="{StaticResource ListBodyStyle}" VerticalOptions="StartAndExpand" VerticalTextAlignment="Start" />
			</StackLayout>
			<StackLayout Grid.Row="0" Grid.Column="2" Orientation="Vertical" Spacing="1">
				<Label Text="{Binding Start, StringFormat='{0:dd-MM-yy}'}" Style="{StaticResource ListMetaDataStyle}" VerticalTextAlignment="Start" />
				<Label Text="{Binding Duration, Converter={StaticResource TimeSpanConverter}}" Style="{StaticResource ListMetaDataStyle}" />
				<Label Text="{Binding JourneyTemplate.GeneralDescription.Name}" Style="{StaticResource ListMetaDataStyle}"  />
				<Label Text="{Binding Owner.Name}" Style="{StaticResource ListMetaDataStyle}" />
			</StackLayout>
			<!--Separator-->
			<BoxView Grid.ColumnSpan="3" Grid.Row="1" VerticalOptions="End" 
				Color="{AppThemeBinding Light=Gray, Dark={StaticResource Brokenwhite}}" />
		</Grid>
	</DataTemplate>
</CollectionView.ItemTemplate>

In 4.7.x, it looks like this:
Screenshot 4 7 0 1351

In e.g. 4.8.0.1269 like this:
Screenshot 4 8 0 1269

And finally, in 4.8.0.1364 it is like this:
Screenshot 4 8 0 1364

Screenshots are from iOS but the problem is also apparent on Android.

The CollectionwView has set ItemSizingStrategy="MeasureAllItems".

If you think this is completely unrelated, I will of course open a new issue.

@samhouts samhouts added this to the 5.0.0 milestone Sep 8, 2020
@tranb3r
Copy link
Author

tranb3r commented Sep 14, 2020

@samhouts
Why do you postpone this issue to 5.0.0, when this is clearly a regression that has been introduced in 4.8.0.1364 ??

@samhouts samhouts added 4.8.0 regression on 4.8.0 i/regression labels Sep 14, 2020
@samhouts samhouts modified the milestones: 5.0.0, 4.8.0 Sep 14, 2020
@samhouts
Copy link
Member

Not intentional! Looks like we forgot to put the regression tag on. Thanks for letting me know!

@tranb3r
Copy link
Author

tranb3r commented Sep 17, 2020

Same issue in the new release 4.8.0.1451

@tranb3r
Copy link
Author

tranb3r commented Sep 24, 2020

Same issue in XF 5.0.0.1487-pre1.
@samhouts Any progress ? This is quite a serious regression !!

@tranb3r
Copy link
Author

tranb3r commented Oct 8, 2020

Same issue in XF 4.8.0.1534 and 5.0.0.1539-pre2

@jaspervanmegroot
Copy link

This is a serious issue.. Cmon man. More than a month ago

@maexsp
Copy link
Contributor

maexsp commented Oct 9, 2020

We also run into this issue. Serious issue. Many pages on our app break because of that. Its a high prio bug!

@omghb
Copy link

omghb commented Oct 9, 2020

Please fix this soon. This issue prevents us to update Xamarin Forms.

hartez added a commit that referenced this issue Oct 13, 2020
@hartez hartez added the in-progress This issue has an associated pull request that may resolve it! label Oct 13, 2020
hartez added a commit that referenced this issue Oct 19, 2020
@Syed-Esqimo
Copy link

Hmm breaking layouts everywhere... :(

@skadookkunnan
Copy link

skadookkunnan commented Nov 9, 2020

This issue does not look like fixed even in the latest XF 4.8.0.1560. Why is this showing as 'Closed'? The same issue happens in ListView as well. Can we re-open this and fix in the ListView as well?

@samhouts @rmarinho @hartez

@hartez
Copy link
Contributor

hartez commented Nov 9, 2020

This issue does not look like fixed even in the latest XF 4.8.0.1560.

Because it was not fixed until about a week after that version was released. The fix will be in the next service release of 4.8.

@Alextorres950325
Copy link

any update?

@DiegoVenancioVieira
Copy link

any update?

Problem continues in XF 5+ ?

@klogeaage
Copy link

My issue as reported above IS actually completely fixed in 5.0.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
4.8.0 regression on 4.8.0 a/collectionview a/grid a/layout i/regression in-progress This issue has an associated pull request that may resolve it! m/high impact ⬛ t/bug 🐛
Projects
None yet
Development

No branches or pull requests