-
Notifications
You must be signed in to change notification settings - Fork 23
feat(Tabs)!: Add support for additional customization settings #903
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
Conversation
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.
Looks good 👍 comments are not blocking but I'd like to see the tab's styles not break when resized. Perhaps there is a possible CSS-only solution?
- exceptionallySetClassName prop added to the TabList component
- Allows to override the --reactist-tab-border-radius variable used in the "track" element
Is the border radius point meant to be a sub-bullet item here or are they separate points? I'm confused because we should be able to just override the --reactist-tab-border-radius
without the class name override 😁
The So, no, they are not separate points. The |
Ah ok, I think I get it - if we want to be able to apply different border radius values to the track and to the selected tab, perhaps separating it into two variables could be a solution, i.e. |
The new design uses the same radius for both, but I'll split them for extended customizability :)
It doesn't change the fact that we still need this, though. |
Okay sorry I am finally starting to get it 😅 This problem would exist for all of the other exposed custom properties and not just for the border radius variables though, correct? I'm not against having the Is the border radius something we want to customize per instance, or app-wide? If it's the latter, we could always configure the new values based on the global class added in https://github.com/Doist/todoist-web/pull/13368, and if it's the former, and I'd be curious why we'd do this, then having the class name makes more sense. |
Not necessarily. All the other properties are used under elements that either expose a
It will be app-wide.
Hum, this is a good point. I was approaching this problem differently, but now that you mention this, I see how the same result could be achieved without the need for Since I've already published a new Reactist release, I'll test both approaches and see how they look. If I end up not using |
No harm in leaving it in place I think 👍 |
Short description
This PR adds support for the following customization settings for the
Tabs
component:Tab
component--reactist-tab-themed-hover
/--reactist-tab-neutral-hover
--reactist-tab-themed-disabled
/--reactist-tab-themed-disabled
disabled
prop--reactist-tab-neutral-shadow
/--reactist-tab-themed-shadow
TabList
componentwidth
prop can befull
ormaxContent
(default)TabList
componentalign
prop can bestart
(default),center
, orend
--reactist-tab-selected-transition
exceptionallySetClassName
prop added to theTabList
component--reactist-tab-border-radius
variable used in the "track" elementAll these changes are necessary to help customize the
Tabs
component to help with the upcoming style updates, and they come with sensible defaults that match the current style and behaviour. This avoids breaking changes, and helps with a smoother transition. I've also added a few example stories to demonstrate some of the most relevant new settings.PR Checklist