KEMBAR78
Fixed the SafeArea branch test case failures issues by Ahamed-Ali · Pull Request #30622 · dotnet/maui · GitHub
Skip to content

Conversation

@Ahamed-Ali
Copy link
Contributor

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!

Test failures

  • 22417 AddItemsToCarouselViewWorks (iOS and Mac rendering issue)
  • 7678 (iOS rendering issue)
  • 25192 CarouselViewShouldRenderCorrectly (breaking issue due to safe area implementation latest fix)

Description of Change

  • Arranged the bounds before scheduling the second layout pass. This ensures the native view is aware of the correct bounds and can adjust its layout accordingly. This helps resolve test failures related to 22417 (iOS), 7678, and 25192.

  • Ensure the size never exceeds the constraints.
    (i.e) In the 22417 test sample on Mac (CarouselView1), if widthConstraint is 1085, it becomes 1512 after the SizeThatFits call inside the ViewHandlerExtensions.iOS, causing the view's width to appear larger on Mac.
    On iOS, the value remains correct — for example, if widthConstraint is 375, SizeThatFits also returns 375.

Tested the behaviour in the following platforms

  • iOS
  • Mac

Screenshot

Before fix

7678 22417 (iOS) (adding item not added) 25192
7678Issue.mov
22417iOSIssue.mov
25192Issue.mov

After fix

22417 (Mac ) 7678 22417 (iOS ) 25192
22417MacFix.mov
7678Fixed.mov
22417iOSFixed.mov
25192Fixed.mov

@dotnet-policy-service dotnet-policy-service bot added the community ✨ Community Contribution label Jul 15, 2025
@dotnet-policy-service
Copy link
Contributor

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

@dotnet-policy-service dotnet-policy-service bot added the partner/syncfusion Issues / PR's with Syncfusion collaboration label Jul 15, 2025
@Ahamed-Ali Ahamed-Ali marked this pull request as ready for review July 15, 2025 07:32
@Ahamed-Ali Ahamed-Ali requested a review from a team as a code owner July 15, 2025 07:32
@Ahamed-Ali Ahamed-Ali requested review from jfversluis and jsuarezruiz and removed request for a team July 15, 2025 07:32
@jsuarezruiz
Copy link
Contributor

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines could not run because the pipeline triggers exclude this branch/path.

@PureWeen PureWeen merged commit 0443393 into dotnet:PureWeen/safe-area-fixes-ios Jul 15, 2025
2 checks passed
github-actions bot pushed a commit that referenced this pull request Jul 15, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
PureWeen pushed a commit that referenced this pull request Jul 15, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
PureWeen pushed a commit that referenced this pull request Jul 16, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
PureWeen added a commit that referenced this pull request Jul 17, 2025
…eProperlyOnCollectionView (#30682)

* Fix SafeArea management on iOS

* Fixed the SafeArea branch test case failures issues (#30622)

* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac

* Enhance CrossPlatformArrange method to support safe area adjustments and improve RTL layout handling

* - add images and fix naming

* - additional image updates

* - add comments

* fix update.

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 17, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
PureWeen added a commit that referenced this pull request Jul 17, 2025
…eProperlyOnCollectionView (#30682)

* Fix SafeArea management on iOS

* Fixed the SafeArea branch test case failures issues (#30622)

* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac

* Enhance CrossPlatformArrange method to support safe area adjustments and improve RTL layout handling

* - add images and fix naming

* - additional image updates

* - add comments

* fix update.

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
PureWeen pushed a commit that referenced this pull request Jul 17, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
PureWeen added a commit that referenced this pull request Jul 17, 2025
…eProperlyOnCollectionView (#30682)

* Fix SafeArea management on iOS

* Fixed the SafeArea branch test case failures issues (#30622)

* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac

* Enhance CrossPlatformArrange method to support safe area adjustments and improve RTL layout handling

* - add images and fix naming

* - additional image updates

* - add comments

* fix update.

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Jul 18, 2025
* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac
github-actions bot pushed a commit that referenced this pull request Jul 18, 2025
…eProperlyOnCollectionView (#30682)

* Fix SafeArea management on iOS

* Fixed the SafeArea branch test case failures issues (#30622)

* Fixed the SafeArea test case issues and 22417(mac) main issue

* Removed the Fails condition on Mac

* Enhance CrossPlatformArrange method to support safe area adjustments and improve RTL layout handling

* - add images and fix naming

* - additional image updates

* - add comments

* fix update.

---------

Co-authored-by: Shane Neuville <shneuvil@microsoft.com>
Co-authored-by: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
@github-actions github-actions bot locked and limited conversation to collaborators Aug 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

community ✨ Community Contribution partner/syncfusion Issues / PR's with Syncfusion collaboration

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants