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

CollectionView performs layout when it's been removed from the visibile window #17494

Open
PureWeen opened this issue Sep 19, 2023 · 1 comment
Labels
area-controls-collectionview CollectionView, CarouselView, IndicatorView platform/iOS 🍎 t/bug Something isn't working
Milestone

Comments

@PureWeen
Copy link
Member

Description

I've created this issue to track continued work from this issue

I wanted to close the original issue as the regression itself should be resolved but we should still get better testing and an overall assessment done

Notes from PR working around regression

The original PR expressed some concern around this not being an actual fix #17472

While there is some truth to this, this PR just adds some guards to extra code that was added #14951 which would cause an NRE.

ViewWillLayoutSubViews was always getting called when the CollectionView was removed from the Window but the code added from the above PR now called some additional code that needs to be null checked. 14951 has been part of .NET 8 since preview 5; this is the only regression we've so far identified from that PR so we feel like it's a better story to keep that PR as part of SR8 and merge this fix in to manage that regression.

The issue has been narrowed down to a very specific piece of code here. If you comment out this code, then it no longer calls ViewWillLayoutSubviews

This path also only occurs on Shell when you set any styling elements.

I have the recipes app added into the main_recipes branch if you want to see this crash happen against our repository.

Reproduction

  • checkout the main_recipes branch
  • Load up the sandbox app on an iphone 14 pro max device or bigger
  • click on the "My recipes" tab
  • new recipes
  • rotate device
@ghost
Copy link

ghost commented Sep 20, 2023

We've added this issue to our backlog, and we will work to address it as time and resources allow. If you have any additional information or questions about this issue, please leave a comment. For additional info about issue management, please read our Triage Process.

@samhouts samhouts added the t/bug Something isn't working label Jul 31, 2024
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 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants