Skip to content

Conversation

@cat0363
Copy link
Contributor

@cat0363 cat0363 commented Jun 27, 2023

Description of Change

When the terminal is rotated while the Flyout of Shell is displayed, the size of the overlay does not
change from the size before rotation. In this PR, we will be updating the size of the overlay after
rotation so that the overlay appears as intended.

Override the ViewWillTransitionToSize method to update the Tapoffview's Frame on rotation detection.
This will allow the size of the overlay portion to update on rotation. I needed to override the ViewWillTransitionToSize
method, so I added the definition to PublicAPI.Unshipped.txt.

[src\Controls\src\Core\PublicAPI\net-ios\PublicAPI.Unshipped.txt]

~override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void

[src\Controls\src\Core\PublicAPI\net-maccatalyst\PublicAPI.Unshipped.txt]

~override Microsoft.Maui.Controls.Platform.Compatibility.ShellFlyoutRenderer.ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator) -> void

[src\Controls\src\Core\Compatibility\Handlers\Shell\iOS\ShellFlyoutRenderer.cs]

public override void ViewWillTransitionToSize(CoreGraphics.CGSize toSize, UIKit.IUIViewControllerTransitionCoordinator coordinator)
{
    base.ViewWillTransitionToSize(toSize, coordinator);

    coordinator.AnimateAlongsideTransition((IUIViewControllerTransitionCoordinatorContext obj) => 
    {
        // Before rotation
    }, 
    (IUIViewControllerTransitionCoordinatorContext obj) => 
    {
        // After rotation
        if (IsOpen)
        {
            TapoffView.Frame = View.Frame;
        }
    });
}

Below is the execution result.

iPhone.14.iOS.16.4.2023-06-26.15-06-51.mp4

Could you please check it? Thank you.

Issues Fixed

Fixes #15173

@ghost ghost added the community ✨ Community Contribution label Jun 27, 2023
@ghost
Copy link

ghost commented Jun 27, 2023

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

@PureWeen PureWeen self-requested a review June 27, 2023 13:02
@Eilon Eilon added the area-controls-shell Shell Navigation, Routes, Tabs, Flyout label Jun 27, 2023
@cat0363 cat0363 changed the title Added size update for Shell Popup Overlay after rotation Add size update for Shell Popup Overlay after rotation Jul 3, 2023
@cat0363 cat0363 changed the title Add size update for Shell Popup Overlay after rotation [iOS] Add size update for Shell Popup Overlay after rotation Jul 19, 2023
@cat0363
Copy link
Contributor Author

cat0363 commented Aug 10, 2023

The solution I posted last time is not beautiful because the overlay is temporarily drawn in the size
before rotation when the terminal is rotated. To solve this problem, set the post-rotation size to
TapoffView before rotation.

public override void ViewWillTransitionToSize(CGSize toSize, IUIViewControllerTransitionCoordinator coordinator)
{
    base.ViewWillTransitionToSize(toSize, coordinator);

    coordinator.AnimateAlongsideTransition((IUIViewControllerTransitionCoordinatorContext obj) =>
    {
        // Before rotation
        if (IsOpen)
        {
            TapoffView.Frame = new CGRect(View.Frame.X, View.Frame.Y, View.Frame.Width, View.Frame.Height);
        }
    }, null);
}

Below is the execution result.

[Before Fix] [After Fix]
iPhone.14.iOS.16.4.2023-08-10.17-45-15.mp4
iPhone.14.iOS.16.4.2023-08-10.17-49-13.mp4

With this fix, overlays are no longer drawn at their pre-rotation size.

@samhouts samhouts added this to the Under Consideration milestone Aug 15, 2023
@samhouts samhouts added the stale Indicates a stale issue/pr and will be closed soon label Sep 11, 2023
@cat0363
Copy link
Contributor Author

cat0363 commented Sep 12, 2023

