-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
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] Allow disabling the left and right thumbs swap #25547
[Slider] Allow disabling the left and right thumbs swap #25547
Conversation
@material-ui/unstyled: parsed: +0.69% , gzip: +1.06% |
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 prop API description and demo could use an additional explainer. It isn't obvious what "swap" means. Especially when this swap might occur.
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.
- Agree, please create a new section in the documentation. Don't recycle the existing demos.
- In the "Minimum distance shift" demo, the constraint isn't respected when reaching the edges.
- When
disableSwap
is true, I believe the other thumbs shouldn't show the value on hover.
@oliviertassinari I fixed all issues.
I disabled showing the value, but I wonder if I should also disable the hover effect. |
c964997
to
8c3445e
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.
I have tried to completely fix the UX on the new demo. At this point, I think that we only miss test cases to merge. The problem I went after:
- keyboard page up => value not bound
- keyboard right => swap of the index
- fast mouse move => stuck with a distance between the two thumbs above the min value
@michal-perlakowski Thanks for taking on this effort and clear the path toward a solution :) |
Resolves #24831.
I'm not sure if the API and demo descriptions are good, so any suggestions are welcome.
Preview: https://deploy-preview-25547--material-ui.netlify.app/components/slider/#range-slider