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
[iOS] Fix issues setting Shell TabBar appearance #15748
Conversation
98cbb7e
to
42fd304
Compare
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.
Agreed that there is some weirdness in how the API works, but love the detailed explanation. Something we need to fix down the road with improved/new APIs.
Already pinged @davidbritch to maybe make things a bit more clearer through documentation.
Added a couple of nits to be more consistent with the use of != null
vs is not null
, otherwise I thinks looks good
Description of Change
iOS portion of the following PR
#15447
Priority of how the colors are applied.
The APIs available to us are fairly limiting in scope. Ideally, we would make this all work through the VSM and just use two APIs (IconColor/TitleColor) but for now we are just making these APIs consistent between the platforms.
The three properties users have to influence the
TabItem
coloring are:TabBarUnselectedColor
,TabBarTitleColor
, andTabBarForegroundColor
Shell.TabBarTitleColor
that will color theTitle
andIcon
of the selected item. I realize this is a bit weird for TitleColor to changeIcon
color but this is currently how Android works and it's not really worth breaking this until we just introduce new APIs.Shell.TabBarTitleColor
is not set then theTitleColor
will match theTabBarForegroundColor
TabBarForegroundColor
is set andTabBarUnselectedColor
isn't set thenTabBarForegroundColor
will be the color used for the text/icon of the selected TabItemTabBarUnselectedColor
is the only thing set then that will be used for the text/icon color on the unselected Tab Item.Examples
TabBarTitleColor
: GreenTabBarForegroundColor
: BlueTabBarForegroundColor
: Blue,TabBarTitleColor
: GreenShell.ForegroundColor
: Blue,TabBarTitleColor
: Green (ForegroundColor propagates to TabBarForegroundColor).TabBarForegroundColor
: Blue,TabBarTitleColor
: Green,TabBarUnselectedColor
: PinkPink
Breaking changes
ForegroundColor
set, then thetab
will match according to that color.Fixes (partially) #6718
Fixes #16551