-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
fix(react-slider): Export internal CSS vars #33682
fix(react-slider): Export internal CSS vars #33682
Conversation
📊 Bundle size reportUnchanged fixtures
|
Pull request demo site: URL |
packages/react-components/react-slider/library/src/components/Slider/useSliderStyles.styles.ts
Show resolved
Hide resolved
yeah, this works fine. my only last suggestion would be to write a story about customizing, which would also validate the work. |
aeb4e15
to
df41a58
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.
We might not want to expose all internal variables. For instance, sliderThumbPositionVar
is a computed value derived from progressVar
, so modifying it independently might not be logical.
However, I agree that color and size variables could be safely exposed.
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.
just to double check to make sure we are not breaking our public API contract.
can you confirm that these vars were supposed to be exposed since release ? and this is just fix to previous assumption ?
we should be very careful about exposing internal things ( they are called internal for some reason )
ty
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.
i'm fine without the desctructuring if we find that its better for compilers.
In theory, that sounds great, but I'm not sure how it would work in practice since we don't usually make such examples for other components and it will be inconsistent. So, I'd suggest converting that story to a VR test (to validate the changes) and adding a new section, "Overriding FUI component tokens," to the Styling Components and referencing it from the component docs page. |
Partner's ask. Discussed it with @micahgodbolt
Previous Behavior
CSS variables were internal
New Behavior
Exported those variables
Added VR test

Fixes [Bug]: internal CSS variables aren't exported for Slider component #33668