Repository navigation
[Inflight/Candidate][Revert] [iOS] Fix for CollectionView layout issue after iOS device rotation #38771 - #39707
Merged
kubaflo merged 1 commit intoOct 27, 2026
Conversation
…fter iOS device rotation (dotnet#38771)" This reverts commit 4c29bf0.
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:38 — with
GitHub Actions
Inactive
Contributor
|
Hey there @@TamilarasanSF4853! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
This comment has been minimized.
This comment has been minimized.
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:38 — with
GitHub Actions
Inactive
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:40 — with
GitHub Actions
Inactive
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:42 — with
GitHub Actions
Inactive
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:44 — with
GitHub Actions
Inactive
TamilarasanSF4853
temporarily deployed
to
copilot-pat-pool
October 27, 2026 14:44 — with
GitHub Actions
Inactive
sheiksyedm
marked this pull request as ready for review
October 27, 2026 14:47
github-actions Bot
pushed a commit
that referenced
this pull request
Oct 28, 2026
…e after iOS device rotation #38771 (#39707) The backport PR #38815 caused LayoutPassesShouldNotIncrease to fail (iOS 18.5) in the previous candidate #38782. This PR #39396 fixed that failure, and the candidate was subsequently merged into main. However, the current inflight candidate, #39597, appears to have overwritten that fix with the earlier backport similar changes, possibly during conflict resolution, causing LayoutPassesShouldNotIncrease to fail again. I have now reverted the conflicting changes 4c29bf0 in the candidate to preserve the fix already present in main.
kubaflo
pushed a commit
that referenced
this pull request
Nov 4, 2026
…ion (#39891) <!-- Please let the below note in for people that find this PR --> > [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could [test the resulting artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from this PR and let us know in a comment if this change resolves your issue. Thank you! <!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change RTL CollectionView items can become horizontally displaced after device rotation and scrolling. During preferred sizing, the managed item is arranged before UIKit applies the updated native bounds. RTL positioning can therefore use the previous parent width. Existing layout optimizations may skip a subsequent managed arrangement, leaving recycled items incorrectly positioned. This change: - Tracks the native content width used during managed arrangement. - Corrects the native item position when an RTL cell receives a different content width. - Reuses the existing native arrangement path without adding managed subtree arrange passes. - Adds LTR and RTL device tests covering initial sizing, widening/narrowing, reuse, and managed-arrange counts. The fix uses `TemplatedCell2.LayoutSubviews`. It does not modify `ItemsViewController2` or restore the removed `ViewDidLayoutSubviews` override. Validation on iOS: - Reproduced the issue in Sandbox using the post-revert SR13 source. - Confirmed the RTL regression test fails without the fix: native X is −200 instead of 0. - Confirmed both RTL and LTR cases pass with the fix. - Confirmed the Sandbox rotation-and-scroll scenario remains aligned. ### Regression reason This regression issue was originally introduced by PR #37437. A fix was later added through PR #38771 and merged into the candidate branch. However, the fix was subsequently reverted by PR #39707 due to test failures encountered during validation. ### Issues Fixed <!-- Please make sure that there is a bug logged for the issue being fixed. The bug should describe the problem and how to reproduce it. --> Fixes #38622 <!-- Are you targeting main? All PRs should target the main branch unless otherwise noted. -->
5 tasks done
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The backport PR #38815 caused LayoutPassesShouldNotIncrease to fail (iOS 18.5) in the previous candidate #38782. This PR #39396 fixed that failure, and the candidate was subsequently merged into main.
However, the current inflight candidate, #39597, appears to have overwritten that fix with the earlier backport similar changes, possibly during conflict resolution, causing LayoutPassesShouldNotIncrease to fail again.
I have now reverted the conflicting changes 4c29bf0 in the candidate to preserve the fix already present in main.