Skip to content

Conversation

@kubaflo
Copy link
Contributor

@kubaflo kubaflo commented Nov 3, 2025

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 from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

Before After
Screen.Recording.2025-11-04.at.00.40.34.mov
Screen.Recording.2025-11-04.at.00.37.54.mov

Issues Fixed

Fixes #32359

Copilot AI review requested due to automatic review settings November 3, 2025 23:39
@kubaflo kubaflo self-assigned this Nov 3, 2025
@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Nov 3, 2025
@dotnet-policy-service
Copy link
Contributor

Hey there @@kubaflo! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed.

@kubaflo
Copy link
Contributor Author

kubaflo commented Nov 3, 2025

@copilot please write a UI test for this PR based on this issue #32359

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes an issue where iOS UICollectionView compositional layouts don't properly mirror columns in right-to-left (RTL) flow directions. The fix explicitly sets the SemanticContentAttribute on the native UICollectionView to ensure RTL layout behavior is correctly applied.

  • Adds explicit semantic content attribute handling for the UICollectionView based on FlowDirection
  • Maps FlowDirection enum values to appropriate UISemanticContentAttribute values
  • Only updates the SemanticContentAttribute when it differs from the desired value

@jsuarezruiz
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

Copy link
Contributor

@jsuarezruiz jsuarezruiz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could include an UITest to check that after switching to RTL: first column is right‑anchored?

}

if (CollectionView.SemanticContentAttribute != desiredAttr)
{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compositional and flow layouts may not re-query attributes immediately, requires to force a layout pass?

@Ahamed-Ali Ahamed-Ali added area-controls-collectionview CollectionView, CarouselView, IndicatorView s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed i/regression This issue described a confirmed regression on a currently supported version collectionview-cv1 regressed-in-9.0.120 and removed area-controls-collectionview CollectionView, CarouselView, IndicatorView s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed collectionview-cv1 regressed-in-9.0.120 i/regression This issue described a confirmed regression on a currently supported version labels Nov 4, 2025
@PureWeen
Copy link
Member

PureWeen commented Nov 7, 2025

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen added this to the .NET 10.0 SR1.1 milestone Nov 12, 2025
@PureWeen PureWeen added the p/0 Current heighest priority issues that we are targeting for a release. label Nov 12, 2025
@PureWeen
Copy link
Member

/rebase

kubaflo and others added 3 commits November 13, 2025 17:40
Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.
@PureWeen
Copy link
Member

/backport to release/10.0.1xx-sr1

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx-sr1 (link to workflow run)

@PureWeen
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current November 15, 2025 15:22
@github-project-automation github-project-automation bot moved this from Todo to Approved in MAUI SDK Ongoing Nov 15, 2025
@PureWeen PureWeen merged commit ceff93f into dotnet:inflight/current Nov 15, 2025
155 of 163 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Done in MAUI SDK Ongoing Nov 15, 2025
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
PureWeen added a commit that referenced this pull request Nov 21, 2025
* Fix RTL column mirroring in UICollectionView

Explicitly sets the semantic content attribute on the native UICollectionView to ensure compositional layouts mirror columns correctly in right-to-left (RTL) scenarios. This addresses an issue where the platform view's semantic attribute does not propagate to native children not backed by IView.

* - add UITests

* Improvements

---------

Co-authored-by: Shane Neuville <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

collectionview-cv2 community ✨ Community Contribution p/0 Current heighest priority issues that we are targeting for a release. platform/ios

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[iOS] FlowDirection="RightToLeft" issue in CollectionView version 9.0.120

4 participants