Repository navigation
[ci-fix-net11] Fix TopTabUnselectedTextVisibleWhenSwitchingTabs visual regression on Android Material3 - #36911
Conversation
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 36911Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 36911" |
|
Azure Pipelines: Successfully started running 1 pipeline(s). There may be pipelines that require an authorized user to comment /azp run to run. |
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Android ShellContentNavigationFragment navigation container background behavior so that when a Shell content page has no explicit Background, the container uses the Material3 colorSurface value (instead of the generic BackgroundLight / white), aligning behavior with the legacy ShellPageContainer and avoiding a visual regression in Material3 scenarios.
Changes:
- Updated
ConnectAndInitialize()to select the navigation container background based onRuntimeFeature.IsMaterial3Enabled. - Added a Material3 helper (
GetMaterial3Background) that resolves?attr/colorSurfacefrom the active theme. - Added a non-Material3 helper (
GetResourceBackground) that uses Android’sBackgroundLight/BackgroundDarkresources.
|
/azp run maui-pr-uitests |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated no new comments.
Suppressed comments (1)
src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:154
- context.GetActionBarHeight() can return -1 when the theme/attr can't be resolved (ContextExtensions.GetThemeAttributePixels returns -1). Because -1 equals LayoutParams.MatchParent, this changes the fallback behavior from the previous code (which used WrapContent) and could make the TabLayout unexpectedly fill the parent if actionBarSize isn't available. Consider guarding the value and falling back to LP.WrapContent (or another safe default) when the resolved height is <= 0.
int actionBarHeight = context.GetActionBarHeight();
|
/azp run maui-pr-uitests , maui-pr-devicetests |
|
Azure Pipelines: Successfully started running 2 pipeline(s). |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
AI Review Summary
🗂️ Review Sessions — click to expand🚦 Gate — Test Before & After FixGate Result:
|
| Category | Tests | Snapshot diffs |
|---|---|---|
Shell |
181/285 (104 ❌) | 200 diff PNGs |
🔍 AI analysis of failures — PR-related vs unrelated
🔍 AI-generated triage (GitHub Copilot CLI) — a heuristic judgement of whether each deep UI test failure is connected to this PR's changes. Verify before relying on it.
Likely unrelated: the failures appear pre-existing, flaky, or infrastructure.
- ● Unrelated — Catalyst Shell visual snapshot mismatches (100+ tests): the deep run executed on Mac Catalyst, but every PR change is in Android-only Shell handler files, so these catalyst Shell rendering baselines could not be affected by this PR's compiled code.
- ● Unrelated — Catalyst Shell Appium wait timeouts (~4 tests): timeout failures such as
VerifyShellFlyoutBackgroundImageSetNullmatch a common nondeterministic UI/infrastructure pattern, and the Android-only diff is not in scope for this catalyst run.
Strongest signal: all changed files are *.Android.cs, while the failing run is catalyst; re-check catalyst baseline/infrastructure before attributing these failures to the PR.
❌ Shell — 104 failed tests
SearchHandlerBackgroundColorResetsToDefault
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerBackgroundColorApplied.png (16.76% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
at Microsoft.Maui.TestCases.Tests.Issues.Issue35088.SearchHandlerBackgroundColorResetsToDefault() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue35088.cs:line 34
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
VerifyExistingTabTitle
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyExistingTabTitle.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullab
...
ShellPages_PresentationModeModalAnimated
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellPages_PresentationModeModalAnimated.png (21.96% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1
...
EnsureCustomFlyoutIconColor
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: EnsureCustomFlyoutIconColor.png (15.68% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, N
...
VerifyShellFlyout_HeightAndWidthWithBackgroundColor
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_HeightAndWidthWithBackgroundColor.png (18.19% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_HeightAndWidthWithBackgroundColor() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 938
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig,
...
ShellPages_IsVisibleFalse
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellPages_IsVisibleFalse.png (15.21% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nul
...
Shell_Issue21916
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: Shell_Issue21916.png (15.92% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1 r
...
VerifyShellFlyoutBackgroundImageSetNull
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 797
at Microsoft.Maui.TestCases.Tests.Issues.Issue21472.VerifyShellFlyoutBackgroundImageSetNull() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21472.cs:line 29
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandle
...
ShellFlyoutIconShouldNotBeBlack
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellFlyoutIconShouldNotBeBlack.png (15.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDela
...
ClickingOnTabToPopToRootDoesntBreakNavigation
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, String marked, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 797
at Microsoft.Maui.TestCases.Tests.Issues.Issue9006.ClickingOnTabToPopToRootDoesntBreakNavigation() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue9006.cs:line 35
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHa
...
BackButtonBehaviorIsVisibleWorksWithCustomIcon
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: BackButtonBehaviorIsVisibleWorksWithCustomIcon.png (15.58% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nulla
...
ForegroundColorShouldbeSetandCustomIconAlignedProperly
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ForegroundColorShouldbeSetandCustomIconAlignedProperly.png (15.51% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String nam
...
ShellPages_PresentationModeNotAnimated
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellPages_PresentationModeNotAnimated.png (15.59% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 re
...
VerifyShellFlyout_FlyoutVerticalScrollModeDisabled
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_FlyoutVerticalScrollModeDisabled.png (15.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_FlyoutVerticalScrollModeDisabled() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 641
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BO
...
VerifyShellFlyout_BackgroundImageSetToNull
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_BackgroundImageSetToNull.png (15.85% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_BackgroundImageSetToNull() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 660
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor
...
BottomTabColorTest
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: BottomTabColorTest.png (15.63% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullable`1
...
ShellBadgeMultipleTabsCanHaveBadges
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellBadgeMultipleTabsCanHaveBadges.png (16.03% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retry
...
VerifySearchHandlerPlaceholderText
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifySearchHandlerPlaceholderText.png (15.63% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryD
...
VerifyShellFlyout_BackgroundImageAspect_AspectFit
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_BackgroundImageAspect_AspectFit.png (15.95% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_BackgroundImageAspect_AspectFit() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 555
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL
...
VerifyShellFlyout_DisplayOptionsAsMultipleItems
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_DisplayOptionsAsMultipleItems.png (15.81% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_DisplayOptionsAsMultipleItems() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 441
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isC
...
ShellBackButtonBehaviorShouldWork
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellBackButtonBehaviorShouldWork.png (15.65% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDe
...
PopLogicExecutesWhenUsingBackButtonBehavior
System.TimeoutException : Timed out waiting for element...
at UITest.Appium.HelperExtensions.Wait(Func`1 query, Func`2 satisfactory, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2761
at UITest.Appium.HelperExtensions.WaitForAtLeastOne(Func`1 query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2788
at UITest.Appium.HelperExtensions.WaitForElement(IApp app, IQuery query, String timeoutMessage, Nullable`1 timeout, Nullable`1 retryFrequency, Nullable`1 postTimeout) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 929
at UITest.Appium.HelperExtensions.TapBackArrow(IApp app, IQuery query) in /_/src/TestUtils/src/UITest.Appium/HelperExtensions.cs:line 2313
at UITest.Appium.HelperExtensions.TapBackArrow(IApp app, String customBackButtonIdentifier) in /_/src/TestUtils/src/UITest.Appium/HelperExte
...
ShellBadgeCanBeCleared
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellBadgeCanBeCleared.png (16.03% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDelay, Nullab
...
SearchHandlerVisibilityChangesToCollapsible
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: SearchHandlerVisibilityChangesToCollapsible.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable
...
EnsureFlyoutIconWithForegroundColor
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: EnsureFlyoutIconWithForegroundColor.png (15.67% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retry
...
VerifyDynamicFlyoutIconBackgroundColor
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyDynamicFlyoutIconBackgroundColor.png (20.08% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 re
...
VerifyShellFlyout_DisplayOptionsWithHeaderTemplateAndFooterTemplate
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_DisplayOptionsWithHeaderTemplateAndFooterTemplate.png (24.96% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_DisplayOptionsWithHeaderTemplateAndFooterTemplate() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 914
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** argu
...
ShellPages_PresentationModeModalNotAnimated
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: ShellPages_PresentationModeModalNotAnimated.png (21.97% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable
...
TabBarIconsShouldAutoscaleShell
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: TabBarIconsShouldAutoscaleShell.png (15.53% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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 123
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 485
at Microsoft.Maui.TestCases.Tests.UITest.VerifyScreenshot(String name, Nullable`1 retryDela
...
VerifyShellFlyout_Height
VisualTestUtils.VisualTestFailedException :
Snapshot different than baseline: VerifyShellFlyout_Height.png (15.94% difference)
If the correct baseline has changed (this isn't a a bug), then update the baseline image.
See test attachment or download the build artifacts to get the new snapshot file.
More info: https://aka.ms/visual-test-workflow
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, Boolean includeTitleBar) in /_/src/Controls/tests/TestCases.Shared.Tests/UITest.cs:line 296
at Microsoft.Maui.TestCases.Tests.ShellFeatureTests.VerifyShellFlyout_Height() in /_/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/ShellFeatureMatrixTests.cs:line 479
at System.RuntimeMethodHandle.InvokeMethod(ObjectHandleOnStack target, Void** arguments, ObjectHandleOnStack sig, BOOL isConstructor, ObjectHandleOnStack result)
at
...
(+74 more — see TRX in artifact)
📎 Download drop-deep-uitests artifact (TRX + snapshot diffs)
📋 Pre-Flight — Context & Validation
Issue: #36856 - [ci-scan-net11] [CI] TopTabUnselectedTextVisibleWhenSwitchingTabs fails on Android Material3 (visual regression, 3.07% snapshot difference)
PR: #36911 - [ci-fix-net11] Fix TopTabUnselectedTextVisibleWhenSwitchingTabs visual regression on Android Material3
Platforms Affected: Android runtime code; requested test platform Catalyst cannot exercise the changed .Android.cs code paths
Files Changed: 2 implementation, 0 test
Key Findings
- PR addresses an Android Material3 Shell visual regression where
Issue35125.TopTabUnselectedTextVisibleWhenSwitchingTabsdiffered from baseline by 3.07% on Android API 36 Material3. - The main fix changes
ShellContentNavigationFragment.Android.csso a Shell root page with no explicit background uses Material3colorSurfaceinstead of AndroidBackgroundLight, matching legacyShellPageContainerbehavior. - The PR also changes
ShellSectionHandler.Android.cstop-tab sizing from a local typed-arrayactionBarSizelookup withLP.WrapContentfallback tocontext.GetActionBarHeight(). - No tests were detected by the pre-run gate. The requested Catalyst platform is not relevant for Android-only runtime changes.
Code Review Summary
Verdict: NEEDS_CHANGES
Confidence: low
Errors: 1 | Warnings: 0 | Suggestions: 0
Key code review findings:
- ✗
src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:157—context.GetActionBarHeight()can return/cache-1; because-1isLayoutParams.MatchParent, the top-tabTabLayoutcan fill the parent instead of falling back toLP.WrapContent.
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| PR | PR #36911 | Set ShellContent navigation container background to Material3 colorSurface for null-background root pages; replace top-tab typed-array height lookup with context.GetActionBarHeight() |
ShellContentNavigationFragment.Android.cs, ShellSectionHandler.Android.cs |
Original PR; code review found top-tab fallback regression risk |
🔬 Code Review — Deep Analysis
Code Review — PR #36911
Independent Assessment
What this changes: Android Shell content containers now use Material3 colorSurface for default backgrounds, and Shell top-tab height now uses Context.GetActionBarHeight().
Inferred motivation: Restore visual parity with legacy Shell renderer for Material3 Android Shell.
Reconciliation with PR Narrative
Author claims: Fixes Android Material3 Shell top-tab visual regression by matching legacy background behavior.
Agreement/disagreement: Background fix matches the claim; the top-tab height refactor is not behavior-preserving.
Prior Review Reconciliation
| Prior ❌ Error Finding | Source | Status | Evidence |
|---|---|---|---|
GetActionBarHeight() can return -1, causing MatchParent tab height |
MauiBot AI Summary / prior Copilot suppressed comment | ❌ Unresolved | Current PR head still has int actionBarHeight = context.GetActionBarHeight(); at ShellSectionHandler.Android.cs:157. |
Blast Radius Assessment
- Runs for all instances: Yes — Android Shell sections/top tabs and Shell content pages with null backgrounds.
- Startup impact: Yes — handler/platform element creation.
- Static/shared state: Yes —
GetActionBarHeight()caches_actionBarHeight.
CI Status
- Required-check result:
gh pr checks --requiredunavailable (ghunauthenticated). Public PR discussion shows prior deep UI tests passed for Shell, but required-check state was not available locally. - Classification: undetermined.
- Action taken: confidence capped low.
Findings
❌ Error — Top-tab height can become MatchParent
src/Controls/src/Core/Handlers/Shell/ShellSectionHandler.Android.cs:157
The removed code used typedArray.GetDimensionPixelSize(0, LP.WrapContent), preserving a safe WrapContent fallback when actionBarSize is unresolved. context.GetActionBarHeight() calls GetThemeAttributePixels(...), which returns -1 if the theme/attribute cannot resolve, and -1 is Android LayoutParams.MatchParent. A custom/nonstandard theme can therefore make the top TabLayout fill its parent and cover/shift Shell content. Guard non-positive heights or keep the typed-array fallback.
External Output Contract
| Consumer token/pattern | Producer location | Producer emission condition | Consumer assumption | Ordinary negative case | Downstream effect |
|---|---|---|---|---|---|
| N/A | N/A | No changed code classifies external tool output | N/A | N/A | N/A |
Failure-Mode Probing
- Missing
actionBarSize: helper returns/caches-1; tab height becomesMatchParent. - Reconnect/theme reuse: cached
_actionBarHeightcan propagate the first unresolved value globally. - Null page background: Material3 background path matches legacy pattern.
- Handler lifecycle: no new subscriptions/disposal paths added.
Verdict: NEEDS_CHANGES
Confidence: low
Summary: The Material3 background fix looks sound, but the top-tab height refactor introduces a concrete Android layout regression. CI state is undetermined from this unauthenticated environment, so this cannot be LGTM.
🛠️ Fix — Analysis & Comparison
Fix Candidates
| # | Source | Approach | Test Result | Files Changed | Notes |
|---|---|---|---|---|---|
| 1 | maui-expert-reviewer | Move default Material3 backing color to Shell section host and restore typed-array top-tab fallback | 2 files | Catalyst cannot exercise Android-only changes; approach is broader and can affect transparent Shell content | |
| 2 | maui-expert-reviewer | Apply default background to current page platform view after NavigationFinished; locally clamp invalid top-tab height |
2 files | Catalyst build setup failed; possible first-frame flicker and shared helper remains bad for other callers | |
| 3 | maui-expert-reviewer | Add optional MauiNavHostFragment background provider and fix GetActionBarHeight() globally |
3 files | Android build setup failed after restore retry; broad Core navigation/helper change not demonstrably better | |
| 4 | maui-expert-reviewer | Use Shell-specific NavigationViewFragment first-frame default background and LP.WrapContent top-tab height |
1 file | Android build setup failed; WrapContent may regress historical 56dp tab height |
|
| PR | PR #36911 | Container-level Material3 background plus context.GetActionBarHeight() top-tab refactor |
2 files | Original PR; has unresolved code-review error in top-tab fallback |
Cross-Pollination
| Model | Round | New Ideas? | Details |
|---|---|---|---|
| maui-expert-reviewer | 1 | Yes | Candidate 1: Shell section host backing surface; learned it is too broad and not Catalyst-testable |
| maui-expert-reviewer | 2 | Yes | Candidate 2: page platform view after navigation; learned it may be too late for first frame and leaves shared cache issue |
| maui-expert-reviewer | 3 | Yes | Candidate 3: nav-host provider plus global helper fix; learned it is broad infrastructure and build validation is blocked |
| maui-expert-reviewer | 4 | Yes | Candidate 4: Shell-specific navigation fragment; learned remaining small strategy has top-tab height behavior risk and is still Android-only |
Exhausted: Yes
Selected Fix: None — no candidate passed all tests. The most actionable improvement over the PR is to remove or guard the ShellSectionHandler.Android.cs context.GetActionBarHeight() refactor, because the background parity change appears aligned with the issue but the top-tab height change has a concrete regression mechanism.
📝 Recommended PR Title & Description
Assessment: ✏️ Recommend updating — the current description accurately explains the background fix, but it still describes the raw ShellSectionHandler GetActionBarHeight() refactor even though the winning fix should preserve the previous safe top-tab actionBarSize fallback.
Recommended title
[Android] Shell: Fix Material3 top-tab background regression
Recommended description
### Issue Details:
The TopTabUnselectedTextVisibleWhenSwitchingTabs test failed in .NET 11 because ShellHandler is enabled by default. The failure does not occur when using ShellRenderer.
In the ShellHandler implementation, ShellContentNavigationFragment.ConnectAndInitialize() was setting the navigation container background to BackgroundLight (white, #FFFFFF) for all light-mode scenarios. In contrast, the previous ShellPageContainer implementation used ?attr/colorSurface (#FEF7FF) from Material3.
### Description of Change
* Added GetMaterial3Background() — resolves ?attr/colorSurface (#FEF7FF) matching ShellPageContainer
* Added GetResourceBackground() — returns BackgroundLight/BackgroundDark for non-Material3
* Updated ConnectAndInitialize() to call these helpers via RuntimeFeature.IsMaterial3Enabled when the Shell root page has no explicit Background
* Preserved the existing top-tab TabLayout actionBarSize resolution/fallback behavior so unresolved actionBarSize values do not become MatchParent layout heights
### Issues Fixed
Fixes #36856
🏁 Report — Final Recommendation
Comparative Report — PR #36911
Candidate ranking
| Rank | Candidate | Test result | Assessment |
|---|---|---|---|
| 1 | pr-plus-reviewer |
Not run / blocked by Android-only change and Catalyst platform | Best available candidate. It keeps the PR's targeted Material3 colorSurface parity fix and applies the expert review feedback by restoring a safe top-tab actionBarSize fallback. |
| 2 | pr |
Gate skipped: no tests detected | The background fix is targeted and matches the legacy renderer behavior, but the GetActionBarHeight() top-tab refactor has a concrete -1 == MatchParent regression mechanism. |
| 3 | try-fix-2 |
Blocked | Addresses the top-tab issue with a local non-positive guard, but moves background application until NavigationFinished, which may be too late for the first visual frame and still leaves the shared helper able to cache invalid values for other callers. |
| 4 | try-fix-3 |
Blocked | Fixes the shared helper globally and moves background handling to nav-host infrastructure, but it is broad Core Android navigation work without compile or visual validation. |
| 5 | try-fix-4 |
Blocked | Avoids the helper issue and applies a Shell-specific page-fragment background, but changes top-tab height to WrapContent, risking the historical 56dp/actionBarSize layout. |
| 6 | try-fix-1 |
Blocked | Restores the typed-array fallback but colors the Shell section host broadly, which can affect transparent Shell content beyond the targeted root-page null-background case. |
Decision
Winner: pr-plus-reviewer
No candidate passed regression tests; all alternative try-fix candidates were blocked, and the raw PR gate was skipped. Among candidates without passing validation, the safest choice is the one that preserves the narrow, issue-directed Material3 background fix while removing the concrete reviewer-identified top-tab layout regression. pr-plus-reviewer does that with the smallest behavioral surface.
Why not the raw PR?
The raw PR changes ShellSectionHandler.Android.cs from a local typed-array actionBarSize lookup with LP.WrapContent fallback to context.GetActionBarHeight(). GetActionBarHeight() currently caches the raw GetThemeAttributePixels(Resource.Attribute.actionBarSize) value; if unresolved, that value can be -1, which Android interprets as LayoutParams.MatchParent when assigned to TabLayout.LayoutParameters.Height. That is a concrete layout regression risk unrelated to the Material3 visual-background fix.
Why not a try-fix candidate?
The try-fix candidates explored broader placement/timing alternatives for the default background and different ways to address top-tab sizing, but none had successful validation. The broader candidates either changed where transparent Shell content can show through, applied the default background later than the first frame, modified shared Android navigation/helper infrastructure, or changed top-tab height semantics. With no passing regression evidence, those broader changes rank below the targeted PR fix plus the expert review correction.
🧭 Next Steps — review latest findings
No alternative fix was selected for this run. Review the session findings and CI results before merging.
This comment has been minimized.
This comment has been minimized.
Tests Failure Analysis
Test Failure Review: Needs human investigation - click to expandOverall verdict: Needs human investigation. None of the 16 distinct failures could be attributed as a genuine regression against the base branch (0 regressed-vs-base); 12 of 16 also fail on
Coverage: 141 checks · 134 passing · 7 failing · 0 pending · 0 inaccessible · 1 unmapped · 10 unexplained build legs · 0 unaccounted failing checks · 1 aborted failing checks · 0 canceled-build checks · 7 device-test unverified · 16 unattributed · 0 regressed-vs-base. Deterministic ceiling: Needs human investigation — 16 unattributed failures, 10 unexplained build legs, 1 aborted check, 7 device-test-unverified, and 1 uninspectable failing check. Builds (this PR): maui-pr-devicetests 1534497, maui-pr-uitests 1534496. Base sampling (net11.0, 5 recent builds per definition): devicetests 1535345, uitests 1535443. Recommended actionA human should open the 10 unexplained build legs, the CANCELLED MacCatalyst CollectionView check, and confirm the 7 device-test greens; the base branch is currently red with the same CollectionView timeouts, so re-running against a green base (or re-triggering after base recovers) is advised before merging. |
Issue Details:
The TopTabUnselectedTextVisibleWhenSwitchingTabs test failed in .NET 11 because ShellHandler is enabled by default. The failure does not occur when using ShellRenderer.
In the ShellHandler implementation, ShellContentNavigationFragment.ConnectAndInitialize() sets the navigation container background to BackgroundLight (white, #FFFFFF) for all light-mode scenarios. In contrast, the previous ShellPageContainer implementation used ?attr/colorSurface (#FEF7FF) from Material3.
Description of Change
Issues Fixed
Fixes #36856