Repository navigation
Pressed state for Switch, SegmentedControl, TabList, Link, Slider, CheckboxInput, RadioList, Collapsible - #6380
Merged
Conversation
…eckboxInput, RadioList, Collapsible Eight interactive components painted nothing while pressed, so on a phone (no hover) a tap looked like nothing happened until the screen changed. Each now paints the system's `--color-overlay-pressed` layer while pressed, the way Button and every other composer of `interactionOverlayStyles` already does: - Switch: track and thumb, read off the row's scope marker like the hover tint - SegmentedControl: the unselected segment takes the shared hover + pressed overlay in place of its hover-only rule - TabList: the tab's hover surface layer steps up to the pressed overlay - Link: `interactionOverlayStyles.pressedBackgroundColor` (new: the press alone) behind the text, anchor and button forms; the hover stays the colour - Slider: the thumb being dragged, for the whole drag, on mouse and touch - CheckboxInput / RadioList: the indicator box / circle, read off the owner's `indicatorScope` like the hover tint - Collapsible: the trigger row Disabled controls never press. Each component's test asserts the pressed rule on the element that paints it; the Slider test drives a pointer sequence. Supporting: Switch forwards a caller's `id`, `aria-labelledby` and `aria-describedby` to its `<input role="switch">` (they used to land on the field wrapper, where nothing reads them), merging `aria-describedby` ahead of its own ids the way CheckboxInput does. Docs gain a `Pointer down` contrast state; each component gets a `Pressed state` story.
vjeux
requested review from
cixzhang,
imdreamrunner and
josephfarina
as code owners
September 19, 2026 22:50
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
github-actions
Bot
requested review from
cvkxx,
ernestt,
kentonquatman and
rubyycheung
September 19, 2026 22:51
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsCheckboxInput (@astryxdesign/core) · View in Storybook
Slider (@astryxdesign/core) · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 36 accessibility violation(s) found — 2 critical, 34 serious. Button pattern - 1 issue(s)
ChatComposer - 1 issue(s)
ChatComposerInput - 1 issue(s)
ChatReasoning - 1 issue(s)
ChatToolCalls - 1 issue(s)
Checkbox pattern - 1 issue(s)
CheckboxList - 1 issue(s)
ClickableCard - 1 issue(s)
CodeEditor - 1 issue(s)
CodeEditorPerf - 1 issue(s)
CodeEditorTheme - 1 issue(s)
CodeTheme - 1 issue(s)
DateRangeInput - 1 issue(s)
FileInput - 1 issue(s)
GridMasonry - 1 issue(s)
Heading - 1 issue(s)
Icon - 1 issue(s)
LogStream - 1 issue(s)
MediaTheme Auto - 1 issue(s)
PowerSearch - 1 issue(s)
ProgressBar - 1 issue(s)
Radio group pattern - 1 issue(s)
RadioList - 1 issue(s)
RichTextEditor - 2 issue(s)
SelectableCard - 1 issue(s)
Stepper - 1 issue(s)
TableGroupedRows - 1 issue(s)
TableTree - 1 issue(s)
Text - 1 issue(s)
Theme - 1 issue(s)
PopArt - 1 issue(s)
Thumbnail - 1 issue(s)
Timestamp - 1 issue(s)
Token - 1 issue(s)
Tokenizer - 1 issue(s)
Visual RegressionStatus: Skipped — Broad stable scope is deferred to the daily release gate. It covers 386 trusted baseline shots instead of recapturing them for this PR. View the report Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
force-pushed
the
press-state-eight-components
branch
from
September 20, 2026 00:34
75fc690 to
0a43ff8
Compare
cixzhang
force-pushed
the
press-state-eight-components
branch
from
September 20, 2026 01:04
0a43ff8 to
540d390
Compare
cixzhang
force-pushed
the
press-state-eight-components
branch
from
September 20, 2026 02:28
540d390 to
f6d3595
Compare
Contributor
|
/approve-spec f6d3595 |
3 tasks done
4 tasks done
cixzhang
pushed a commit
that referenced
this pull request
Oct 31, 2026
<!-- template: bug-fix.md --> Sibling: #7516 (off-grid max). One change on `main`, with no dependencies. ## User impact Found during the UIKit-parity work on Slider (`spec:AST-094`). A range Slider whose two thumbs share a value gets stuck. With both at the maximum, dragging down moves nothing; with both in the middle, a track press above them moves nothing. It happens with a mouse, a finger and a pen. ## Problem and solution fit 1. **Why it happens:** with equal values, a direct press keeps the upper thumb (#6380) and a track press takes the lower one, whichever way the pointer goes, and that thumb is clamped against its sibling. 2. **Why it matters:** coincident thumbs are a normal state, and in those directions no pointer path moves them; on `main` only a track press below them or a drag toward the maximum works. Only one thumb can move toward a given value, so that thumb takes the press. A track press beside them picks the thumb on its side. A press on the thumbs waits for the pointer's first movement, whose direction picks the thumb, with its focus, pressed look and tooltip. A drag that passes the other thumb's value hands itself over. ## Expected behavior and authority - `component:Slider` FR1 / AR1: two thumbs bound the range and never cross. `architecture:interaction-modality` INV4: every modality has an operable path. `design:user-states` DR4: the pressed overlay follows the dragged thumb. - `component:Slider` FR6, added here: which thumb a press takes when both share a value, and the consequence that a drag coming back past the shared value moves the other thumb. It waits on the spec owner's approval. The alternative, keeping one fixed thumb, is what leaves a direction stuck. ## Smallest restoration `Slider.tsx` only: the press and move handlers, and the value tooltip's `isOpen` during a drag. No new prop, style or visual. `Slider.spec.md` gains FR6 and its verification row. ## Evidence   iOS 26.2 simulator, Mobile Safari, `main` over this branch. ## Scope - [x] One defect is restored. - [x] Separable contradictory or unsettled tagalongs were removed or split. - [x] No new public API, visual representation, default, or interaction model is hidden under the bug-fix label. - [x] Public text and artifacts contain no internal Meta context. ## Testing On a range Slider story, with a mouse or a finger: 1. Both thumbs at the maximum, drag down: the lower thumb follows (on `main`, nothing moves). 2. Both in the middle, press the track above them: the upper thumb moves there; below, the lower one. 3. Press on both thumbs and move: the direction picks the thumb; the other's tooltip closes. 4. Repeat step 1 in RTL: mirrored. Local gates at 1115a21: root build, typecheck, lint, Prettier, `check:repo`, `check:knowledge`, the CLI isolation test (34/34), the Storybook build, Slider's Chromium accessibility suite (7/7), `pnpm test:ui` (16,465 passed), and the node project apart from `story-tree.test.ts` and `cache.test.mjs`, whose failures are known on `main` and have open fixes (#8509, #8520). "Coincident range thumbs" in `Slider.test.tsx` automates each step; with `main`'s `Slider.tsx`, 7 of its 11 cases fail, and the other 4 guard paths that already work, including a drag that began with a track press beside the thumbs, which stays on its thumb. ## Writing rubric results - R1 narration: none; FR6 states the rule and its consequence in the present tense. - R2 research: none. - R3 evidence: FR6's basis is the current source and focused tests. - R4 rejected alternatives: none added to the record. - R5 change references: none. - R6 open questions: none touched.
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.
User impact
Pointer users now get immediate pressed feedback on eight previously silent controls. Disabled controls stay visually inert and cannot activate, and an already-selected SegmentedControl item keeps its raised surface unchanged.
Design authority
docs/design/user-states.mdowns the bounded decision for:Each enabled surface paints
--color-overlay-pressedduring pointer hold or drag. The record does not approve pressed behavior for other components or broader changes to hover, focus, or selection.Implementation
Evidence
pressed-state-evidence-<sha>artifact.Validation
pnpm check:knowledgepnpm test:a11y-contract