Repository navigation
feat(core): a mouse or pen press on a checkbox or a radio option paints at once and fades on release - #8696
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/CircleCheckIndicator · Storybook | 4.6 kB (−1 B) · 1.0 kB CSS (+4 B) | 253 (−3) | — · ✓ · ✗ |
| FieldLabel | 54.3 kB (+457 B) · 5.7 kB CSS (0) | — | — · — · — |
| Overlay | 23.0 kB (+455 B) · 3.9 kB CSS (0) | — | — · — · — |
134 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| CheckboxInput · Storybook | 67.5 kB (+367 B) · 9.3 kB CSS (+38 B) | 444 (+3) | ✓ · ✓ · ✓ |
| InputGroup | 59.9 kB (+400 B) · 7.9 kB CSS (0) | — | — · — · — |
| CheckboxList | 71.9 kB (+395 B) · 7.8 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Field | 58.2 kB (+395 B) · 7.3 kB CSS (0) | — | — · — · — |
| Table | 130.2 kB (+373 B) · 18.5 kB CSS (+19 B) | — | — · — · — |
| TableHeaderCell | 113.9 kB (+384 B) · 17.7 kB CSS (+8 B) | — | — · — · — |
| RadioListItem | 70.6 kB (+293 B) · 10.3 kB CSS (+98 B) | — | ✓ · ✓ · ✓ |
| RadioList | 59.6 kB (+390 B) · 7.3 kB CSS (0) | — | ✓ · ✓ · ✓ |
| MultiSelector | 99.6 kB (+380 B) · 16.9 kB CSS (+7 B) | — | — · — · — |
| TextArea | 65.6 kB (+382 B) · 9.4 kB CSS (0) | — | — · — · — |
| TableCell | 114.3 kB (+376 B) · 18.0 kB CSS (+4 B) | — | — · — · — |
| MoreMenu | 102.3 kB (+371 B) · 17.6 kB CSS (+8 B) | — | — · — · — |
| lab/TabBarMoreList | 96.0 kB (+372 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/TransferList | 105.7 kB (+369 B) · 1.2 kB CSS (0) | — | — · — · — |
| DropdownMenu | 102.1 kB (+358 B) · 17.6 kB CSS (+8 B) | — | — · — · — |
| ContextMenu | 113.0 kB (+364 B) · 17.5 kB CSS (+1 B) | — | — · — · — |
| lab/TransferListSelector | 114.5 kB (+365 B) · 1.4 kB CSS (0) | — | — · — · — |
| PowerSearch | 298.4 kB (+192 B) · 24.7 kB CSS (+166 B) | — | — · — · — |
| ListItem | 73.6 kB (+356 B) · 11.5 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 279.9 kB (+356 B) · 2.3 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 301.7 kB (+355 B) · 2.6 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 67.6 kB (+352 B) · 162 B CSS (0) | — | — · — · — |
| Markdown | 193.2 kB (+326 B) · 20.8 kB CSS (+22 B) | — | — · — · — |
| lab/DiffViewer | 90.9 kB (+338 B) · 2.1 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 111.8 kB (+337 B) · 1.1 kB CSS (0) | — | — · — · — |
| SelectableCard | 18.6 kB (+336 B) · 7.5 kB CSS (0) | — | — · — · — |
| ClickableCard | 18.4 kB (+335 B) · 7.3 kB CSS (0) | — | — · — · — |
| Collapsible | 28.9 kB (+335 B) · 4.5 kB CSS (0) | — | — · — · — |
| Token | 29.2 kB (+334 B) · 4.8 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 90.3 kB (+334 B) · 751 B CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 14.2 kB (+332 B) · 4.2 kB CSS (0) | — | — · — · — |
| Link | 55.1 kB (+329 B) · 7.1 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 110.6 kB (+328 B) · 773 B CSS (0) | — | — · — · — |
| lab/ListInput | 91.5 kB (+328 B) · 922 B CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 50.9 kB (+326 B) · 5.7 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.4 kB (+326 B) · 4.0 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.4 kB (+318 B) · 3.6 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 18.8 kB (+318 B) · 4.3 kB CSS (0) | — | — · — · — |
| TreeList | 46.1 kB (+352 B) · 5.6 kB CSS (−34 B) | — | — · — · — |
| Tab | 14.8 kB (+317 B) · 4.2 kB CSS (0) | — | — · — · — |
| Item | 18.0 kB (+352 B) · 5.5 kB CSS (−38 B) | — | — · — · — |
| SelectorOption | 21.6 kB (+350 B) · 6.0 kB CSS (−38 B) | — | — · — · — |
| lab/CommentComposer | 156.4 kB (+312 B) · 1.9 kB CSS (0) | — | — · — · — |
| Outline | 25.2 kB (+311 B) · 4.1 kB CSS (0) | — | — · — · — |
| Step | 31.5 kB (+311 B) · 5.6 kB CSS (0) | — | — · — · — |
| Thumbnail | 67.8 kB (+332 B) · 11.6 kB CSS (−21 B) | — | — · — · — |
| lab/TourStep | 101.7 kB (+311 B) · 590 B CSS (0) | — | — · — · — |
| Stepper | 65.1 kB (+339 B) · 10.1 kB CSS (−29 B) | — | — · — · — |
| lab/CommentPin | 59.3 kB (+308 B) · 1.2 kB CSS (0) | — | — · — · — |
| ChatLayout | 86.3 kB (+336 B) · 10.5 kB CSS (−29 B) | — | — · — · — |
| lab/DialogHeroHeader | 86.5 kB (+306 B) · 372 B CSS (0) | — | — · — · — |
| TopNav | 75.7 kB (+334 B) · 10.9 kB CSS (−29 B) | — | — · — · — |
| Tokenizer | 101.6 kB (+340 B) · 19.1 kB CSS (−38 B) | — | — · — · — |
| TextInput | 71.1 kB (+327 B) · 11.2 kB CSS (−28 B) | — | — · — · — |
| DateRangeInput | 97.4 kB (+326 B) · 12.5 kB CSS (−28 B) | — | — · — · — |
| DropdownMenuItem | 23.0 kB (+335 B) · 6.2 kB CSS (−38 B) | — | — · — · — |
| SideNavCollapseButton | 64.3 kB (+325 B) · 10.1 kB CSS (−28 B) | — | — · — · — |
| TopNavMenu | 79.4 kB (+326 B) · 11.2 kB CSS (−31 B) | — | — · — · — |
| Selector | 105.1 kB (+325 B) · 17.4 kB CSS (−31 B) | — | — · — · — |
| Carousel | 73.2 kB (+322 B) · 10.9 kB CSS (−29 B) | — | — · — · — |
| NumberInput | 75.0 kB (+319 B) · 11.4 kB CSS (−26 B) | — | — · — · — |
| CodeBlock | 78.6 kB (+323 B) · 11.3 kB CSS (−31 B) | — | — · — · — |
| BreadcrumbItem | 89.6 kB (+320 B) · 12.1 kB CSS (−31 B) | — | — · — · — |
| TabMenu | 76.7 kB (+320 B) · 11.1 kB CSS (−32 B) | — | — · — · — |
| DrawerHeader | 66.4 kB (+315 B) · 12.9 kB CSS (−29 B) | — | — · — · — |
| MobileNav | 74.0 kB (+313 B) · 10.6 kB CSS (−28 B) | — | — · — · — |
| Timestamp | 35.1 kB (+313 B) · 10.2 kB CSS (−29 B) | — | — · — · — |
| Pagination | 115.3 kB (+325 B) · 17.8 kB CSS (−42 B) | — | — · — · — |
| MobileNavToggle | 63.7 kB (+310 B) · 10.0 kB CSS (−28 B) | — | — · — · — |
| TopNavMegaMenu | 74.4 kB (+311 B) · 11.8 kB CSS (−29 B) | — | — · — · — |
| Button | 63.4 kB (+309 B) · 10.0 kB CSS (−28 B) | — | — · — · — |
| Popover | 95.4 kB (+314 B) · 14.2 kB CSS (−33 B) | — | — · — · — |
| DropdownMenuRadioItem | 23.8 kB (+318 B) · 6.6 kB CSS (−38 B) | — | — · — · — |
| Typeahead | 85.8 kB (+308 B) · 12.5 kB CSS (−28 B) | — | — · — · — |
| AppShell | 95.2 kB (+317 B) · 13.5 kB CSS (−38 B) | — | — · — · — |
| IconButton | 63.4 kB (+306 B) · 10.0 kB CSS (−28 B) | — | — · — · — |
| DialogHeader | 66.2 kB (+309 B) · 11.5 kB CSS (−32 B) | — | — · — · — |
| ChatDictationButton | 64.0 kB (+303 B) · 10.1 kB CSS (−27 B) | — | — · — · — |
| ChatSendButton | 63.8 kB (+307 B) · 10.0 kB CSS (−31 B) | — | — · — · — |
| DropdownMenuSubMenu | 72.9 kB (+305 B) · 9.7 kB CSS (−29 B) | — | — · — · — |
| SideNavHeading | 80.5 kB (+309 B) · 11.3 kB CSS (−33 B) | — | — · — · — |
| Banner | 65.4 kB (+307 B) · 10.5 kB CSS (−32 B) | — | — · — · — |
| ChatLayoutScrollButton | 64.0 kB (+304 B) · 10.2 kB CSS (−29 B) | — | — · — · — |
| ChatComposerInput | 80.5 kB (+299 B) · 11.3 kB CSS (−25 B) | — | — · — · — |
| ChatComposerTokenElement | 80.5 kB (+299 B) · 11.3 kB CSS (−25 B) | — | — · — · — |
| SideNavItem | 75.1 kB (+304 B) · 11.1 kB CSS (−30 B) | — | — · — · — |
| DropdownMenuCheckboxItem | 23.8 kB (+311 B) · 6.6 kB CSS (−38 B) | — | — · — · — |
| FileInput | 72.4 kB (+300 B) · 10.9 kB CSS (−28 B) | — | — · — · — |
| TopNavHeading | 80.0 kB (+302 B) · 11.2 kB CSS (−30 B) | — | — · — · — |
| Calendar | 74.3 kB (+301 B) · 10.6 kB CSS (−30 B) | — | — · — · — |
| BaseTypeahead | 76.6 kB (+291 B) · 10.9 kB CSS (−28 B) | — | — · — · — |
| ChatComposer | 82.8 kB (+289 B) · 12.1 kB CSS (−31 B) | — | — · — · — |
| SideNav | 118.2 kB (+284 B) · 11.4 kB CSS (−32 B) | — | — · — · — |
| ComplexSelector | 75.8 kB (+276 B) · 11.8 kB CSS (−30 B) | — | — · — · — |
| charts/ChartTooltip | 186.5 kB (+232 B) · 451 B CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 284.2 kB (+229 B) · 454 B CSS (0) | — | — · — · — |
| charts/Chart | 209.4 kB (+227 B) · 516 B CSS (0) | — | — · — · — |
| lab/CommentThread | 351.8 kB (+209 B) · 2.4 kB CSS (0) | — | — · — · — |
| SegmentedControl | 100.2 kB (+205 B) · 6.9 kB CSS (0) | — | — · — · — |
| lab/Comments | 358.6 kB (+204 B) · 2.5 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 74.4 kB (+197 B) · 11.5 kB CSS (0) | — | ✓ · ✓ · ✓ |
| CommandPalette | 75.2 kB (+177 B) · 12.7 kB CSS (0) | — | — · — · — |
| charts/ChartLegend | 53.7 kB (+167 B) · 224 B CSS (0) | — | — · — · — |
| ContextMenuItem | 33.3 kB (+202 B) · 6.3 kB CSS (−38 B) | — | — · — · — |
| lab/Schedule | 109.8 kB (+158 B) · 3.9 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 73.7 kB (+184 B) · 13.2 kB CSS (−31 B) | — | — · — · — |
| ToggleButton | 90.1 kB (+177 B) · 10.1 kB CSS (−27 B) | — | — · — · — |
| Switch | 106.8 kB (+143 B) · 10.0 kB CSS (0) | — | — · — · — |
| Slider | 112.4 kB (+138 B) · 8.8 kB CSS (0) | — | — · — · — |
| DateInput | 192.6 kB (+174 B) · 17.0 kB CSS (−39 B) | — | — · — · — |
| Lightbox | 126.0 kB (+166 B) · 10.6 kB CSS (−32 B) | — | — · — · — |
| TimeInput | 167.4 kB (+167 B) · 16.0 kB CSS (−44 B) | — | — · — · — |
| Toast | 101.3 kB (+147 B) · 10.3 kB CSS (−27 B) | — | — · — · — |
| AlertDialog | 109.2 kB (+163 B) · 14.6 kB CSS (−45 B) | — | — · — · — |
| DateTimeInput | 215.2 kB (+143 B) · 18.7 kB CSS (−39 B) | — | — · — · — |
| Spinner | 26.5 kB (+30 B) · 6.2 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 34.1 kB (+27 B) · 8.4 kB CSS (0) | — | — · — · — |
| lab/TabBar | 82.2 kB (+26 B) · 1.8 kB CSS (0) | — | — · — · — |
| Timer | 15.7 kB (+24 B) · 6.0 kB CSS (0) | — | — · — · — |
| Tooltip | 31.1 kB (+24 B) · 4.4 kB CSS (0) | — | — · — · — |
| AvatarGroup | 47.7 kB (+23 B) · 5.8 kB CSS (0) | — | — · — · — |
| HoverCard | 29.3 kB (+22 B) · 4.4 kB CSS (0) | — | — · — · — |
| Avatar | 44.9 kB (+21 B) · 5.6 kB CSS (0) | — | — · — · — |
| Heading | 14.1 kB (+21 B) · 5.5 kB CSS (0) | — | — · — · — |
| Text | 13.6 kB (+21 B) · 5.5 kB CSS (0) | — | — · — · — |
| lab/LineClamp | 15.7 kB (+19 B) · 168 B CSS (0) | — | — · — · — |
| CommandPaletteInput | 33.6 kB (+18 B) · 7.6 kB CSS (0) | — | — · — · — |
| InfoTip | 49.4 kB (+17 B) · 5.4 kB CSS (0) | — | — · — · — |
| StatusDot | 32.8 kB (+16 B) · 5.4 kB CSS (0) | — | — · — · — |
| ChatMessageList | 29.9 kB (+14 B) · 7.1 kB CSS (0) | — | — · — · — |
| ToggleButtonGroup | 40.8 kB (+11 B) · 3.7 kB CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| ProgressBar | 12.0 kB (−1 B) · 6.4 kB CSS (0) | — | — · — · — |
| ButtonGroup | 43.6 kB (−37 B) · 3.7 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.35 MB packed (+3.3 kB); no new dependencies.
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approval waits on a spec decision: this change cites spec:AST-094 FR43 and DEC-21, which exist only in the open spec pull request #8646 and not on main, and the branch also rewords the current component:Button FR15. An engineering owner needs to land or identify the governing spec for a fine pointer's press model on these controls, and to record a decision on the FR15 rewording by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Whatever that decision, the points below still need changes.
- Rebase onto
mainonce the predecessor pull requests land, so this pull request carries only its own five commits instead of 268 files and 41,867 authored lines. - With Reduce Motion and a mouse, the checkbox and radio press release still fades for 200 ms (
CheckboxInput.tsx,RadioListItem.tsx), butdesign:reduced-motionDR3 asks for an immediate change, whichcontrolPressLayer.tsandrowPressLayer.tsalready make with their(prefers-reduced-motion: reduce) and (not (pointer: coarse))arm. - A standalone checkbox's layer declares a 250 ms release while the press controller clears a fine pointer's press after 200 ms, so align the two clocks and assert how long the press stays
fading.
[Automated review]
There was a problem hiding this comment.
Approval waits on one spec decision: the branch rewords the current component:Button FR15 (a 250 ms coarse-pointer release painted on ::before, 200 ms for a Space press and for fine pointers, and a Reduce Motion split), so an engineering owner needs to approve that rewording by commenting /approve-spec <full head SHA> on this pull request, or the record should keep main's FR15 text; the author may do so as an engineering owner. The selection controls' own mouse and pen press is now covered by spec:AST-094 FR11, FR43 and DEC-21 on main. Whatever the FR15 decision, these still need changes:
- Rebase onto
mainonce the predecessor pull requests land, so this pull request carries its own 15 files (996 lines) instead of 269 files and 42,403 authored lines. - With Reduce Motion and a mouse, the checkbox and radio release still fades for 200 ms (
CheckboxInput.tsx,RadioListItem.tsx);design:reduced-motionDR3 asks for an immediate change, whichcontrolPressLayer.tsandrowPressLayer.tsalready make with their(prefers-reduced-motion: reduce) and (not (pointer: coarse))arm. - A standalone checkbox's layer declares a 250 ms release while the press controller clears a fine pointer's press after about 200 ms, so align the two clocks and assert how long the press stays
fading.
[Automated review]
There was a problem hiding this comment.
Approval waits on one spec decision: the branch rewords the current component:Button FR15 (a 250 ms coarse-pointer release painted on ::before, 200 ms for a Space press and for fine pointers, and a Reduce Motion split) and adds a verification row for it, so an engineering owner needs to approve that record by commenting /approve-spec <full head SHA> on this pull request, or the record should keep main's FR15 text; the author may do so as an engineering owner. The selection controls' own mouse and pen press is covered by spec:AST-094 FR11, FR43 and DEC-21 on main. Whatever the FR15 decision, these still need changes:
- Rebase onto
mainonce the predecessor pull requests land, so this pull request carries its own 15 files (996 lines) instead of 271 files and 42,815 authored lines. - With Reduce Motion and a mouse, the checkbox and radio release still fades for 200 ms (
CheckboxInput.tsx,RadioListItem.tsx);design:reduced-motionDR3 asks for an immediate change, which the shared press overlay already makes with its(prefers-reduced-motion: reduce) and (not (pointer: coarse))arm. - A standalone checkbox's layer declares a 250 ms release while the press controller clears a fine pointer's press after about 200 ms, so the fade snaps off at about 15%; align the two clocks and assert how long the press stays
fading.
[Automated review]
…y pointer meta#8696's own change (spec:AST-094 FR43). CheckboxInput, CheckboxList and RadioList take one press model for a finger, a mouse and a pen: their owners and the layer over the box serve every pointer, a RadioList row drops its `:active` press arm, and the press tests read that one model. The pen case follows in its own commit: it needs the pen driver (`webInputDriver`, `PEN_SKIP`) from meta#8666, which lands first. Absorbs meta#8696 (d96069b).
…y pointer meta#8696's own change (spec:AST-094 FR43). CheckboxInput, CheckboxList and RadioList take one press model for a finger, a mouse and a pen: their owners and the layer over the box serve every pointer, a RadioList row drops its `:active` press arm, and the press tests read that one model. The pen case follows in its own commit: it needs the pen driver (`webInputDriver`, `PEN_SKIP`) from meta#8666, which lands in section 1. Absorbs meta#8696 (d96069b).
There was a problem hiding this comment.
Changes requested: one fix is needed before this can be approved.
The mouse and pen press on CheckboxInput, CheckboxList and RadioList follows spec:AST-094 FR11 and DEC-21, and the component:CheckboxListItem AR3, component:Item FR9 and component:CheckboxInput record changes carry an engineering owner's approval for this head. The earlier duplicate nested-control rule is gone: the press controller now relies on the shared container rule.
- A mouse or pen press on a control nested in a CheckboxList row (a link, button or switch in its label or end content) still shades the whole row through the row's
:activepaint (packages/core/src/utils/interactionOverlay.stylex.ts:218-221), while the amendedcomponent:ItemFR9 and its verification row (docs/specs/components/Item/Item.spec.md:117,:192) say such a press paints no row press; give a box-owning row's:activearm the nested-control exemptionRadioListItemuses, with a real-browser case for a CheckboxList row, or narrow the FR9 sentence to the controller's paint and get it approved again.
Non-blocking: cancelNestedTouchPress now covers a mouse and a pen too, so a name such as cancelNestedPress would say so; and the new component:CheckboxInput line limits pressBoxesIn to click-delegating rows, while the controller also calls it for a standalone checkbox.
| * too. A press on the container's surface or on `ownAction` is left alone. | ||
| * Not part of the package's public API. | ||
| */ | ||
| export function cancelNestedTouchPress( |
There was a problem hiding this comment.
Non-blocking: this now covers a mouse's and a pen's press on a box-owning container too, so the name no longer says what it does and the JSDoc has to explain it. cancelNestedPress would.
| - Native checkbox role, checked/mixed state, label, description/status relationships, focus, activation, availability, read-only state, required/invalid/busy state, and form participation. | ||
| - Composition of the resolved checkbox indicator, owner-painted focus ring and pressed overlay (except where a first-party indicator paints its own press; AV1), disabled-reason tooltip, field label, description, and detached status. | ||
| - Ordering between `onChange`, `preventDefault`, optimistic pending state, and `changeAction`. | ||
| - The press-box marks' owner module is `privateAttributes/pressBox.stylex.ts` (public-component-api INV23); its reader `pressBoxesIn` finds the press boxes inside a row, for click-delegating rows (CheckboxListItem, RadioListItem). |
There was a problem hiding this comment.
Non-blocking: the press controller calls pressBoxesIn on every fine-pointer press (packages/core/src/utils/pressFeedback.ts:498-509), a standalone CheckboxInput row included, and the container rule calls it too, so "for click-delegating rows" reads narrower than its use. Suggested: "its reader pressBoxesIn lists the press boxes a pressable surface owns."
On a row that owns a control's box, a mouse's or a pen's press that starts on another interactive element shows no touch pressed paint, as the container rule ends it. A mouse press keeps the row's `:active` paint, as FR9 said before.
|
/approve-spec 4f143b2 |
|
/approve-spec 4f143b2 |
|
Decision: D-20261111-283 |
There was a problem hiding this comment.
Changes requested: one fix is needed before this can be approved.
The mouse and pen press on CheckboxInput, CheckboxList and RadioList follows spec:AST-094 FR11 and DEC-21, and the component:CheckboxListItem AR3, component:Item FR9 and component:CheckboxInput record changes carry an engineering owner's approval for this head.
- Miss: after a mouse click that unchecks a CheckboxList row with the pointer still on it, the row fades to clear (about 145 ms after release) and only then does its 0.05 hover tint return, while
mainsettles straight on the hover tint, because Item's overlay withholds its hover colour while the press fades (packages/core/src/utils/interactionOverlay.stylex.ts:231-232) and this change sends that row's mouse press through the fade (packages/core/src/CheckboxList/CheckboxListItem.tsx:315); end the release at the hover tint while the pointer stays over the row, and add a Chromium case that samples the row's paint through an unchecking click (a click that checks the row fades onto the checked fill and shows no dip).
Non-blocking: FR9's last sentence ("A mouse press keeps the row's :active paint") now reads as covering a mouse press on a box-owning row's own surface, which the press controller paints; "Such a mouse press keeps the row's :active paint" keeps the intended meaning.
| const rowOwnsPress = isTouch && hasRowInteraction && !effectiveDisabled; | ||
| // A delegating row is the option's only press surface, for every pointer. A | ||
| // press anywhere on it presses the row. | ||
| const rowOwnsPress = hasRowInteraction && !effectiveDisabled; |
There was a problem hiding this comment.
Miss: with this, a fine-pointer mouse click on a CheckboxList row goes through the controller's release, and Item's overlay withholds the row's hover colour while data-astryx-press is fading (utils/interactionOverlay.stylex.ts:231-232). With the pointer still on the row, the shade fades from 0.102 to 0.007 by 120 ms, the row is clear at 137 ms, and the 0.05 hover tint returns by 187 ms. On main it eases from 0.10 to 0.05 in about 50 ms. Please end a mouse or pen release at the hover tint while the pointer stays over the row, and add a Chromium case that samples the row's paint through that release (the jsdom cases read only the attribute).
There was a problem hiding this comment.
The release fade is recorded behavior: spec:AST-094 FR11 gives a fine pointer "the same press controller and release fade as a finger's, in place of CSS :active".
| | FR6 | `first-line` MUST hold in every density, in `stacked` and `inline` layouts, with `labelLines` truncation, and in plain, button, link, link-root, delegated, and parent-role rows. In right-to-left text it MUST produce the same block-axis placement with the slots mirrored by logical order and no DOM reordering. | `architecture:internationalization` | settled | | ||
| | FR7 | The `item` theme target MUST reflect the resolved alignment as its existing `align` selector axis, including `first-line`, and Item's public theming metadata MUST list that value. The alignment axis adds no new target or theme-level default. | `architecture:component-theming-surface/INV6`; `component:Item/DEC-2` | settled | | ||
| | FR8 | ListItem, RadioListItem, and CheckboxListItem MUST expose `align` with Item's values and default and forward it unchanged to the Item row they render. A composing row MUST NOT drop, remap, or narrow the value. | Owner direction | settled | | ||
| | FR9 | An interactive row (an `onClick` row, an `href` row, or a delegated row with `interactiveRef`) shows its touch pressed paint only for a press that would activate it: a finger press on the row's surface or on its own action (its invisible button or link, or the control it delegates to) paints the row, and a finger press that starts on another interactive element inside the row paints none. In a row with a parent-supplied `role`, or a row whose root is a link, a press on a nested control activates the row, so it paints. On a row that owns a control's box, as a CheckboxList or RadioList row does, a mouse's or a pen's press that starts on another interactive element shows no touch pressed paint either. A mouse press keeps the row's `:active` paint. | Owner direction, 2026-11-03: no pressed state on a container for a press that does not activate it; owner decision, 2026-11-11: a mouse and a pen too, on a row that owns a control's box | settled | |
There was a problem hiding this comment.
Non-blocking: without the old "Elsewhere,", "A mouse press keeps the row's :active paint" reads as covering every mouse press. On a CheckboxList or RadioList row, the controller now paints a mouse press on the row's own surface (AR3; spec:AST-094 FR11). "Such a mouse press keeps the row's :active paint" keeps it to the nested-control press this sentence is about.
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The mouse and pen press on CheckboxInput, CheckboxList and RadioList follows spec:AST-094 FR11 and DEC-21, and the component:CheckboxListItem AR3, component:Item FR9 and component:CheckboxInput record changes carry an engineering owner's approval for this head. A hovered CheckboxList row that fades to clear before its hover tint returns after an unchecking click is FR11's finger release fade as you read it, so it does not block; if owners want a mouse release to end on the hover tint, FR11 or Item's record needs to say so.
Non-blocking:
- FR9's last sentence, "A mouse press keeps the row's
:activepaint" (docs/specs/components/Item/Item.spec.md:117), now reads as covering every mouse press on a box-owning row; "Such a mouse press keeps the row's:activepaint" keeps the intended meaning. cancelNestedTouchPress(packages/core/src/hooks/useClickableContainer.ts:141) now covers a mouse and a pen too;cancelNestedPresswould say so without the JSDoc caveat.- The
component:CheckboxInputline aboutpressBoxesIn(docs/specs/components/CheckboxInput/CheckboxInput.spec.md:86) names only click-delegating rows, but the controller calls it for every fine-pointer press. - The reworded RadioListItem comment still says the row declares "the mouse press's paint" (
packages/core/src/RadioList/RadioListItem.tsx:101-104); that arm now paints only a press the controller does not paint.
| // The row remains the large press target, but nested controls keep their | ||
| // independent action and do not make the radio appear pressed: the |
There was a problem hiding this comment.
Non-blocking (INV29): the sentence this rewords still says the row declares "the mouse press's paint (rowStyles.press)" (line 103), but that arm now paints only a press the controller does not paint (:190-206). Suggested: "the row declares the paint of a press the controller does not paint (rowStyles.press) and this layer reads it."
|
/approve-spec f7bc1e9 |
|
Decision: D-20261111-355 |
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
The mouse and pen press on CheckboxInput, CheckboxList and RadioList follows spec:AST-094 FR11 and DEC-21, and the component:CheckboxListItem AR3, component:Item FR9 and component:CheckboxInput record changes carry an engineering owner's approval for this head. The merge of main leaves the change itself as it was, and the notes from the last review still apply.
Non-blocking:
- A hovered CheckboxList row fades to clear before its hover tint returns after an unchecking click; this is FR11's finger release fade as you read it, and if owners want a mouse release to end on the hover tint, FR11 or Item's record needs to say so.
- FR9's last sentence, "A mouse press keeps the row's
:activepaint" (docs/specs/components/Item/Item.spec.md:117), now reads as covering every mouse press on a box-owning row; "Such a mouse press keeps the row's:activepaint" keeps the intended meaning. cancelNestedTouchPress(packages/core/src/hooks/useClickableContainer.ts:141) now covers a mouse and a pen too;cancelNestedPresswould say so without the JSDoc caveat.- The
component:CheckboxInputline aboutpressBoxesIn(docs/specs/components/CheckboxInput/CheckboxInput.spec.md:86) names only click-delegating rows, but the controller calls it for every fine-pointer press. - The reworded RadioListItem comment still says the row declares "the mouse press's paint" (
packages/core/src/RadioList/RadioListItem.tsx:101-104); that arm now paints only a press the controller does not paint.
|
/approve-spec f7bc1e9 |
|
Decision: D-20261111-451 |
Review wording after the selection-mark press change (meta#8696). Its nested-control rule covers a mouse's and a pen's press too, on a container that owns a control's box. So cancelNestedTouchPress becomes cancelNestedPress. The records and one comment say what the code does: - Item FR9's last sentence covers only such a mouse press. - The CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, not only a click-delegating row's. - RadioListItem's comment says the row declares the paint of a press the controller does not paint. No behavior changes.
#11304) * refactor(core): name the nested press rule for every pointer it covers Review wording after the selection-mark press change (#8696). Its nested-control rule covers a mouse's and a pen's press too, on a container that owns a control's box. So cancelNestedTouchPress becomes cancelNestedPress. The records and one comment say what the code does: - Item FR9's last sentence covers only such a mouse press. - The CheckboxInput record says pressBoxesIn lists the press boxes a pressable surface owns, not only a click-delegating row's. - RadioListItem's comment says the row declares the paint of a press the controller does not paint. No behavior changes. * refactor(core): selection-control press arms move to the press owner CheckboxInput and RadioListItem wrote selectors on the private press attribute themselves. press.stylex.ts, the attribute's owner, now exports those styles ready-made: indicatorPressPaintStyles for the layer over a selection control's box, and rowPressPaintStyles.radioRow for a RadioList row's paint. The nested-control list moves with the row's paint, and its source-build test reads the owner module. The press coverage test counts the owner's ready-made paint as a press arm. The stylesheet the package builds is byte-identical. * chore(core): drop the moved press sites from the lint baseline CheckboxInput and RadioListItem no longer write data-astryx-press, so the private-attribute rule's baseline drops their four allowed sites. The press owner module's header names its role, not each export. * chore(core): compose a checkbox's press paint only off a row's press Under a row that owns the press, CheckboxInput's row overlay paints the box. So CheckboxInput no longer composes the press owner's activeFill and image styles there, only for StyleX to drop them. The rendered classes and the stylesheet stay the same. The owner's JSDoc says where each of its indicator styles goes. * Merge main 5398a99 into the nested press rename Main brings in the Item swipe change. It edits Item.tsx's swipe props and one dev warning, a few lines below this branch's renamed call. The merge needs no hand edit.
User need
With a mouse, a checkbox, a CheckboxList row or a radio option drops its press shade at once on release, where a finger's press fades.
spec:AST-094FR11 and DEC-21 ask for one model.Problem and solution fit
pointerdown, in place of:active, and fades it on release.Current specification
spec:AST-094FR11 and DEC-21: under a fine pointer, a press paints at once through the press controller. A pen presses at once; the scroll brake stays a finger's.design:reduced-motionDR3, applied by AST-094 FR43: under Reduce Motion, a fine pointer's release changes at once.component:CheckboxListItemAR3, amended here: a finger, a mouse or a pen held on a delegating row's box presses the whole row. Its verification row agrees.component:ItemFR9, amended here: on a row that owns a control's box, a mouse's or a pen's press on a nested control shows no touch pressed paint either.component:CheckboxInputORD3 and FR11, withdesign:user-statesDR1: read-only limits only value changes, so a read-only checkbox keeps its press.Public delta and caller burden
Design and alternatives
:active.:activewith a transition, which cannot fade after release.Writing rubric results
Scope
Testing
pnpm exec vitest run --project ui, andpnpm exec vitest run packages/core/src packages/lab/src scriptspnpm exec tsc --noEmit -p packages/core/tsconfig.json, and the same forpackages/labpnpm lint:strictspec:AST-094FR11 gives a fine pointer, which a pen is, the profile with no delay, and DEC-21 keeps the scroll brake touch-only.Compared with the earlier heads. c574768 is the head an earlier preview showed, and e91b7d6 was the first re-cut on main.
pointerdownand fades on release:active, and a press on the label leaves the box blankThis head differs from c574768 where current records ask: the read-only row (DR1) and the Reduce Motion row (DR3). A read-only row takes no row press at any of these heads. Not carried, from closed pull requests: #8682, every other control's mouse press, and #8233, a compositor release with UIKit's times. The release here is main's, 175 ms on the theme's exit curve.
This head is f7bc1e9. Its first merge, 94daf4e, merges main 08b7422 into 0a347b4 with no hand edits, and the change's own diff is unchanged (patch-id 0e2d190460cf). Seven commits follow:
check:changesetsrequires.finePress.tsand its shared slot go. Snap paging's bundle test dropsprimaryClickandisApplePlatformfrom its pager list, as shared press code.pressBoxesInincomponent:CheckboxInput's ownership list.Then ce9dab2 merges main f27380a into 75464ad with no hand edits, and the own diff keeps its patch-id (fb94cd8bb2). Three commits follow:
cancelNestedTouchPress), which a finger's press already used, now ends a mouse's or a pen's press too, on a container that owns a control's box. The press controller's own list of links and buttons goes. At 75464ad, a mouse or a pen press on a select in a RadioList row's end content pressed the row, and a finger's did not. Now none does. RadioListItem's:activearm exempts the same controls, andpressBoxesInlists only the boxes a surface owns.component:ItemFR9 and its verification row, as the owners asked. The other changed lines in those two tables are prettier's re-padding.:activeshade, as on main and at e91b7d6.Then f7bc1e9 merges main b8835b8 into 4f143b2 with no hand edits, and the own diff keeps its patch-id (230ab7c3d7). That main brings in
#11169, which keeps Item's disabled actions focusable, and #11155, whose gesture-host clock fix also widens the input clock's type inutils/inputAge.ts; the Item, row and press cases pass here.At this head, at one worker. The change's own code is 0315add's, since b5e2559 and 4f143b2 change only a record:
on; CheckboxList's nested-switch case; the container rule's box case; and the three cases that read the row's:activearm. All pass here. The new browser case fails against ca084a0's Storybook in Chromium, where the row readsdata-astryx-press="on".selectfrom the:activearm's exemptions. The unit that keeps the two lists equal fails.pressBoxesInlist a box that another surface owns. One case fails: a surface around another surface's box takes the fine-pointer press.uiproject passes, 992 files and 24,437 tests,theme/derivedVarRegistry.test.tsamong them. The bundle and shared-identity tests pass, andpnpm lint:stricthas 0 errors. The 11 press interaction specs pass 90 in Chromium, with 8 skipped, and 75 in WebKit, with 23 skipped. The new select case passes in both. The 16 checkbox, radio and press a11y specs pass 149 in Chromium.At ca084a0, the code of 75464ad, at one worker:
data-astryx-press="on"in SelectionMarkFinePress. Both pass here.isApplePlatform.tsandprimaryClick.ts, and passes here.uiproject passes, 984 files and 24,225 tests,theme/derivedVarRegistry.test.tsamong them. The bundle and shared-identity tests pass, andpnpm lint:stricthas 0 errors. The 11 press interaction specs pass 89 in Chromium, with 8 skipped, and 74 in WebKit, with 23 skipped. The 16 checkbox, radio and press a11y specs pass 148 in Chromium.Earlier evidence, at the heads it names, all at one worker:
:activefill under a row's press. Two row units fail.--_indicator-active-press. The circle's stylesheet unit fails.git rev-parse HEAD, because the local container has no repository.:activepins.circleCheck.test.tsxandRadioListItem.press.source-build.test.mjsread the new arms.scripts/snap-paging-bundle.test.mjslistedprimaryClickandisApplePlatformas pager-only, and the press controller imports them. This head drops them from that list.Public and internal API delta
Public: none. Internal: no new internal module, registry or private attribute. What remains, each private to Core:
pressBoxesIn(surface)in the existingprivateAttributes/pressBox.stylex.ts, the press-box attribute's owner module: the marked boxes a surface owns, with no other pressable surface betweenpressBoxesIn(surface).length > 0in the press controller and in the container rulepressBoxAtfinds only the box a press starts in, so it misses a press on a row's labelcancelNestedTouchPressinhooks/useClickableContainer.ts: on a container that owns a control's box, it also ends a mouse's or a pen's press that starts on a nested controlcancelNestedTouchPress(event, row, ownAction), as beforeuseClickableContainercallers see no change--_indicator-active-press, declared by the CheckboxInput rowvar(--_indicator-active-press, var(--color-overlay-pressed))in the lab CircleCheckIndicator:activefill under the press image--_indicator-press-imageand--_checkbox-row-press-paint: they carry every pointer's press, not only a finger'svar(--_checkbox-row-press-paint), as beforeExisting modules considered: the fine-pointer press reads the press box that CheckboxInput and RadioListItem already mark, in place of a new attribute and module. The press controller imports the existing
utils/primaryClick.ts, in place of an install slot. A nested control's press follows the existing container rule, in place of the controller's own list. No new module or hook remains.component:CheckboxInputnames the newpressBoxesInexport under its ownership list (75464ad);architecture:public-component-apiINV23 lets an owner module export the readers its package needs.component:ItemFR9 records the container rule's mouse and pen scope (b5e2559, scoped to the touch pressed paint in 4f143b2).Size: +1184/−205 lines in 26 files (b8835b8..f7bc1e9). Against main b8835b8, bundled with the size report's esbuild options and gzipped, a page with Carousel, CheckboxInput, CheckboxList and RadioList grows 345 B, and Carousel alone grows 345 B.