-
-
Notifications
You must be signed in to change notification settings - Fork 83
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] Use un-rounded values to position thumbs #1219
Merged
mj12albert
merged 13 commits into
mui:master
from
mj12albert:fix/slider-indicator-size-rounding
Jan 7, 2025
Merged
[Slider] Use un-rounded values to position thumbs #1219
mj12albert
merged 13 commits into
mui:master
from
mj12albert:fix/slider-indicator-size-rounding
Jan 7, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mj12albert
added
the
component: slider
This is the name of the generic UI component, not the React module!
label
Dec 23, 2024
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
from
December 23, 2024 10:44
45a1d37
to
0d89ea6
Compare
Netlify deploy preview |
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
8 times, most recently
from
December 25, 2024 21:06
3985be0
to
9e8b591
Compare
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
4 times, most recently
from
January 2, 2025 08:56
b9812b3
to
89105bc
Compare
mj12albert
changed the title
fix/slider-indicator-size-rounding
[Slider] Use un-rounded values to position thumbs
Jan 2, 2025
mj12albert
requested review from
atomiks,
colmtuite and
michaldudak
as code owners
January 2, 2025 09:48
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
from
January 3, 2025 07:14
89105bc
to
6acd84b
Compare
Seems to be buggy when moving quickly Screen.Recording.2025-01-03.at.6.19.35.pm.mov |
Should be fixed ~ it needed to be |
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
3 times, most recently
from
January 6, 2025 04:30
f8e2ad3
to
5074547
Compare
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
from
January 6, 2025 10:38
5074547
to
af3894d
Compare
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
from
January 7, 2025 05:55
af3894d
to
69165b8
Compare
mj12albert
force-pushed
the
fix/slider-indicator-size-rounding
branch
from
January 7, 2025 07:17
8ab8f6f
to
57d18c5
Compare
atomiks
approved these changes
Jan 7, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
component: slider
This is the name of the generic UI component, not the React module!
enhancement
This is not a bug, nor a new feature
performance
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #1216
Added a new state to hold un-rounded percentage values used for positioning thumbs.
Tried to replace the internal state with this and "scale up" the values on-demand (e.g. formatting, callbacks) but it requires a huge refactoring of internal calculations and increases the risk of floating point inaccuracies so I gave up for now.
Also threw in some improvements: removed unnecessary destructure/spreads/object arguments, renamed a lot of internals
Demo: https://deploy-preview-1219--base-ui.netlify.app/react/components/slider