-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: Use InfoBadge for TabBarItem badge support #1142
base: main
Are you sure you want to change the base?
chore: Use InfoBadge for TabBarItem badge support #1142
Conversation
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 @agneszitte @kazo0 Can we merge this now? The |
@@ -29,26 +28,68 @@ partial class TabBarItem | |||
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @kazo0, I will take a look 👍
<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> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These need to be inside of ThemeDictionaries to be able to be overridden via lightweight styling
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: