chore: Use InfoBadge for TabBarItem badge support#1142
Open
morning4coffe-dev wants to merge 12 commits intounoplatform:mainfrom
Open
chore: Use InfoBadge for TabBarItem badge support#1142morning4coffe-dev wants to merge 12 commits intounoplatform:mainfrom
morning4coffe-dev wants to merge 12 commits intounoplatform:mainfrom
Conversation
kazo0
reviewed
May 28, 2024
Decided to not make a breaking change with the InfoBadge change at the moment. Now, users can use both and we can deprecate BadgeVisibility and BadgeValue in later releases.
MartinZikmund
approved these changes
Jun 3, 2024
agneszitte
reviewed
Jun 4, 2024
6 tasks
agneszitte
reviewed
Jun 5, 2024
agneszitte
reviewed
Jun 7, 2024
Member
Author
|
@MartinZikmund @agneszitte @kazo0 Can we merge this now? The |
kazo0
reviewed
Jul 8, 2024
| DependencyProperty.Register(nameof(Icon), typeof(IconElement), typeof(TabBarItem), new PropertyMetadata(null, OnPropertyChanged)); | ||
| #endregion | ||
|
|
||
| // UNO TODO: Deprecate and remove BadgeVisibility and BadgeValue properties and use InfoBadge instead |
Contributor
There was a problem hiding this comment.
Do we have an issue to track in Toolkit to do this for the next major version bump?
Do we have docs written in the migration section for this deprecation or recommendation to use InfoBadge explicitly?
Comment on lines
+11
to
+25
| <StaticResource x:Key="MaterialInfoBadgeBottomTabBarItemBackground" | ||
| ResourceKey="ErrorBrush" /> | ||
| <StaticResource x:Key="MaterialInfoBadgeBottomTabBarItemForeground" | ||
| ResourceKey="OnErrorBrush" /> | ||
|
|
||
| <!-- Small InfoBadge--> | ||
| <x:Double x:Key="MaterialSmallInfoBadgeBottomTabBarItemHeight">6</x:Double> | ||
| <x:Double x:Key="MaterialSmallInfoBadgeBottomTabBarItemWidth">6</x:Double> | ||
| <Thickness x:Key="MaterialSmallInfoBadgeBottomTabBarItemMargin">0,4,20,0</Thickness> | ||
|
|
||
|
|
||
| <!-- Large InfoBadge--> | ||
| <x:Double x:Key="MaterialLargeInfoBadgeBottomTabBarItemHeight">16</x:Double> | ||
| <Thickness x:Key="MaterialLargeInfoBadgeBottomTabBarItemMargin">32,4,0,0</Thickness> | ||
| <CornerRadius x:Key="MaterialLargeInfoBadgeBottomTabBarItemCornerRadius">8</CornerRadius> |
Contributor
There was a problem hiding this comment.
These need to be inside of ThemeDictionaries to be able to be overridden via lightweight styling
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.
GitHub Issue (If applicable): closes #1134
This PR adds support for using WinUI InfoBadge for TabBarItem while maintaining the support for old Badge properties. On Skia, the InfoBadge might be a little offset: unoplatform/uno#10326
PR Type
What kind of change does this PR introduce?
PR Checklist
Please check if your PR fulfills the following requirements: