unoplatform / uno.toolkit.ui

A set of custom controls for the WinUI and the Uno Platform not offered out of the box by WinUI, such as Card, TabBar, NavigationBar, etc.
https://platform.uno/
MIT License
83 stars 27 forks source link

[Material][TabBar][Breaking Change Request] Rename Material TabBar styles to match Material Design 3 specs #915

Open kazo0 opened 1 year ago

kazo0 commented 1 year ago

Material Toolkit currently defines many different TabBar styles:

Control Style Key
utu:TabBar BottomTabBarStyle
utu:TabBar TopTabBarStyle
utu:TabBar ColoredTopTabBarStyle
utu:TabBar VerticalTabBarStyle
utu:TabBarItem BottomFabTabBarItemStyle
utu:TabBarItem BottomTabBarItemStyle
utu:TabBarItem VerticalTabBarItemStyle

In Material Design 3, our "top" tabs are now what is referred to as "Secondary" tabs and our Vertical and Bottom tab bar is what is now called Primary

We should re-structure our TabBar styles to simply have a PrimaryTabBarStyle and SecondaryTabBarStyle

As can be seen in the Material specs: image

NVLudwig commented 1 year ago

@kazo0 Aren't these neither Primary nor Secondary in Material 3 spec but rather related to these NavigationBars?

image

So could we have Something like TabBar -----Style -------Navigation ----------Vertical ----------VerticalFAB ----------Horizontal ----------HorizontalFAB -------Primary -------Secondary

      Also our Primary and Secondary Tab styling is not M3 compliant at the moment, let me know if you think we could close both issues at the same time.
kazo0 commented 1 year ago

Ah yes I forgot that our "Bottom" TabBar is technically the Material Design "NavigationBar"

In that case we should just have

Control Style Key
TabBar PrimaryTabBarStyle
TabBar SecondaryTabBarStyle
TabBar NavigationTabBarStyle

And TabBar itself has a property on it to drive Orientation, so it shouldn't be dictated by a specific style

kazo0 commented 1 year ago

Looking at the Tabs guidelines, there isn't much difference between Primary and Secondary except for the selection indicator size. So both should be using a similar TabBarItemStyle.

In fact, we shouldn't be exposing the Item styles publicly, the 3 main TabBar Styles have specific Item styles that they use and that's that. If you want to create your own ItemContainerStyle you can but we shouldn't be mixing them with each other

kazo0 commented 11 months ago

Coming back to this

For TabBar we would have

Control Style Key
TabBar TabBarStyle
TabBar SecondaryTabBarStyle
TabBar NavigationTabBarStyle

For TabBarItem we would have

Control Style Key
TabBarItem TabBarItemStyle
TabBarItem SecondaryTabBarItemStyle
TabBarItem NavigationTabBarItemStyle

Where SecondaryTabBarItemStyle simply inherits from the TabBarItemStyle and does not re-template the TabBarItem but has a few properties changed, such as IconPlacement.Inline