[automated] Merge branch 'net11.0' => 'release/11.0.1xx-preview3'#34875
Open
github-actions[bot] wants to merge 2 commits intorelease/11.0.1xx-preview3from
Open
[automated] Merge branch 'net11.0' => 'release/11.0.1xx-preview3'#34875github-actions[bot] wants to merge 2 commits intorelease/11.0.1xx-preview3from
github-actions[bot] wants to merge 2 commits intorelease/11.0.1xx-preview3from
Conversation
> [!NOTE] > Are you waiting for the changes in this PR to be merged? > It would be very helpful if you could <a href="https://github.com/dotnet/maui/wiki/Testing-PR-Builds">test the resulting artifacts</a> from this PR and let us know in a comment if this change resolves your issue. Thank you! ## Description Adds badge notification support to Shell bottom tabs on all platforms (Android, iOS, MacCatalyst, Windows). Closes #8305 (first iteration — bottom tabs) ### New API Three new bindable properties on `BaseShellItem`: | Property | Type | Description | |----------|------|-------------| | `BadgeText` | `string?` | Text/number displayed on the badge. `null` = no badge, `""` = dot indicator, non-empty = text/count badge. | | `BadgeColor` | `Color?` | Background color of the badge. `null` uses the platform default. | | `BadgeTextColor` | `Color?` | Foreground (text) color of the badge. `null` uses the platform default (typically white). | ### XAML Usage ```xml <Shell> <TabBar> <ShellContent Title="Home" BadgeText="3" BadgeColor="Red" BadgeTextColor="White" /> <ShellContent Title="Alerts" BadgeText="" /> <!-- dot indicator --> </TabBar> </Shell> ``` ### Platform Implementation | Platform | Approach | Notes | |----------|----------|-------| | **Android** | `BottomNavigationView.GetOrCreateBadge()` / `BadgeDrawable` | Full text + color support. `ClearNumber()` for dot mode. | | **iOS/MacCatalyst** | `UITabBarItem.BadgeValue` / `BadgeColor` / `SetBadgeTextAttributes` | Full text + color support. Empty string shows native dot. | | **Windows** | `InfoBadge` on `NavigationViewItem` via ViewModel binding | Numeric values show number; non-numeric/empty shows dot indicator. | ### Dot Badge Support Setting `BadgeText = ""` (empty string) displays a small dot indicator without text on all platforms. This is distinct from `null` which hides the badge entirely. ### What's Included - 3 BindableProperties on `BaseShellItem` with full XML documentation - Platform handlers for Android, iOS/MacCatalyst, and Windows - 28 unit tests (`ShellBadgeTests.cs`) - 4 UI screenshot tests (`Issue8305.cs`) - Interactive sample gallery page (`ShellBadgeGallery`) - PublicAPI.Unshipped.txt entries for all 7 TFMs ### What's NOT Included (follow-up work) - Flyout item badges - Top tab badges - These are tracked in the original issue #8305 for future iterations ### Screenshots <img width="1080" height="2400" alt="screen12" src="https://github.com/user-attachments/assets/b2b0cd76-a022-4e5a-88a2-82dd89da79d7"/> ### Testing - All 28 unit tests pass - All 85 existing Shell unit tests pass (no regression) - UI test projects compile successfully - Manually tested on physical Android device --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Reset patterns: - global.json - NuGet.config - eng/Version.Details.xml - eng/Versions.props - eng/common/*
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.
I detected changes in the net11.0 branch which have not been merged yet to release/11.0.1xx-preview3. I'm a robot and am configured to help you automatically keep release/11.0.1xx-preview3 up to date, so I've opened this PR.
This PR merges commits made on net11.0 by the following committers:
Instructions for merging from UI
This PR will not be auto-merged. When pull request checks pass, complete this PR by creating a merge commit, not a squash or rebase commit.
If this repo does not allow creating merge commits from the GitHub UI, use command line instructions.
Instructions for merging via command line
Run these commands to merge this pull request from the command line.
or if you are using SSH
After PR checks are complete push the branch
Instructions for resolving conflicts
Instructions for updating this pull request
Contributors to this repo have permission update this pull request by pushing to the branch 'merge/net11.0-to-release/11.0.1xx-preview3'. This can be done to resolve conflicts or make other changes to this pull request before it is merged.
The provided examples assume that the remote is named 'origin'. If you have a different remote name, please replace 'origin' with the name of your remote.
or if you are using SSH
Contact .NET Core Engineering (dotnet/dnceng) if you have questions or issues.
Also, if this PR was generated incorrectly, help us fix it. See https://github.com/dotnet/arcade/blob/main/.github/workflows/scripts/inter-branch-merge.ps1.