[iOS] Fix Shell Flyout SafeArea Rendering#33335
[iOS] Fix Shell Flyout SafeArea Rendering#33335devanathan-vaithiyanathan wants to merge 12 commits intodotnet:mainfrom
Conversation
|
/azp run maui-pr |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR fixes issue #32275 where Shell FlyoutItems were rendering inside the SafeArea on Android and iOS instead of respecting safe area insets in both portrait and landscape orientations. The fix simplifies the flyout layout logic on both platforms by removing complex conditional safe area handling and applying safe area insets more consistently.
Key Changes
- Simplified iOS flyout content layout to unconditionally apply safe area insets
- Removed iOS ScrollView content inset management logic
- Simplified Android window inset handling to apply uniform padding
- Fixed iOS footer positioning to account for bottom safe area insets
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs | Removed SetHeaderContentInset body and simplified LayoutContent to unconditionally apply safe area insets to all flyout content |
| src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutContentRenderer.cs | Updated footer positioning to account for bottom safe area insets |
| src/Controls/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs | Simplified WindowsListener class by removing complex conditional padding logic and unused properties, now applies uniform padding to CoordinatorLayout |
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs
Outdated
Show resolved
Hide resolved
...ontrols/src/Core/Compatibility/Handlers/Shell/Android/ShellFlyoutTemplatedContentRenderer.cs
Show resolved
Hide resolved
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 33335Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 33335" |
Co-Authored-By: Copilot <223556219+Copilot@users.noreply.github.com>
522d845 to
27bec87
Compare
kubaflo
left a comment
There was a problem hiding this comment.
Could you please review the ai summary comment?
🤖 AI Summary📊 Expand Full Review —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33335 | Apply safeAreaTop conditionally + safeAreaBottom unconditionally; fix contentHeight arithmetic |
❌ FAILED (Gate) | ShellFlyoutLayoutManager.cs |
Snapshots in wrong folder (ios-26 instead of ios) |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-opus-4.6) | Keep contentYOffset pattern; gate safeAreaBottom via ShouldHonorSafeArea(Content); copy snapshots to ios/ |
✅ PASS | ShellFlyoutLayoutManager.cs +17/-5, 6 PNGs |
Symmetric top/bottom gating; minimal delta from original |
| 2 | try-fix (claude-sonnet-4.6) | Extract GetSafeAreaAdjustedBounds() in LayoutParallax; pre-adjust bounds before LayoutContent; clean separation |
✅ PASS | ShellFlyoutLayoutManager.cs +32/-14, 6 PNGs |
LayoutContent has zero safe area logic — cleanest architecture |
| 3 | try-fix (gpt-5.3-codex) | Edge-aware ISafeAreaView2.GetSafeAreaRegionsForEdge() gating + convert tests from VerifyScreenshot() to GetRect() geometry assertions |
✅ PASS | ShellFlyoutLayoutManager.cs, Issue32275.cs |
Most robust tests; no snapshot baseline dependency |
| 4 | try-fix (gpt-5.4, sub for gemini) | Per-view SafeAreaInsets from _contentView instead of window-level |
❌ BLOCKED | ShellFlyoutLayoutManager.cs |
Test execution timed out; approach theoretically sound |
| PR | PR #33335 | safeAreaTop conditional, safeAreaBottom unconditional; refactor to contentY/contentHeight; snapshots in ios-26/ only |
❌ FAILED (Gate) | ShellFlyoutLayoutManager.cs, 6 snapshots in wrong folder |
Two bugs: asymmetric gating + wrong snapshot folder |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | Yes | Delegate safeAreaBottom to UIKit scroll insets via SetHeaderContentInset (match how header parallax insets work) |
| claude-sonnet-4.6 | 2 | Yes | Footer-aware gate: FooterView is null && ShouldHonorSafeArea(Content) + version-fallback snapshot resolver |
| gpt-5.3-codex | 2 | Yes | Move bottom inset ownership to ScrollView.ContentInset to avoid frame-shrinking side effects |
| gpt-5.4 | 2 | Yes | Use SafeAreaLayoutGuide.LayoutFrame instead of manual inset math |
Additional ideas noted but not run — 3 passing candidates already demonstrate sufficient coverage of the solution space.
Exhausted: Yes (4 models ran, 3 passed, new ideas diverge into architectural directions not required for this targeted fix)
Selected Fix: Attempt 1 — Minimal-diff: gate safeAreaBottom symmetrically with ShouldHonorSafeArea(Content), copy snapshots to ios/
Comparison:
| Criterion | Attempt 1 | Attempt 2 | Attempt 3 | PR |
|---|---|---|---|---|
| Tests pass | ✅ | ✅ | ✅ | ❌ |
| Minimal diff | ✅ (smallest) | n/a | ||
| Correct bottom gating | ✅ | ✅ | ✅ | ❌ |
Snapshot in ios/ |
✅ | ✅ | ✅ (no snapshot) | ❌ |
| Style match | ✅ (original pattern) | ✅ | ✅ | ✅ |
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #32275, iOS flyout safe area, platform mismatch noted |
| Gate | ❌ FAILED | iOS — snapshots in ios-26/ not found by test runner looking in ios/ |
| Try-Fix | ✅ COMPLETE | 4 attempts, 3 passing |
| Report | ✅ COMPLETE |
Summary
PR #33335 fixes an iOS ShellFlyoutLayoutManager.LayoutContent() bug where flyout content was not respecting bottom safe area insets. The fix approach in the implementation is directionally correct — LayoutContent() should account for both top and bottom safe area. However, the PR has two blocking issues that prevent it from merging: (1) safeAreaBottom is applied unconditionally while safeAreaTop is gated on ShouldHonorSafeArea(), creating an asymmetry that is a potential behavioral regression for apps with explicit margins or IgnoreSafeArea=true; and (2) all 6 test snapshot baselines were added to snapshots/ios-26/ only, while the gate test runner looks for them in snapshots/ios/, causing every VerifyScreenshot() call to fail.
An independent fix (Attempt 1) confirms the root cause: gating safeAreaBottom with ShouldHonorSafeArea(Content) — matching the existing safeAreaTop behavior — plus ensuring snapshots exist in snapshots/ios/, makes all 6 tests pass.
Root Cause
safeAreaBottomasymmetry:LayoutContent()inShellFlyoutLayoutManager.cs(line 321):nfloat safeAreaBottom = safeAreaInsets.Bottom;— no guard. Should be:nfloat safeAreaBottom = (ShouldHonorSafeArea(Content) || Content is null) ? safeAreaInsets.Bottom : 0;- Wrong snapshot folder: 6 PNG files added to
src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/but test runner resolvessnapshots/ios/. PRs targetingmainmust use theios/folder for gate-compatible baselines.
Fix Quality
The PR's implementation refactoring (splitting contentYOffset into contentY/contentHeight) is a genuine improvement — the original code's arithmetic was implicit and the new separation is clearer. The contentHeight -= HeaderView.Frame.Height when ScrollView is null (line 333) was a pre-existing height bug that this PR also silently fixes. The ShellFlyoutContentBase extraction is a clean structural change.
The two required changes are small and targeted:
- Add the
ShouldHonorSafeArea()guard onsafeAreaBottom(1 line) - Move/copy the 6 snapshot PNGs from
ios-26/toios/(or add them toios/)
Note on scope: Issue #32275 was reported on Android (landscape mode, flyout collides with notch). The PR only touches iOS code. The Android-specific flyout safe area issue is not addressed here. This PR should update its scope to iOS-only or also fix the Android path.
Test quality concern: All 6 tests use VerifyScreenshot() only — no positional GetRect() assertions. This makes tests fragile to rendering variance and doesn't prove content is not hidden behind the notch. Consider adding GetRect() checks (as demonstrated in Attempt 3) to verify content is within safe bounds.
@kubaflo , I have included the test |
🚦 Gate - Test Before and After Fix📊 Expand Full Gate —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue32275 Issue32275 |
✅ FAIL — 265s | ❌ FAIL — 155s |
🔴 Without fix — 🖥️ Issue32275: FAIL ✅ · 265s
(truncated to last 15,000 chars)
t.NUnit/Debug/net10.0/UITest.NUnit.dll
VisualTestUtils.MagickNet -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.04] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.12] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 6 of 6 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/31/2026 8:41:53 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 3/31/2026 8:41:53 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 3/31/2026 8:41:59 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 3/31/2026 8:41:59 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyDefaultFlyoutItemsRendering [11 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyoutItemsRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyDefaultFlyoutItemsRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyDefaultFlyoutItemsRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 25
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:42:05 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 3/31/2026 8:42:05 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 3/31/2026 8:42:11 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 3/31/2026 8:42:11 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyFlyoutWithHeaderFooter [11 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyFlyoutWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyFlyoutWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyFlyoutWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 39
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:42:17 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 3/31/2026 8:42:17 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 3/31/2026 8:42:23 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 3/31/2026 8:42:23 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentTemplateRendering [10 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 51
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:42:27 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 3/31/2026 8:42:27 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 3/31/2026 8:42:34 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 3/31/2026 8:42:34 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentTemplateWithHeaderFooter [11 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 67
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>>>>> 3/31/2026 8:42:38 AM VerifyCustomFlyoutContentRendering Start
>>>>> 3/31/2026 8:42:38 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 3/31/2026 8:42:47 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 3/31/2026 8:42:47 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentRendering [14 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 80
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>>>>> 3/31/2026 8:42:52 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 3/31/2026 8:42:52 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 3/31/2026 8:43:02 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 3/31/2026 8:43:02 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentWithHeaderFooter [14 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 97
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
NUnit Adapter 4.5.0.0: Test execution complete
Total tests: 6
Failed: 6
Test Run Failed.
Total time: 2.0442 Minutes
🟢 With fix — 🖥️ Issue32275: FAIL ❌ · 155s
(truncated to last 15,000 chars)
cts/bin/VisualTestUtils.MagickNet/Debug/netstandard2.0/VisualTestUtils.MagickNet.dll
UITest.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.dll
UITest.Appium -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Appium/Debug/net10.0/UITest.Appium.dll
UITest.Analyzers -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.Analyzers/Debug/netstandard2.0/UITest.Analyzers.dll
Controls.TestCases.iOS.Tests -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
Test run for /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll (.NETCoreApp,Version=v10.0)
VSTest version 18.0.1 (arm64)
Starting test execution, please wait...
A total of 1 test files matched the specified pattern.
/Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
[xUnit.net 00:00:00.00] xUnit.net VSTest Adapter v2.8.2+699d445a1a (64-bit .NET 10.0.0)
[xUnit.net 00:00:00.05] Discovering: Controls.TestCases.iOS.Tests
[xUnit.net 00:00:00.13] Discovered: Controls.TestCases.iOS.Tests
NUnit Adapter 4.5.0.0: Test execution started
Running selected tests in /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/Controls.TestCases.iOS.Tests.dll
NUnit3TestExecutor discovered 6 of 6 NUnit test cases using Current Discovery mode, Non-Explicit run
>>>>> 3/31/2026 8:44:22 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 3/31/2026 8:44:22 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 3/31/2026 8:44:28 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 3/31/2026 8:44:28 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyDefaultFlyoutItemsRendering [12 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyoutItemsRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyDefaultFlyoutItemsRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyDefaultFlyoutItemsRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 25
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:44:35 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 3/31/2026 8:44:35 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 3/31/2026 8:44:42 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 3/31/2026 8:44:42 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyFlyoutWithHeaderFooter [13 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyFlyoutWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyFlyoutWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyFlyoutWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 39
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:44:48 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 3/31/2026 8:44:48 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 3/31/2026 8:44:55 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 3/31/2026 8:44:55 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentTemplateRendering [11 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 51
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)
>>>>> 3/31/2026 8:45:00 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 3/31/2026 8:45:00 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 3/31/2026 8:45:07 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 3/31/2026 8:45:07 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentTemplateWithHeaderFooter [11 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentTemplateWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentTemplateWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 67
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>>>>> 3/31/2026 8:45:11 AM VerifyCustomFlyoutContentRendering Start
>>>>> 3/31/2026 8:45:11 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 3/31/2026 8:45:20 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 3/31/2026 8:45:20 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentRendering [14 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentRendering.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentRendering.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentRendering() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 80
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
>>>>> 3/31/2026 8:45:26 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 3/31/2026 8:45:26 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 3/31/2026 8:45:36 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 3/31/2026 8:45:36 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentWithHeaderFooter [16 s]
Error Message:
VisualTestUtils.VisualTestFailedException :
Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
Ensure new snapshot is correct: /Users/cloudtest/vss/_work/1/a/Controls.TestCases.Shared.Tests/snapshots-diff/ios/VerifyCustomFlyoutContentWithHeaderFooter.png
and if it is, push a change to add it to the 'snapshots' directory.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
Stack Trace:
at VisualTestUtils.VisualRegressionTester.Fail(String message) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 162
at VisualTestUtils.VisualRegressionTester.VerifyMatchesSnapshot(String name, ImageSnapshot actualImage, String environmentName, ITestContext testContext) in /_/src/TestUtils/src/VisualTestUtils/VisualRegressionTester.cs:line 84
at Microsoft.Maui.TestCases.Tests.UITest.<VerifyScreenshot>g__Verify|13_0(String name, <>c__DisplayClass13_0&) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 477
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 retryTimeout, Int32 cropLeft, Int32 cropRight, Int32 cropTop, Int32 cropBottom, Double tolerance) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 309
at Microsoft.Maui.TestCases.Tests.Issues.Issue32275.VerifyCustomFlyoutContentWithHeaderFooter() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32275.cs:line 97
at System.Reflection.MethodBaseInvoker.InterpretedInvoke_Method(Object obj, IntPtr* args)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
NUnit Adapter 4.5.0.0: Test execution complete
Test Run Failed.
Total tests: 6
Failed: 6
Total time: 1.4801 Minutes
⚠️ Issues found
- ❌ Issue32275 FAILED with fix (should pass)
VerifyDefaultFlyoutItemsRendering [12 s]; VerifyFlyoutWithHeaderFooter [13 s]; VerifyCustomFlyoutContentTemplateRendering [11 s]; VerifyCustomFlyoutContentTemplateWithHeaderFooter [11 s]; VerifyCustomFlyoutContentRendering [14 s]; VerifyCustomFlyoutContentWithHeaderFooter [16 s]VisualTestUtils.VisualTestFailedException : Baseline snapshot not yet created: /Users/cloudtest/vss/_work/1/s/artifacts/bin/Controls.TestCases.iOS.Tests/Debug/net10.0/snapshots/ios/VerifyDefaultFlyou...
📁 Fix files reverted (2 files)
eng/pipelines/ci-copilot.ymlsrc/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellFlyoutLayoutManager.cs
kubaflo
left a comment
There was a problem hiding this comment.
Could you please add snapshots?
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
@kubaflo , I have added the snapshots |
Issue Details
On iOS, Shell FlyoutItems are rendered inside the SafeArea.
Description of Change
Updated the Shell Flyout layout logic to ensure FlyoutItems are consistently rendered within the SafeArea for both portrait and landscape modes.
Issues Fixed
Fixes #32275
Output Screenshot
iOS-Before.mov
iOS-After.mov