Repository navigation
fix(Slider): a press on the mark label of coincident thumbs goes to the upper thumb, as a press on the thumbs does - #9184
Conversation
…cus on the upper thumb, wherever it lands Two thumbs on one value: a press on the thumbs is held by the upper thumb, drawn over the lower one, and a press that never moves leaves focus there. A press on the mark label of their shared value is held the same way. It fails today: the label press goes to the lower thumb, under the upper one.
…to the upper thumb, as a press on the thumbs does Until the first movement, a press on two thumbs that share a value is held by the upper thumb, the one drawn over the lower one, whether it landed on the thumbs or on their shared value elsewhere, such as its mark label. A press that never moves therefore leaves focus on the same thumb wherever it lands. Before, a press on that label went to the lower thumb, which the upper one covers. component:Slider FR6 states it, and its verification row names the press that never moves.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report
Modified ComponentsSlider (@astryxdesign/core)
Component Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: Accessibility did not run on this pull request; add Generated by PR Enrichment workflow | View full report |
There was a problem hiding this comment.
The code change does what it says and I found no defects: the new mark-label test fails without the fix, and a press on the shared value's label now focuses the upper thumb exactly as a press on the thumbs does. Approval waits on one spec decision: the new component:Slider FR6 sentence, which says the upper thumb holds a press that has not moved yet wherever it lands on the shared value, is not in the current spec and needs an engineering owner's approval. An engineering owner records that decision by commenting /approve-spec f75af1fdbf2d5cf7036455bfbece127a8f8cf99c on this pull request, and the author may do so as an engineering owner.
[Automated review]
|
/approve-spec f75af1f |
There was a problem hiding this comment.
This looks ready to merge: the component:Slider FR6 amendment is now approved by an engineering owner for this exact revision, and the code does what the amended rule says with no defects found. The new mark-label test fails without the fix and passes with it, and the existing coincident-thumbs cases still pass. Nothing more is needed from you.
[Automated review]
Follow-up to #8151. One change on
main, with no dependencies.User impact
When both thumbs of a range Slider share a value, the upper thumb is drawn over the lower one. A press on the thumbs that never moves leaves the press and focus on that visible thumb, but a press on the mark label of their shared value takes the lower, covered thumb: the focus ring and pressed look land on a thumb you can't see, and the next arrow key moves it.
Problem and solution fit
A waiting press is now held by the upper thumb wherever it landed. The first movement still picks the thumb that can travel that way.
Expected behavior and authority
component:SliderFR6, amended here: until the first movement, the upper thumb holds the press, its focus and its pressed state, so a press that never moves changes no value and leaves focus on the upper thumb; this covers a press on the shared value's mark label. It waits on the spec owner's approval of that text.design:user-statesDR4: the pressed overlay follows the thumb the pointer holds.Smallest restoration
Slider.tsx: in the press handler, a waiting press that hit no thumb is held by the upper thumb.Slider.spec.md: FR6's sentence and its verification row. No new prop, style or visual.Evidence
Slider.test.tsxgains two cases. The mark-label case fails without the fix; the on-thumb case pins what already worked.Scope
Testing
On a range Slider with a mark at 50 and both thumbs at 50, with a mouse: press the "50%" label, or the thumbs, and release without moving. The upper thumb shows pressed and keeps focus, and the values stay at 50. A drag left from the label still moves the lower thumb.
Local gates at f75af1f: root build, typecheck, lint, Prettier,
check:repo,check:knowledge, the CLI isolation test (34/34), the Storybook build, Slider's Chromium accessibility suites (13/13),pnpm test:ui(17,087 passed), and the node project apart fromcache.test.mjs, whose failure is known onmainand has an open fix (#8520).Writing rubric results