Skip to content

TabController - design tokens - fixes #1935

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

Merged
merged 6 commits into from
Apr 11, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/src/screens/MainScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class MainScreen extends Component {
paddingV-s2
onPress={() => this.openScreen(item)}
onLongPress={() => this.setDefaultScreen(item)}
activeBackgroundColor={Colors.primary}
activeBackgroundColor={Colors.$backgroundPrimaryHeavy}
activeOpacity={1}
>
<Text style={[item.deprecate && styles.entryTextDeprecated]} grey10 text50>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ class TabControllerScreen extends Component<{}, State> {
// iconColor={'green'}
// selectedIconColor={'blue'}
enableShadow
activeBackgroundColor={Colors.blue60}
activeBackgroundColor={Colors.$backgroundGeneralLight}
centerSelected={centerSelected}
>
{/* {this.renderTabItems()} */}
Expand Down
4 changes: 2 additions & 2 deletions src/components/tabController/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ interface Props extends TabControllerBarProps, BaseComponentInjectedProps, Forwa
children?: ChildProps[] | ChildProps;
}

const FADER_PROPS = {size: 76, tintColor: Colors.$backgroundDefault};
const FADER_PROPS = {size: 76, tintColor: Colors.$backgroundElevated};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure about it?
I used the backgroundElevated originally and you said it looks better with backgroundDefault

Copy link
Collaborator Author

@M-i-k-e-l M-i-k-e-l Apr 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure, I'll ask UX (I don't think they tokenized it)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It'll be $backgroundElevated but will be handled within the Fader

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure that the default fader color should be $backgroundElevated and not $backgroundDefault?
maybe it should be $backgroundDefault and only here we should override it with $backgroundElevated..

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what Yulia said in the relevant channel (can't link here).
In any case, if there will be errors we can fix them later.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed


/**
* @description: TabController's TabBar component
Expand Down Expand Up @@ -285,7 +285,7 @@ const TabBar = (props: Props) => {
}, [containerWidth]);

return (
<View style={_containerStyle} key={key}>
<View style={_containerStyle} key={key} bg-$backgroundElevated>
<FadedScrollView
// @ts-expect-error
ref={tabBar}
Expand Down
1 change: 1 addition & 0 deletions src/components/tabController/TabBarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,7 @@ export default function TabBarItem({
// @ts-expect-error
ref={itemRef}
style={_style}
bg-$backgroundElevated
onLayout={onLayout}
activeBackgroundColor={activeBackgroundColor}
activeOpacity={activeOpacity}
Expand Down