-
-
Notifications
You must be signed in to change notification settings - Fork 32.5k
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
[Slider] Fix positioning of tooltips on vertical slider #32919
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.
The demos look better now, but there's a regression in https://deploy-preview-32919--material-ui.netlify.app/material-ui/customization/theme-components/#overrides-based-on-props
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.
That's better. Thanks!
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.
Thoughts for follow-ups:
- It could be great to add a visual regression test with
valueLabelDisplay="on"
, to avoid regressions. - The transition's origin is wrong:
broken.mp4
- We could have in the Slider docs a section specifically for the
valueLabelDisplay
prop. We currently mix the values in the demos, it's a bit confusing.
@@ -20,6 +20,7 @@ export default function VerticalSlider() { | |||
orientation="vertical" | |||
defaultValue={30} | |||
aria-label="Temperature" | |||
valueLabelDisplay="auto" |
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.
Are we sure about this change? Why not keep the default value?
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.
With it, developers can see how the value tooltips look like on vertical sliders. I'd keep them.
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.
It feels like we made this change only to test & develop the fix. I wonder if a general rule should be to either make it the default behavior or remove the prop in the demos (instead, replacing it with a dedicated demo) 😁.
This thing will be fixed by adding |
@abhinav-22-tech Could you create a PR with this fix? |
I have also missed this: 4. wrong vertical alignment #33009 (comment) |
Closes: #31103
Preview: https://deploy-preview-32919--material-ui.netlify.app/material-ui/react-slider/#vertical-sliders