Repository navigation
Keep the dial's colours with the pointer while dragging - #23
Merged
Merged
Conversation
Dragging the ring with a mouse felt sluggish. Frames weren't dropping: the thumb's 180ms ease, the page's 500ms background fade and the card and wordmark colour fades all restarted on every hue change, so they trailed the pointer. The held state now records whether a key or a pointer holds it. followsPointer is true while the ring is dragged or the wheel is dragged or coasting, and then the thumb, the page background and the instantMotion theme drop their transitions. Steps, picks, keys and Back still fade. A pointer move that stays on the same hue keeps the same state, so it no longer re-renders the page. The wordmark's letter stagger is now a token so it can drop to zero too, which also removes it under reduced motion. Browser tests drive the ring with Playwright's real mouse through a ringPointer command, because synthetic pointer events can't take capture.
The sample shows the text colour the chip grades, so it often fails contrast on purpose. Lighthouse counted it anyway and held desktop accessibility at 96. Drawn with ::before, contrast audits skip it, and it stays hidden from screen readers.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
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.
Summary
Dragging the ring felt sluggish on desktop. Frames held at 16.7ms; the lag was transitions (the thumb's 180ms ease, the page's 500ms background fade, the card and wordmark fades) restarting on every hue change and trailing the pointer. While a pointer moves the dial, they now switch off. Steps, picks, keys and Back still fade.
The card's "Aa" contrast sample fails contrast on purpose (it shows the pair the chip grades). It's now
::beforecontent, stillaria-hidden, so Lighthouse stops counting it.Evidence
Before: four fast laps of the ring on the production build: thumb 13.6° behind the pointer, 10 transitions running mid-drag, 509 style recalcs. Lighthouse desktop accessibility 96 (
color-contraston "Aa").After: thumb 1.2° behind (the 5° snapping between hues), 0 transitions, 150 recalcs. Lighthouse desktop 100/100/100/100; mobile unchanged at 99/100/100/100.
Before: fails. After: passes.
Also passing: a pointer move within one hue keeps the same state; a held arrow key still eases the thumb;
pnpm check(146 tests);pnpm verifyshows only the known + then − finding.Driven in a real browser with
verify-huebo: ring drag, stepper, keys, mouse wheel, phone wheel flick and drag, contrast readout. One history entry per choice; transitions were0sonly while a pointer moved the dial.Merge Danger
Door: two-way
No stored data or links change. Reverting the two commits restores the old easing.
Blast Radius: motion
The dial's motion reducer gained a field, so anything sending
aimmust sayby. Held keys and mouse-wheel notches still ease. With reduced motion on, the wordmark letters lose their 45ms stagger. Browser tests now drive Playwright's real mouse through aringPointercommand.