[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 |
|
🚀 Dogfood this PR with:
curl -fsSL https://github.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 33335Or
iex "& { $(irm https://github.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 , I have included the test |
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 |
|
/azp run maui-pr-uitests |
|
Azure Pipelines successfully started running 1 pipeline(s). |
🚦 Gate — Test Before and After Fix
🚦 Gate Session —
|
| Test | Without Fix (expect FAIL) | With Fix (expect PASS) |
|---|---|---|
🖥️ Issue32275 Issue32275 |
✅ FAIL — 295s | ❌ FAIL — 167s |
🔴 Without fix — 🖥️ Issue32275: FAIL ✅ · 295s
(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.14] 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
>>>>> 4/15/2026 3:09:29 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 4/15/2026 3:09:29 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 4/15/2026 3:09:35 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 4/15/2026 3:09:35 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)
>>>>> 4/15/2026 3:09:41 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 4/15/2026 3:09:41 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 4/15/2026 3:09:48 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 4/15/2026 3:09:48 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)
>>>>> 4/15/2026 3:09:53 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 4/15/2026 3:09:53 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 4/15/2026 3:09:59 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 4/15/2026 3:09:59 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)
>>>>> 4/15/2026 3:10:04 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 4/15/2026 3:10:04 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 4/15/2026 3:10:11 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 4/15/2026 3:10:11 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)
>>>>> 4/15/2026 3:10:16 AM VerifyCustomFlyoutContentRendering Start
>>>>> 4/15/2026 3:10:16 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 4/15/2026 3:10:25 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 4/15/2026 3:10:25 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)
>>>>> 4/15/2026 3:10:30 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 4/15/2026 3:10:30 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 4/15/2026 3:10:40 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 4/15/2026 3:10:40 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
Total tests: 6
Failed: 6
Test Run Failed.
Total time: 2.1444 Minutes
🟢 With fix — 🖥️ Issue32275: FAIL ❌ · 167s
(truncated to last 15,000 chars)
cts/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.NUnit -> /Users/cloudtest/vss/_work/1/s/artifacts/bin/UITest.NUnit/Debug/net10.0/UITest.NUnit.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.14] 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
>>>>> 4/15/2026 3:12:07 AM VerifyDefaultFlyoutItemsRendering Start
>>>>> 4/15/2026 3:12:07 AM FixtureSetup for VerifyDefaultFlyoutItemsRendering
>>>>> 4/15/2026 3:12:12 AM VerifyDefaultFlyoutItemsRendering Stop
>>>>> 4/15/2026 3:12:12 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyDefaultFlyoutItemsRendering [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/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)
>>>>> 4/15/2026 3:12:20 AM VerifyFlyoutWithHeaderFooter Start
>>>>> 4/15/2026 3:12:20 AM FixtureSetup for VerifyFlyoutWithHeaderFooter
>>>>> 4/15/2026 3:12:26 AM VerifyFlyoutWithHeaderFooter Stop
>>>>> 4/15/2026 3:12:26 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)
>>>>> 4/15/2026 3:12:33 AM VerifyCustomFlyoutContentTemplateRendering Start
>>>>> 4/15/2026 3:12:33 AM FixtureSetup for VerifyCustomFlyoutContentTemplateRendering
>>>>> 4/15/2026 3:12:39 AM VerifyCustomFlyoutContentTemplateRendering Stop
>>>>> 4/15/2026 3:12:39 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)
>>>>> 4/15/2026 3:12:44 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Start
>>>>> 4/15/2026 3:12:44 AM FixtureSetup for VerifyCustomFlyoutContentTemplateWithHeaderFooter
>>>>> 4/15/2026 3:12:52 AM VerifyCustomFlyoutContentTemplateWithHeaderFooter Stop
>>>>> 4/15/2026 3:12:52 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentTemplateWithHeaderFooter [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/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)
>>>>> 4/15/2026 3:12:57 AM VerifyCustomFlyoutContentRendering Start
>>>>> 4/15/2026 3:12:57 AM FixtureSetup for VerifyCustomFlyoutContentRendering
>>>>> 4/15/2026 3:13:07 AM VerifyCustomFlyoutContentRendering Stop
>>>>> 4/15/2026 3:13:07 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentRendering [17 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)
>>>>> 4/15/2026 3:13:15 AM VerifyCustomFlyoutContentWithHeaderFooter Start
>>>>> 4/15/2026 3:13:15 AM FixtureSetup for VerifyCustomFlyoutContentWithHeaderFooter
>>>>> 4/15/2026 3:13:26 AM VerifyCustomFlyoutContentWithHeaderFooter Stop
>>>>> 4/15/2026 3:13:26 AM Log types: syslog, crashlog, performance, safariConsole, safariNetwork, server
Failed VerifyCustomFlyoutContentWithHeaderFooter [18 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.6048 Minutes
⚠️ Issues found
- ❌ Issue32275 FAILED with fix (should pass)
VerifyDefaultFlyoutItemsRendering [13 s]; VerifyFlyoutWithHeaderFooter [13 s]; VerifyCustomFlyoutContentTemplateRendering [11 s]; VerifyCustomFlyoutContentTemplateWithHeaderFooter [12 s]; VerifyCustomFlyoutContentRendering [17 s]; VerifyCustomFlyoutContentWithHeaderFooter [18 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
🤖 AI Summary
📊 Review Session —
|
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #33335 | Refactor LayoutContent() to use explicit contentY/contentHeight; apply safeAreaBottom unconditionally |
❌ FAILED (Gate) | ShellFlyoutLayoutManager.cs |
Snapshots in wrong folder (ios-26/ vs ios/) |
🔧 Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | try-fix (claude-opus-4.6) | Conditional safeAreaBottom (same ShouldHonorSafeArea() gate as top) + generate fresh ios/ snapshots |
✅ PASS | ShellFlyoutLayoutManager.cs + 6 PNGs |
Symmetric SA handling; different from PR's unconditional bottom |
| 2 | try-fix (claude-sonnet-4.6) | Snapshot-only fix — no code change, generate ios/ baselines from original code |
✅ PASS | 6 PNGs only | Tests pass, but baselines reflect unfixed rendering |
| 3 | try-fix (gpt-5.3-codex) | Split SA check: top follows header/content policy, bottom checks ShouldHonorSafeArea(Content) directly |
❌ FAIL | ShellFlyoutLayoutManager.cs |
Baseline size mismatch (1124x2436 vs 1124x2286) after 3 iterations |
| 4 | try-fix (gpt-5.4) | Keep PR's code as-is (unconditional safeAreaBottom) + generate missing ios/ snapshots |
✅ PASS | 6 PNGs only (code unchanged) | PR's code direction preserved; snapshot folder fix is the minimal change |
| PR | PR #33335 | Refactor LayoutContent() with explicit contentY/contentHeight; unconditional safeAreaBottom |
❌ FAILED (Gate) | ShellFlyoutLayoutManager.cs + 6 ios-26/ PNGs |
Gate failed: snapshots in wrong folder (ios-26/ not ios/) |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| claude-opus-4.6 | 2 | No | Attempts 1-4 cover the approach space; snapshot folder fix is the essential change |
| claude-sonnet-4.6 | 2 | No | All approaches converge on fixing the ios/ snapshot folder |
| gpt-5.3-codex | 2 | No | Attempt 3 explored a deeper divergence; failed with size mismatch |
| gpt-5.4 | 2 | No | Confirms PR code + snapshot fix is viable |
Exhausted: Yes
Selected Fix: Candidate #1 (Attempt 1) — Conditional safeAreaBottom + ios/ snapshots
Reason: Most semantically correct: symmetric ShouldHonorSafeArea() for both top and bottom edges prevents breaking apps that opt out of safe area handling. All 6 tests pass. Simpler than PR's refactored two-variable pattern while still fixing the root issue.
📋 Report — Final Recommendation
⚠️ Final Recommendation: REQUEST CHANGES
Phase Status
| Phase | Status | Notes |
|---|---|---|
| Pre-Flight | ✅ COMPLETE | Issue #32275 (iOS flyout SA), 4 impl/test files + 6 PNG snapshots |
| Gate | ❌ FAILED | iOS — all 6 tests fail (snapshots in wrong folder) |
| Try-Fix | ✅ COMPLETE | 4 attempts, 3 passing |
| Report | ✅ COMPLETE |
Summary
PR #33335 fixes iOS Shell Flyout SafeArea rendering by refactoring LayoutContent() in ShellFlyoutLayoutManager.cs to properly apply safe area insets. The code direction is correct, but the PR committed all 6 test snapshots to ios-26/ (iOS 26+ environment) while CI and the local gate run on standard iOS which expects snapshots in ios/. This caused all 6 tests to fail both before and after the fix.
Root Cause
The gate failure is not about the code fix itself — it is entirely a snapshot folder mismatch. The PR added baseline images to src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ but the test environment maps to src/Controls/tests/TestCases.iOS.Tests/snapshots/ios/. All 6 tests reported "Baseline snapshot not yet created" for the ios/ path.
Fix Quality
The code change to LayoutContent() is architecturally sound but has one concern: safeAreaBottom is applied unconditionally in the PR, whereas safeAreaTop is gated by ShouldHonorSafeArea(). This asymmetry could break apps that explicitly set Margin or set IgnoreSafeArea = true on flyout content — they would still have their content cropped at the bottom by the home indicator inset.
Try-fix Attempt 1 demonstrated that making safeAreaBottom conditional (same ShouldHonorSafeArea() gate) also passes all 6 tests and is more consistent with the codebase's existing pattern.
Required Changes
- Add
ios/snapshots — either generate fresh baselines on standard iOS, or copy theios-26/snapshots if the rendering is identical. This is the blocking issue. - Make
safeAreaBottomconditional — use the sameShouldHonorSafeArea()check for the bottom inset to maintain symmetric ISafeAreaView behavior (recommended, but not blocking if intentionally always applied). - Inline
#if IOSin test —Issue32275.csinTestCases.Shared.Testswraps the class in#if IOS. Per guidelines, platform-specific test behavior should be behind extension methods. This is a minor quality issue. - Issue mismatch — Issue [NET10] SafeAreaEdges cannot be set for Shell and the flyout menu collides with display notch and status bar in landscape mode #32275 was reported on Android (landscape mode notch collision). The PR title says
[iOS]but the issue is labeledplatform/android, platform/ios. The Android part of the issue remains open.
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