@samhouts, A stale tag has been added, but has the issue been resolved?
Could you please tell me in which version the issue was resolved?

@samhouts samhouts requested review from a team and hartez and removed request for a team September 12, 2023 15:04
@samhouts
Copy link
Contributor

@cat0363 The stale label is just an easy way for us to query PRs that haven't been updated in a while. This isn't resolved to my knowledge because this PR hasn't been merged. Thanks for your patience!

@cat0363
Copy link
Contributor Author

cat0363 commented Sep 12, 2023

@samhouts , Thank you for your reply despite your busy schedule.
Your comment made me understand that the stale label serves as a marker.
I was worried that this label would cause it to be closed if no action was taken.
I will wait until the review of this PR starts.

@hartez hartez removed their request for review January 10, 2024 21:07
@samhouts samhouts added platform/ios and removed stale Indicates a stale issue/pr and will be closed soon labels Feb 1, 2024
@PureWeen PureWeen removed this from the Under Consideration milestone Aug 2, 2024
@cat0363 cat0363 requested a review from a team as a code owner November 11, 2024 07:41
@cat0363 cat0363 requested a review from rmarinho November 11, 2024 07:41
@PureWeen PureWeen changed the base branch from main to net10.0 August 16, 2025 17:01
@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).

@jfversluis jfversluis added this to the .NET 10.0-rc2 milestone Sep 9, 2025
@PureWeen
Copy link
Member

/rebase

@PureWeen PureWeen changed the base branch from net10.0 to main November 10, 2025 20:50
cat0363 and others added 7 commits November 13, 2025 11:25
# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt
@PureWeen
Copy link
Member

/azp run MAUI-UITests-public

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@PureWeen PureWeen changed the base branch from main to inflight/current November 14, 2025 14:33
@PureWeen PureWeen merged commit f07c16b into dotnet:inflight/current Nov 14, 2025
96 of 102 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Nov 14, 2025
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 15, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 18, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 20, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
PureWeen added a commit that referenced this pull request Nov 21, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
github-actions bot pushed a commit that referenced this pull request Nov 24, 2025
* Added size update for Shell Popup Overlay after rotation

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* Fix resizing on rotation

* - fix publicapi

# Conflicts:
#	src/Controls/src/Core/PublicAPI/net-ios/PublicAPI.Unshipped.txt
#	src/Controls/src/Core/PublicAPI/net-maccatalyst/PublicAPI.Unshipped.txt

* - apply copilot suggested change

* - Add Tests

* - fix test

* - make backdrop orange

---------

Co-authored-by: Shane Neuville <[email protected]>
LogishaSelvarajSF4525 added a commit to LogishaSelvarajSF4525/maui that referenced this pull request Nov 26, 2025
sheiksyedm added a commit that referenced this pull request Nov 28, 2025
#32868)

This PR addresses the UI test image failures that occurred in the
inflight/candidate branch #32841 and
includes updates to improve rendering and test stability across
platforms.

- In ShouldFlyoutTextWrapsInLandscape test case, added the resaved CI
snapshot caused by changes from fix PR -
#15866
- In FlyoutOverlayResizesOnRotation test cases, disable for android
platform, because the Shell FlyoutContent overlaps the navigation bar
due to SafeArea during Landscape Orientation, Related issue:
#32275

**Test cases:**
- ShouldFlyoutTextWrapsInLandscape
- NavigationBarShouldRemainHiddenAfterNavigatingBack
- FlyoutOverlayResizesOnRotation
- VerticalGridCollectionViewLTRToRTLToggleShouldWork
- VerticalGridCollectionViewRTLColumnMirroringShouldWork
@github-actions github-actions bot locked and limited conversation to collaborators Dec 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-controls-shell Shell Navigation, Routes, Tabs, Flyout community ✨ Community Contribution partner/syncfusion/review platform/ios

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

The overlay when displaying Shell Flyout is not drawn correctly when the screen is rotated on iOS.

6 participants