Revert Shell flyout header layout on iOS - #36495
Merged
Merged
Conversation
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36495Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36495" |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reverts the iOS Shell flyout header layout behavior for Default and Fixed FlyoutHeaderBehavior, restoring the prior overlapping UIScrollView + top ContentInset approach so flyout items can scroll behind semi-transparent headers.
Changes:
- Reverted
ShellFlyoutLayoutManager(iOS) to always overlap the header with the flyoutUIScrollViewand useContentInset.Topto offset items. - Updated
ShellFlyoutTestsexpectations accordingly and removed the regression test that asserted the now-reverted non-overlapping behavior.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs | Restores overlapping ScrollView/inset-based layout for Default/Fixed flyout header behavior on iOS. |
| src/Controls/tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs | Adjusts iOS assertions to match the reverted layout and removes the reverted-behavior regression test. |
Comment on lines
235
to
+247
| #if IOS | ||
| if (contentType == "ScrollView" && | ||
| (behavior == FlyoutHeaderBehavior.Scroll || behavior == FlyoutHeaderBehavior.CollapseOnScroll)) | ||
| if (contentType != "ScrollView") | ||
| #endif | ||
| { | ||
| // For Scroll/CollapseOnScroll, the scroll view overlaps the header so the header | ||
| // can scroll away or shrink. Content is offset via ContentInset, not frame position. | ||
| var scrollViewContentInsetTop = ((UIScrollView)((IView)shell.FlyoutContent).Handler.PlatformView).ContentInset.Top; | ||
| AssertionExtensions.CloseEnough(headerFrame.Height, scrollViewContentInsetTop, message: "Content ScrollView Inset Y"); | ||
| expectedContentY += headerFrame.Height; | ||
| } | ||
| #if IOS | ||
| else | ||
| #endif | ||
| { | ||
| expectedContentY += headerFrame.Height; | ||
| var scrollViewContentInsetTop = ((UIScrollView)((IView)shell.FlyoutContent).Handler.PlatformView).ContentInset.Top; | ||
| AssertionExtensions.CloseEnough(headerFrame.Height, scrollViewContentInsetTop, message: "Content ScrollView Inset Y"); | ||
| } | ||
| #endif |
rmarinho
approved these changes
Jul 10, 2026
Contributor
Author
|
/backport to release/10.0.1xx-sr9 |
Contributor
|
Started backporting to |
This was referenced Jul 10, 2026
rmarinho
pushed a commit
that referenced
this pull request
Jul 10, 2026
This was referenced Jul 11, 2026
SyedAbdulAzeemSF4852
pushed a commit
to SyedAbdulAzeemSF4852/maui
that referenced
this pull request
Jul 27, 2026
<!-- 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! - Reverts the iOS layout changes from dotnet#34936 for `Default` and `Fixed` `FlyoutHeaderBehavior`. - Restores the prior overlapping ScrollView frame and top content inset, allowing flyout items to scroll behind a semi-transparent header. - Removes the regression test that asserted the reverted behavior. - After merge, backport this commit to `release/10.0.1xx-sr9` for 10.0.90. Fixes dotnet#36249 - `pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Shell"` (203 passed) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This was referenced Aug 3, 2026
kubaflo
pushed a commit
that referenced
this pull request
Aug 7, 2026
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Changes - Enabled the **SafeAreaEdge** category to run on the iOS platform. It was previously excluded due to the changes introduced in #31631 (categoryGroupsToTest). The SafeAreaEdge category has now been added to the common lanes. - Added the Issue32275 iOS 18.5 baseline images. - Updated the baseline image for **VerifyFlyoutWithHeaderFooter** (Issue32275). This test was introduced in #33335, and its baseline image changed after the fix was reverted in #36495, so the screenshot has been re-saved. ### Flaky Test Changes - **LayoutShouldBeCorrectOnFirstNavigation** – Added a small test change to improve the stability of this flaky test. - **VerifyDefaultScrollToRequested** – Removed the VerifyScreenshot call because the existing assertion is sufficient to validate the test.
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.
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!
Summary
DefaultandFixedFlyoutHeaderBehavior.release/10.0.1xx-sr9for 10.0.90.Fixes #36249
Test plan
pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Shell"(203 passed)