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

Using CollectionView for a list with items that can expand/collapse on tap doesn't properly resize on iOS #23033

Open
helixaril opened this issue Jun 13, 2024 · 5 comments
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@helixaril
Copy link

helixaril commented Jun 13, 2024

Description

I am working on an application, which me and my team are porting from Xamarin.Forms to MAUI. In the Xamarin app we implemented an expansion list using CollectionView. The list would have several items and whenever you would tap on one it would expand the item. The expanded item could contain text, images, buttons etc.

However, now in MAUI, the same code using CollectionView works perfectly on Android, but on iOS whenever I collapse an item the size doesn't change back to the original one.

I attached two images to showcase it. In the first one you can see how the list should open when first accessing the page containing it (iOS left, Android right).
image

On the second image I collapsed the first item in the list and as you can see for iOS it doesn't resize
image

The size of the item goes back to normal only if I scroll past that item and then scroll back

Steps to Reproduce

No response

Link to public reproduction project repository

https://github.com/helixaril/ExpansionListReproduce

Version with bug

8.0.40 SR5

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

No response

Did you find any workaround?

No response

Relevant log output

No response

@helixaril helixaril added the t/bug Something isn't working label Jun 13, 2024
Copy link
Contributor

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.

@helixaril helixaril changed the title Using CollectionView for a list with items that can expand on tap doesn't properly resize on iOS Using CollectionView for a list with items that can expand/collapse on tap doesn't properly resize on iOS Jun 13, 2024
@jsuarezruiz jsuarezruiz added platform/iOS 🍎 area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Jun 13, 2024
@kevinxufei
Copy link

Verified this issue with Visual Studio 17.11.0 Preview 2.0 (8.0.60 & 8.0.40 & 8.0.21 & 8.0.3). Can repro on iOS platform with sample project.

@kevinxufei kevinxufei added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert labels Jun 14, 2024
@MortenGregersen
Copy link

MortenGregersen commented Jun 17, 2024

We see a similar issue in our app with MAUI 8.0.14

@samhouts samhouts removed s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 3, 2024
@samhouts samhouts added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jul 10, 2024
@helixaril
Copy link
Author

We have found a workaround in the end. Instead of using a collectionview we have used a stacklayout inside a scrollview

@jsuarezruiz jsuarezruiz added this to the Backlog milestone Oct 28, 2024
@jakob-bmd
Copy link

Performance with StackLayout using BindableLayout is way bader than with the CollectionView.
Also: using BindableLayout crashes the app with a certain list size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/iOS 🍎 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

6 participants