dotnet / maui

.NET MAUI is the .NET Multi-platform App UI, a framework for building native device applications spanning mobile, tablet, and desktop.
https://dot.net/maui
MIT License
22.21k stars 1.75k forks source link

When using a ListView with bound data, sometimes fields do not wordwrap correctly #24674

Open JBurrough opened 2 months ago

JBurrough commented 2 months ago

Description

I've only managed to reproduce the issue if the last character in the line ends in a special character like a . or a ) and when it's length is EXACTLY right. I've seen this happen in our production product for a few strings which happen to be the exact right length to reproduce this.

In the reproduction example all the strings end with a ) or a . and on the 4 records you see

the first record both the first and last column cut off the last word. the second record doesn't cut off anything and word wraps correctly the third record cuts off the last column but not the first the fourth record cuts off the first column but not the last.

This seems to be dependent on the exact pixel-length of the text, is only reproducible on iOS (I reproduced this on a 10th Generation iPad iOS Version 17.5)

Steps to Reproduce

Download, build the provided project. Observe the data in the first and last column of the grid. Note: The device should be in landscape mode for the provided repro. image

Link to public reproduction project repository

https://github.com/KrimsonWolf/DebugWordwrap

Version with bug

9.0.0-preview.7.24407.4

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

OS: iOS 17.5 - - iPad (10th Generation) -- Reproduced on the iOS simulator but can also be reproduced on real devices.

Did you find any workaround?

No, changing the font size or the length of the display text fixes it but only causes it to happen for a different length string. And changing the ListView to a CollectionView also did not provide a workaround.

Relevant log output

No response

github-actions[bot] commented 2 months ago

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

Zhanglirong-Winnie commented 2 months ago

This issue has been verified using Visual Studio 17.12.0 Preview 1.0(9.0.0-preview.7.24407.4 & 8.0.82 & 8.0.80 &8.0.3). Can repro on iOS platform.

mattleibow commented 1 month ago

Is there any different if you use a CollectionView?

JBurrough commented 1 month ago

No the issue is also reproducible using a CollectionView, I tried using that as a work-around already. We had hoped that might be a workaround but we got the same results, so there's a bug in that case as well. (and you can change the provided repro repository to a CollectionView to observe this)

ramit-2343113 commented 1 month ago

@Zhanglirong-Winnie @mattleibow Is there any timelines around when a fix for this issue will be released? We are impacted by the same issue in our Healthcare product.