Repository navigation
[Net11][iOS][Test Failure] Fix missing Shell top tab after navigation appearance reset - #39752
Merged
Merged
Conversation
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:42 — with
GitHub Actions
Inactive
Contributor
|
🚀 Dogfood this PR with:
curl -fsSL https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.sh | bash -s -- 39752Or
iex "& { $(irm https://raw.githubusercontent.com/dotnet/maui/main/eng/scripts/get-maui-pr.ps1) } 39752" |
This comment has been minimized.
This comment has been minimized.
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:42 — with
GitHub Actions
Inactive
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:43 — with
GitHub Actions
Inactive
Contributor
|
Hey there @@Shalini-Ashokan! Thank you so much for your PR! Someone from the team will get assigned to your PR shortly and we'll get it reviewed. |
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:45 — with
GitHub Actions
Inactive
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:46 — with
GitHub Actions
Inactive
sheiksyedm
marked this pull request as ready for review
October 29, 2026 10:47
Shalini-Ashokan
temporarily deployed
to
copilot-pat-pool
October 29, 2026 10:47 — with
GitHub Actions
Inactive
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
Both reset-test cases still expect translucency to return to true, but brush-only appearances set it to false and reset now leaves it unchanged.
1 open issue
What changed in this PR
This PR addresses the missing Shell top tab after navigation by stopping navigation-bar appearance reset from restoring translucency, reversing that part of #37137.
Changes:
- Removes the saved translucency field, its capture, and its restoration.
- Preserves existing color and native-appearance restoration.
| File | Description |
|---|---|
src/Controls/src/Core/Compatibility/Handlers/Shell/iOS/ShellNavBarAppearanceTracker.cs |
Leaves translucency unchanged when resetting the Shell navigation-bar appearance. |
Review effort: Balanced
| @@ -33,7 +32,6 @@ public void ResetAppearance(UINavigationController controller) | |||
| navBar.BarTintColor = _defaultBarTint; | |||
| navBar.TintColor = _defaultTint; | |||
| navBar.TitleTextAttributes = _defaultTitleAttributes; | |||
kubaflo
approved these changes
Oct 29, 2026
3 tasks
kubaflo
added a commit
that referenced
this pull request
Oct 29, 2026
<!-- !!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING MAIN. !!!!!!! --> ### Description of Change I have added the correct base/resave images and removed the diff image that was accidentally committed. **Shell flyout selection background not applied** The PR #35491 introduced Shell.BackgroundProperty, causing the Shell-derived test page’s unqualified BackgroundProperty to target the Shell background instead of the flyout item’s background. Explicitly using VisualElement.BackgroundProperty in both visual states restores the intended selection colors Changed the CollectionView's HorizontalOptions from Center to Fill in the **Issue38443** test page so the selected item's outline spans the available row width with CV2 on Windows. - The appearance differs because CV1 and CV2 measure item content differently. CV1's ItemContentControl.MeasureOverride returns at least the available finite width, expanding the item even when its content is small. CV2's ElementWrapper normally returns the measured content size without that unconditional width inflation. - With HorizontalOptions set to Center, the CollectionView can therefore size to its content in CV2. Since the Selected visual state sets the template Border's stroke to black, the outline follows that narrower Border rather than spanning the available width. The selected visual state is still applied; the difference is in layout bounds. - Using Fill makes the intended full-width layout explicit instead of relying on CV1's measurement behavior. This keeps SelectedItemSetDuringShellNavigationUpdatesVisualState focused on verifying that the cyan item's selected visual state is applied during Shell navigation. The **ResetRestoresNativeAppearanceAfterGradientAndSolid** test fails because #39752 intentionally stops restoring the navigation bar’s original translucency to prevent Shell’s top tabs from becoming hidden. The test starts with Translucent = true, but applying gradient and solid backgrounds changes it to false. Reset now leaves it false, so updating Assert.True(...) to Assert.False(...) matches the intended behavior and guards against reintroducing the issue. --------- Co-authored-by: Shalini-Ashokan <102292178+Shalini-Ashokan@users.noreply.github.com> Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Co-authored-by: NafeelaNazhir <nafeela.nazhirhussain@syncfusion.com> Co-authored-by: Jakub Florkowski <42434498+kubaflo@users.noreply.github.com>
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Note
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!
Issue Details
On iOS, ShellColorsResetOnNavigation fails because the Page2 top tab is not visible after navigation.
Regression PR: dotnet/maui#37137 — Render gradient backgrounds on bottom tab bars.
Root Cause
The PR added restoration of the navigation bar’s original translucency during appearance reset:
navBar.Translucent = _defaultTranslucent;
Translucent controls whether content can show through the navigation bar. On iOS, it can also affect how content is positioned underneath the bar.
In the failing scenario, restoring this setting changes the tab row’s position and exposes a layout-refresh problem. Page2 still exists, but it falls outside the visible tab row.
Description of Change
Removes the saved _defaultTranslucent field, its capture, and its restoration during reset.
Keeps the existing restoration of navigation-bar colors and native appearances.
Validated the behavior in the following platforms