maui icon indicating copy to clipboard operation
maui copied to clipboard

Label Truncation and MaxLines options do not work when combined

Open MitchBomcanhao opened this issue 2 years ago • 2 comments

Description

This is not a new issue, it has been reported multiple times over the years, hasn't been fixed, and the previous bugs have been closed as if things were fixed.

see

  • https://github.com/dotnet/maui/issues/9853
  • https://github.com/dotnet/maui/issues/9084

I have found other issues in maui where properties set in xaml are simply not being applied to the controls (mainly when dealing with implicit styles, where some properties have no effect) so I'm wildly speculating this will be a similar issue. when setting up truncation properties, the maxlines setting is likely not getting set at all.

I've reproduced this on Windows and the older bugs also mention iOS and Android so I'm sure they'll also be broken.

Steps to Reproduce

In my case, I have a label set with LineBreakMode="TailTruncation" MaxLines="2" and it is rendered with a single truncated line.

If you want more details, be sure to check the referenced bugs above which have not been resolved.

Link to public reproduction project repository

No response

Version with bug

8.0.3

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

MitchBomcanhao avatar Jan 24 '24 09:01 MitchBomcanhao

Can you test with the latest nightly build? https://github.com/dotnet/maui/wiki/Nightly-Builds

PureWeen avatar Jan 26 '24 15:01 PureWeen

Hi @MitchBomcanhao. We have added the "s/needs-info" label to this issue, which indicates that we have an open question for you before we can take further action. 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.

ghost avatar Jan 26 '24 15:01 ghost

This issue has been automatically marked as stale because it has been marked as requiring author feedback but has not had any activity for 4 days. It will be closed if no further activity occurs within 3 days of this comment. If it is closed, feel free to comment when you are able to provide the additional information and we will re-investigate.

ghost avatar Jan 30 '24 16:01 ghost

8.0.6 (bad) image

8.0.7-nightly.9952 (30 January 2024) (ok) image

seems like its behaviour has changed in recent builds. the above screenshots are from Windows, have not tried this in other platforms.

MitchBomcanhao avatar Jan 31 '24 13:01 MitchBomcanhao

@MitchBomcanhao can we close this issue?

PureWeen avatar Mar 12 '24 16:03 PureWeen

@PureWeen if the code change has reached production, then I think it can be closed. I think this (https://github.com/dotnet/maui/pull/14918) will be the change that has this fix? if so, released in 8.0.7.

MitchBomcanhao avatar Mar 12 '24 16:03 MitchBomcanhao