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

[regression/8.0.0-preview.1.7762] CollectionView with bound text of varying lengths does not properly measure all items #16234

Closed
samhouts opened this issue Jul 19, 2023 · 5 comments · Fixed by #18356
Assignees
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-8.0.10 fixed-in-8.0.100-rc.2.9530 Look for this fix in 8.0.100-rc.2.9530 i/regression This issue described a confirmed regression on a currently supported version p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 t/bug Something isn't working
Milestone

Comments

@samhouts
Copy link
Member

samhouts commented Jul 19, 2023

Description

I have a CollectionView with a Label in the ItemTemplate. The text of the Label is bound to a value in the ItemSource that can either be 1 line or multiple lines. As of 8.0, it appears that it only measures the first item in this instance and not all items, so if the first item is short, the rest of the items will be cut off.

Works as expected in 7.0.92.

Steps to Reproduce

  1. File > New
  2. Add ViewModel with ObservableCollection of objects where one property has text that can vary between short and long string values. Make sure the first item is the shortest.
  3. Add CollectionVIew with Label bound to the string. (Possibly an image of varying size could do the same thing...?)
  4. Run.

Expected: CollectionView has rows of varying height and the entire content is visible.
Actual: CollectionView has rows of all the same height and some of the content is truncated.

Link to public reproduction project repository

https://github.com/samhouts/dotnetmauirepros/tree/cvmeasureallitems

Version with bug

8.0.0-preview.1.7762

Last version that worked well

7.0.92

Affected platforms

Android, Windows, I was not able test on other platforms

Affected platform versions

?

Did you find any workaround?

No response

Relevant log output

No response

@samhouts samhouts added t/bug Something isn't working area-controls-collectionview CollectionView, CarouselView, IndicatorView i/regression This issue described a confirmed regression on a currently supported version labels Jul 19, 2023
@samhouts samhouts added this to the .NET 8 GA milestone Jul 19, 2023
@manstheram
Copy link

manstheram commented Jul 22, 2023

I believe I'm getting the same issue but also on version 7.0.92. It started happening after I updated a bunch of packages which probably included MAUI stuff. the last working version for me is 7.0.86. i reverted back to it by adding this to the .csproj:
<MauiVersion>7.0.86</MauiVersion>

@samhouts
Copy link
Member Author

@manstheram I did not see this issue on 7.0.92 with my reproduction project. Can you link yours, possibly? Thanks!

@manstheram
Copy link

manstheram commented Jul 27, 2023

@samhouts
I'm currently working on a private repository with other people, so I've had to separate only my UI code and I've put it in this repository (this is my first time making a UI in C# so it's a bit messy):
https://github.com/manstheram/MauiCollectionViewIssues/tree/master
This issue that I'm getting is that I have an entry that is bound to the property of the selected item in a CollectionView, and this entry is getting cut off, but I believe that both of our issues are being caused by the same underlying problem when updating Maui. In the .csproj, I've set the version to be <MauiVersion>7.0.92</MauiVersion> so it should be using that version when compiling.

@samhouts samhouts added the p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint label Aug 4, 2023
@mikeparker104 mikeparker104 added the partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with label Sep 18, 2023
@samhouts samhouts changed the title [regression/8.0.0-preview1] CollectionView with bound text of varying lengths does not properly measure all items [regression/8.0.0-preview.1.7762] CollectionView with bound text of varying lengths does not properly measure all items Sep 19, 2023
@PureWeen PureWeen modified the milestones: .NET 8 GA, .NET 8 SR1 Sep 27, 2023
@samhouts samhouts modified the milestones: .NET 8 SR1, .NET 8 GA Oct 2, 2023
@emaf emaf self-assigned this Oct 18, 2023
@samhouts samhouts moved this from Todo to In Progress in MAUI SDK Ongoing Oct 19, 2023
emaf added a commit that referenced this issue Oct 25, 2023
#14532)"

This partially reverts commit d569287,
keeping the AdaptiveCollectionView sample.

The reverted change was switching to only use FormsGridView as backing
control for CollectionView what causes issues like
#16234.
emaf added a commit that referenced this issue Oct 25, 2023
#14532)"

This partially reverts commit d569287,
keeping the AdaptiveCollectionView sample.

The reverted change was switching to only use FormsGridView as backing
control for CollectionView what causes issues like
#16234.
emaf added a commit that referenced this issue Oct 25, 2023
#14532)"

This partially reverts commit d569287,
keeping the AdaptiveCollectionView sample.

The reverted change was switching to only use FormsGridView as backing
control for CollectionView what causes issues like
#16234.
PureWeen pushed a commit that referenced this issue Oct 26, 2023
#14532)" (#18356)

This partially reverts commit d569287,
keeping the AdaptiveCollectionView sample.

The reverted change was switching to only use FormsGridView as backing
control for CollectionView what causes issues like
#16234.
@github-project-automation github-project-automation bot moved this from In Progress to Done in MAUI SDK Ongoing Oct 26, 2023
@DDHSchmidt
Copy link

DDHSchmidt commented Nov 2, 2023

May I inquire why this was closed as completed?
This is still an issue in 8.0.0-rc.2.9511
Please compare the following screenshots of the sample project from two different Maui versions on Windows:
image
image

This is currently not addressed at all!
If the last commit is a fix, then I'm unable to see which release is going to contain it, please be more open about this.
I have a whole department grilling me about this issue :/

EDIT: Sorry, I just saw this has the Milestone ".Net 8 GA" associated, so I presume a fixed version is available as of November 14th ?
Still, CollectionView has so many bugs and regressoins... I can't fathom how these things are allowed to stay in the framework for such a long time...

@ghost
Copy link

ghost commented Nov 2, 2023

Hello lovely human, thank you for your comment on this issue. Because this issue has been closed for a period of time, please strongly consider opening a new issue linking to this issue instead to ensure better visibility of your comment. Thank you!

@ghost ghost locked as resolved and limited conversation to collaborators Dec 3, 2023
@samhouts samhouts added the fixed-in-8.0.100-rc.2.9530 Look for this fix in 8.0.100-rc.2.9530 label Dec 19, 2023
@samhouts samhouts modified the milestones: .NET 8 GA, .NET 8 SR3 Jul 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView fixed-in-8.0.10 fixed-in-8.0.100-rc.2.9530 Look for this fix in 8.0.100-rc.2.9530 i/regression This issue described a confirmed regression on a currently supported version p/1 Work that is important, and has been scheduled for release in this or an upcoming sprint partner/cat 😻 this is an issue that impacts one of our partners or a customer our advisory team is engaged with platform/windows 🪟 t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants