Skip to content

Revert Shell flyout header layout on iOS - #36495

Merged
rmarinho merged 1 commit into
mainfrom
fix/revert-shell-flyout-header-layout
Jul 10, 2026
Merged

Revert Shell flyout header layout on iOS#36495
rmarinho merged 1 commit into
mainfrom
fix/revert-shell-flyout-header-layout

Conversation

@kubaflo

@kubaflo kubaflo commented Jul 10, 2026

Copy link
Copy Markdown
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!

Summary

  • Reverts the iOS layout changes from Fix Shell flyout items scrolling behind FlyoutHeader on iOS #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 #36249

Test plan

  • pwsh .github/skills/run-device-tests/scripts/Run-DeviceTests.ps1 -Project Controls -Platform ios -TestFilter "Category=Shell" (203 passed)

Restore the overlapping scroll view and top content inset behavior for Default and Fixed FlyoutHeaderBehavior values.

Fixes #36249

Reverts #34936

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: cf5a6299-1e58-4157-b7fd-b85efaa14755
Copilot AI review requested due to automatic review settings July 10, 2026 10:18
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:18 — with GitHub Actions Inactive
@github-actions

Copy link
Copy Markdown
Contributor

🚀 Dogfood this PR with:

⚠️ WARNING: Do not do this without first carefully reviewing the code of this PR to satisfy yourself it is safe.

curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36495

Or

  • Run remotely in PowerShell:
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36495"

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:18 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:18 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:20 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:21 — with GitHub Actions Inactive
@github-actions github-actions Bot added area-controls-shell Shell Navigation, Routes, Tabs, Flyout platform/ios labels Jul 10, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 flyout UIScrollView and use ContentInset.Top to offset items.
  • Updated ShellFlyoutTests expectations 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
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool July 10, 2026 10:21 — with GitHub Actions Inactive
@rmarinho
rmarinho merged commit 208a6ba into main Jul 10, 2026
12 of 21 checks passed
@rmarinho
rmarinho deleted the fix/revert-shell-flyout-header-layout branch July 10, 2026 10:41
@github-actions github-actions Bot added this to the .NET 10 SR9 milestone Jul 10, 2026
@kubaflo

kubaflo commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

/backport to release/10.0.1xx-sr9

@github-actions

Copy link
Copy Markdown
Contributor

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

rmarinho pushed a commit that referenced this pull request Jul 10, 2026
Backport of #36495 to release/10.0.1xx-sr9

/cc @kubaflo

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
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>
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.
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 10, 2026
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 platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlyoutHeader and FlyoutFooter broken in .NET 10 MAUI

4 participants