Open kazo0 opened 1 year ago
@kazo0 Aren't these neither Primary nor Secondary in Material 3 spec but rather related to these NavigationBars?
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.
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
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
Coming back to this
TabBar
in Material Toolkit should be TabBarStyle
which looks like the M3 Primary TabsSecondaryTabBarStyle
that bases itself on TabBarStyle
but simply toggles a few properties to change the appearance of the active indicator and Icon placement/visiblity. It should not re-define the template coming from TabBarStyle
. This should allow for the appearance of the M3 Secondary TabsNavigationTabBarStyle
that matches the style of the M3 NavigationBar. The NavigationTabBarStyle
's template should handle the Orientation
property of the TabBar
to be able to be displayed vertically and look like the M3 NavigationRailIconPlacement
property on the TabBarItem
, with values of Stacked
or Inline
, maybe? To define whether or not the Icon will be placed above the Content or beside itFor 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
Material Toolkit currently defines many different TabBar styles:
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: