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

[Bug] Labels take too much vertical space with LineBreakMode TailTruncation since Xamarin.Forms 4.8.0 #11729

Closed
radioactiveman opened this issue Aug 10, 2020 · 5 comments

Comments

@radioactiveman
Copy link

Description

Steps to Reproduce

  1. Add a label to a collection (ListView, Bindable StackLayout, ...)
  2. Set LineBreakMode to TailTruncation
  3. Set Text to a long string which does not fit the screen width

Expected Behavior

All collection items have the same height. This is the case with Xamarin.Forms until 4.7.0.

Actual Behavior

Items with too long labels have a heigher height than others. This is a regression in Xamarin.Forms 4.8.0.
It occurs on Android and iOS (UWP not tested).

Basic Information

  • Version with issue: 4.8.0.1269 (latest stable)
  • Last known good version: 4.7.0.1260
  • IDE: Visual Studio 2019
  • Platform Target Frameworks:
    • iOS: Default version
    • Android: 9.0

Screenshots

Xamarin.Forms 4.7.0 (same heights):

Xamarin-Forms-4 7 0

Xamarin.Forms 4.8.0 (different height for second item, causing greater gaps):
Xamarin-Forms-4 8 0

Reproduction Link

App1.zip

@radioactiveman radioactiveman added s/unverified New report that has yet to be verified t/bug 🐛 labels Aug 10, 2020
@samhouts samhouts added this to New in Triage Aug 10, 2020
@rmarinho rmarinho added p/Android 4.8.0 regression on 4.8.0 i/regression e/3 🕒 3 and removed s/unverified New report that has yet to be verified labels Aug 10, 2020
@rmarinho rmarinho moved this from New to Ready For Work in Triage Aug 10, 2020
@cmpalmer66
Copy link

I'm not sure if it's related, but I've also seen a bug I'm trying to isolate where, if the label contains nothing but an acronym or a camel-cased word, the word wrapping can get confused and allocate too much vertical space to contain it. In our application, a label such as "MixedCaseWord" or "MAOP" will result in extra vertical space, whereas "Mixed Case Word" or "M A O P" will not.

@samhouts samhouts added this to To do in Sprint 174 Aug 13, 2020
@samhouts samhouts added this to the 4.8.0 milestone Aug 13, 2020
@samhouts samhouts added this to To do in vCurrent (4.8.0) Aug 13, 2020
@samhouts samhouts added this to To do in Sprint 175 Aug 17, 2020
@samhouts samhouts moved this from To do to Continued in next sprint in Sprint 174 Aug 17, 2020
@samhouts samhouts removed this from Ready For Work in Triage Aug 17, 2020
@Tommigun1980
Copy link

Hi @cmpalmer66 - could you please check #11713 whether that is the bug you are describing? If it is, I don't think it has to do with actual word content, but rather that different text content on different screens would get a line break in different places, and some of them just happen to hit the 'sweet spot' for this bug to appear. Hence I think it is impossible to find something that works on all devices until this gets fixed, in case it is indeed the same issue.

@cmpalmer66
Copy link

Hi @cmpalmer66 - could you please check #11713 whether that is the bug you are describing? If it is, I don't think it has to do with actual word content, but rather that different text content on different screens would get a line break in different places, and some of them just happen to hit the 'sweet spot' for this bug to appear. Hence I think it is impossible to find something that works on all devices until this gets fixed, in case it is indeed the same issue.

I think it might be related, but in my case, I'm specifically seeing a problem with WordWrap turned on and short words/text that doesn't wrap. For example, a short string like "The caption" doesn't grab any extra vertical space, but one with an acronym, like "MAOP" is also not wrapping, but has extra space below the label. I need to figure out a demo repo and maybe post it as a separate issue - I'm just guessing that it's related to this issue or #11713.

@radioactiveman
Copy link
Author

This is probably related to #11903. But since there is no new Xamarin.Forms version available yet, I am not able to verify this for now.

@radioactiveman
Copy link
Author

Closing since this is indeed related to #11903 and fixed with Xamarin.Forms 4.8.0.1364.

Android Ready For Work automation moved this from To do to Done Sep 7, 2020
vCurrent (4.8.0) automation moved this from To do to Done Sep 7, 2020
Sprint 175 automation moved this from To do to Done Sep 7, 2020
@samhouts samhouts removed this from Done in Android Ready For Work Nov 3, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
No open projects
Sprint 174
  
Continued in next sprint
Sprint 175
  
Done
Development

No branches or pull requests

5 participants