Skip to content
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

Merged
merged 5 commits into from
Jun 1, 2022

Conversation

abhinav-22-tech
Copy link
Contributor

@abhinav-22-tech abhinav-22-tech commented May 26, 2022

@mui-bot
Copy link

mui-bot commented May 26, 2022

Details of bundle changes

Generated by 🚫 dangerJS against 1de24fc

@abhinav-22-tech abhinav-22-tech marked this pull request as ready for review May 31, 2022 06:38
Copy link
Member

@michaldudak michaldudak left a comment

Choose a reason for hiding this comment

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

@abhinav-22-tech abhinav-22-tech marked this pull request as draft May 31, 2022 09:22
@abhinav-22-tech abhinav-22-tech marked this pull request as ready for review May 31, 2022 09:36
@michaldudak michaldudak changed the title [slider] Vertical slider tooltips fix [Slider] Fix positioning of tooltips on vertical slider Jun 1, 2022
@michaldudak michaldudak added component: slider This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material labels Jun 1, 2022
Copy link
Member

@michaldudak michaldudak left a 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!

@michaldudak michaldudak merged commit 8ae84a2 into mui:master Jun 1, 2022
Copy link
Member

@oliviertassinari oliviertassinari left a 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:

  1. It could be great to add a visual regression test with valueLabelDisplay="on", to avoid regressions.
  2. The transition's origin is wrong:
broken.mp4
  1. 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"
Copy link
Member

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?

Copy link
Member

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.

Copy link
Member

@oliviertassinari oliviertassinari Jun 1, 2022

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) 😁.

@oliviertassinari oliviertassinari added the bug 🐛 Something doesn't work label Jun 1, 2022
@abhinav-22-tech
Copy link
Contributor Author

Thoughts for follow-ups:

  1. It could be great to add a visual regression test with valueLabelDisplay="on", to avoid regressions.
  2. The transition's origin is wrong:

broken.mp4
3. 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.

This thing will be fixed by adding transformOrigin: 'right center'.

@michaldudak
Copy link
Member

@abhinav-22-tech Could you create a PR with this fix?

@oliviertassinari
Copy link
Member

I have also missed this: 4. wrong vertical alignment #33009 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work component: slider This is the name of the generic UI component, not the React module! package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Slider] Vertical slider tooltips are showing behind other thumbs
4 participants