Skip to content

Comments

Fix iOS CollectionView not reacting properly to orientation changes#28670

Merged
PureWeen merged 11 commits intodotnet:mainfrom
albyrock87:fix-28657
Apr 3, 2025
Merged

Fix iOS CollectionView not reacting properly to orientation changes#28670
PureWeen merged 11 commits intodotnet:mainfrom
albyrock87:fix-28657

Conversation

@albyrock87
Copy link
Contributor

@albyrock87 albyrock87 commented Mar 27, 2025

Description of Change

While rotating the device, and under other circumstances, a layout pass is being triggered without going through PreferredLayoutAttributesFittingAttributes first.
This is causing an Arrange pass which is not in sync with measurements.
On top of that, due to auto-layout, the platform view Frame was being set without going through an Arrange pass.

We're now taking control over arranging the MAUI platform view as if the TemplatedCell was some kind of MauiView.
This also has the nice side effect of finally making the Margins work in the collection view.

This PR also fixes a small issue on CV1 where simple-string (non-MAUI) headers/footers where not being properly placed.

Issues Fixed

Fixes #28657
Fixes #28658

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@albyrock87 albyrock87 marked this pull request as draft March 27, 2025 21:08
@jsuarezruiz jsuarezruiz added platform/ios area-controls-collectionview CollectionView, CarouselView, IndicatorView labels Mar 28, 2025
@albyrock87 albyrock87 force-pushed the fix-28657 branch 3 times, most recently from 8145874 to 81b57d2 Compare March 28, 2025 11:01
@albyrock87 albyrock87 marked this pull request as ready for review March 28, 2025 12:22
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 9 SR6 milestone Mar 28, 2025
@PureWeen PureWeen moved this from Todo to Ready To Review in MAUI SDK Ongoing Mar 28, 2025
@PureWeen PureWeen added the p/0 Current heighest priority issues that we are targeting for a release. label Mar 28, 2025
@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@albyrock87 albyrock87 force-pushed the fix-28657 branch 2 times, most recently from 45f892e to bd56392 Compare March 30, 2025 11:57
@PureWeen
Copy link
Member

/azp run

@PureWeen
Copy link
Member

PureWeen commented Apr 1, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

PureWeen
PureWeen previously approved these changes Apr 2, 2025
@github-project-automation github-project-automation bot moved this from Ready To Review to Approved in MAUI SDK Ongoing Apr 2, 2025
@PureWeen
Copy link
Member

PureWeen commented Apr 2, 2025

/rebase

@PureWeen
Copy link
Member

PureWeen commented Apr 2, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

# Conflicts:
#	src/Controls/src/Core/Handlers/Items/iOS/StructuredItemsViewController.cs
@PureWeen
Copy link
Member

PureWeen commented Apr 3, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen
Copy link
Member

PureWeen commented Apr 3, 2025

  • failing tests are unrelated

@PureWeen PureWeen merged commit 3da3c4e into dotnet:main Apr 3, 2025
114 of 128 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Apr 3, 2025
@github-actions github-actions bot locked and limited conversation to collaborators May 4, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-collectionview CollectionView, CarouselView, IndicatorView community ✨ Community Contribution p/0 Current heighest priority issues that we are targeting for a release. platform/ios

Projects

Status: Done

3 participants