Repository navigation
fix(registry): calmer elastic slider stretch and live reduced motion - #53
Merged
Merged
Conversation
Review feedback: the stretch past the ends stays as the "you hit the limit" cue, but it is now capped at 10px with diminishing returns and settles back in 320ms on power3.out instead of a 900ms elastic wobble. The edge bump from the step buttons drops from 14px to 6px. Reduced motion is read from a matchMedia listener, so switching it while the page is open turns the stretch and tick wave off straight away. Docs spell out the native range input, keyboard and screen reader behaviour. Tests cover the stretch cap, no stretch under reduced motion, and switching reduced motion on live. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
What
Follow-up to #50, based on Noman's review of the Elastic Slider.
power3.out, in one move with no wobble. Before, it was a 900mselastic.outthat swung back and forth.prefers-reduced-motionis read through amatchMediachange listener, so switching it while the page is open turns off the stretch and tick wave straight away. The indicator stops right at the limit.<input type="range">with a<label>andaria-valuetext, controlled by the same value as the drawing. The docs now explain the keyboard keys (arrows, Page Up/Down, Home/End), what screen readers announce ("Monthly budget, slider, $7,500"), and the focus ring.MAX_STRETCH, and that cap is between 8 and 12px.Notes for review
rubberBandandMAX_STRETCHare now named exports so the tests can check the cap directly.data-elastic-tick/data-elastic-trackso the tests can find them. Nothing changes visually.stretchTo, both of them fail.Checks
pnpm registry:buildpassespnpm typecheckpasses