Repository navigation
Conversation
… first-load scope, INV9)
…ses and states INV9 as its own rule
…esses and INV7's failure signal
… group and menu tracking owners
… cards stop painting for nested mouse presses
…d scopes INV4's signal to one profile
…TreeList, Token and the cards; gaps stated
…m, TreeList and Token
…eact-component-runtime INV13 reconciled)
…d-press gaps; list only tested cases
…en Remove cases; scope each gap to what is untested
…ts follows the every-pointer rule
…nly the control, for every pointer A browser applies :active to every ancestor of the pressed element, so a mouse or pen press on a control inside a ClickableCard, SelectableCard, Item row, TreeList row or Token also painted the container. The container rule, which already stopped a finger's press there, now marks the container for a mouse or pen press too: the shared press styles read --_nested-press-paint in their :active arms, and the marked container paints its rest look instead, hover included. Each style resets the property on its own element, so the nested control keeps its own press. press-feedback INV5 states that a key press that activates a control paints its press until release; INV7's gap note goes. Builds on cixzhang's draft in #9930.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…to l0/container-nested-press
…which acts on key down, paints none
|
/approve-spec 3270bc6 |
There was a problem hiding this comment.
Changes requested: five component records still describe the gap this change closes.
The fix itself works: in Chromium, a mouse press on the nested control leaves ClickableCard, SelectableCard, the Item row, the TreeList row and Token at their hover tint, a press on the container's own surface still paints it, and the new jsdom tests fail on the base and pass here.
- The ClickableCard (FR5), SelectableCard (FR4), Item (FR9), TreeList (FR7) and Token (FR6) records still say a mouse or pen press on a nested control paints the container, and the Item and Token verification rows still list those cases as untested, so drop the five gap sentences and point those rows at the new tests, as this pull request already does for the press-feedback record, then re-approve the records at the new head.
Smaller points: nothing checks the Enter half of the new INV5 sentence, and the Chromium results the description promises are not posted yet. This lands only after #12115, whose records it implements.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Changeset: a mouse or pen press on a control inside the five containers paints only the control: verified (Chromium mouse captures; jsdom mouse and pen tests).
- Changeset: the container keeps its hover look: verified (its surface keeps the hover value during the press).
- Changeset: a press on the container's own surface still paints it, and a link-root Item row still paints: verified (surface capture; jsdom link-root case).
- Description: before, a mouse or pen press on the nested control painted the container while a finger did not: verified (base captures; the base rule skipped non-touch presses).
- Description: link-root and parent-role Item rows, an Item's delegated control and Token's own button still paint the container: verified (jsdom cases; a parent-role row gets no handler).
- Description: a held Space key still paints a control's and a container's action press: verified by code (no key handling changed); the pull request's Chromium cases are not reported yet.
- Description: the mark is set on pointerdown and cleared at release, cancel or the next press, and the press-box check is gone: verified (code and jsdom).
- Description: the shared press styles read the property in their
:activearms, reset it on their own element and declare a rest look: verified (code). - Description: no new data attribute, prop, export or default; hover, the finger path and
:activetiming unchanged: verified (source diff; hover frames identical). - Description: the new jsdom tests fail on the base and pass here (47): verified (20 of 47 fail on the base; all pass on the head).
- Description: the Chromium spec checks the presented pixels, with results to follow: the checks are as described; results not posted (this review's own captures cover the mouse cases).
- Description: the wider suites, the build-css guard, typecheck, lint and repository checks pass: partly verified (436 tests in 14 neighbouring files and the build-css test pass here; the rest not rerun).
- Description: removing the mark fails the jsdom tests: verified (the base, without it, fails them); removing the
var()read fails the Chromium case: not rerun (base frames, without it, paint the container). - Description: the INV7 gap note goes because this change closes it: true for the press-feedback record, but the same gap stays in five component records (blocking finding).
- Description: the INV5 sentence is checked by the Space-key cases: partly; nothing checks the Enter half.
Files:
.changeset/nested-control-press-every-pointer.md: clearapps/storybook/stories/NestedControlPress.stories.tsx: cleardocs/architecture/press-feedback.md: finding (the component records keep the gap it removes)packages/core/src/ClickableCard/ClickableCard.nestedPress.test.tsx: clearpackages/core/src/ClickableCard/ClickableCard.tsx: clearpackages/core/src/SelectableCard/SelectableCard.tsx: clearpackages/core/src/__tests__/NestedControlPress.a11y.chromium.spec.ts: clear (results not posted)packages/core/src/__tests__/nestedControlPress.test.tsx: clearpackages/core/src/hooks/useClickableContainer.test.tsx: clearpackages/core/src/hooks/useClickableContainer.ts: clear (one comment-wording suggestion)packages/core/src/privateAttributes/press.stylex.ts: clearpackages/core/src/utils/interactionOverlay.stylex.ts: clearscripts/build-css.test.mjs: clear- The other 150 files: carried unchanged from
mainby a merge ofmain(identical tomain), not this pull request's changes
| } | ||
|
|
||
| /** | ||
| * The custom property that turns off a container's `:active` press paint. The |
There was a problem hiding this comment.
Non-blocking (comment style): the second sentence of this JSDoc runs to 30 words. A shorter form: "The SYNC styles paint the pressed overlay as var(--_nested-press-paint, <pressed overlay>). Each resets it to initial on its own element, so a nested control keeps its press."
…ress # Conflicts: # docs/architecture/press-feedback.md
…d-control press gaps close Each record drops its mouse-and-pen gap note, and its verification row names the tests that press a nested control with a finger, a pen and a mouse. The jsdom test adds the finger case for each container.
…ction paints no container press yet Chromium gives a key's :active only to the focused element, so a card's or row's hidden action paints nothing on the container. The readiness row names the gap; the real-browser spec keeps the Button's held-Space guard and leaves the containers' cases to the follow-up.
|
/approve-spec 8b27ee4 |
There was a problem hiding this comment.
Changes requested: the fix works, but three pieces of text still describe the old behavior.
In Chromium, a mouse press on the nested control now leaves ClickableCard, SelectableCard, the Item row, the TreeList row and Token at their hover tint, a press on the container's own surface still paints it, and the new jsdom tests fail on main and pass here. Once the points below are fixed, this can be approved pending CI.
- Miss:
packages/core/src/hooks/useClickableContainer.doc.mjsstill says at lines 67 and 102 that a mouse:activepress paint is unchanged, so builders who compose the documentedinteractionOverlayStylesrecipe are told the opposite of what ships; update bothonPointerDowndescriptions to match the new JSDoc. docs/specs/components/Token/Token.spec.md:252names the new tests for a pen and a mouse press on Remove, but its Gap sentence still says no test asserts that case, so drop that clause.- The description says the two new test files pass 47/47 although they hold 53 tests at this head, and says the Button Space case checks the new INV5 sentence although nothing checks its Enter half, so correct the count and either add an Enter case or narrow that line.
Claims and files checked
Review mode: same-head; reason: none
Claims
- A mouse or pen press on a control inside the five containers no longer paints the container, as a finger's press already did: verified (jsdom tests fail on the base and pass here; Chromium press frames).
- The container keeps its hover look: verified (cards and rows stay at the hover tint in Chromium).
- A press on the container's own surface still paints it, and a link-root Item row still paints for a nested press: verified (Chromium surface press; jsdom link-root case).
- A parent-role Item row still paints for a nested press: verified by code (the row gets no nested-press handler).
- A delegated control and Token's own button paint the container: verified (jsdom cases).
- A held Space key still paints a Button's press: verified (Chromium probe, both trees).
- The cause is
:activereaching every ancestor, and the container rule already covered the finger: verified (the base's early return for non-touch presses; base frames). - The mark lasts until the release, a cancel or the container's next press, and the press-box check is gone: verified (
useClickableContainer.ts:152-215). - The shared styles and both cards read the mark, reset it and declare their rest look: verified.
- No new data attribute, prop, export or default; hover, the finger path and
:activetiming are unchanged: verified (one existing export's type gains two private keys). - The new tests fail on the base for all five containers, mouse and pen: verified (20 of 53 fail on the base).
- Those tests pass 47/47: false (53 tests at this head, all passing).
- The Chromium spec covers mouse, pen, finger, surface and the Button's Space press: verified by reading the spec; not run.
- The neighbouring suites pass: verified at this head.
- The CSS build test still finds the shared overlay's arms: verified (16 tests pass).
- Removing the mark fails the jsdom tests: verified (the base run).
- The records add the Space sentence, drop the nested-press gap and name the held-Space container gap, which predates this change: verified (records; Chromium probe on both trees).
- Five component records drop their gap notes and name the new tests: false for Token, whose verification row keeps the Remove gap.
- The new key-press sentence is checked by the Button Space case: false for its Enter half.
- TypeScript, ESLint, the knowledge check and the changeset check are clean: verified (core typecheck, ESLint on the changed files, both checks).
- Changeset: a mouse or pen press on a nested control paints only that control, the container keeps its hover look, and surface and link-root presses still paint: verified, with a wording note on Token's Remove.
Files
.changeset/nested-control-press-every-pointer.md: clear (non-blocking wording note on Token's Remove).apps/storybook/stories/NestedControlPress.stories.tsx: clear.docs/architecture/press-feedback.md: clear.docs/specs/components/ClickableCard/ClickableCard.spec.md: clear.docs/specs/components/Item/Item.spec.md: clear.docs/specs/components/SelectableCard/SelectableCard.spec.md: clear.docs/specs/components/Token/Token.spec.md: finding (verification row keeps a tested case as a gap).docs/specs/components/TreeList/TreeList.spec.md: clear.packages/core/src/ClickableCard/ClickableCard.nestedPress.test.tsx: clear.packages/core/src/ClickableCard/ClickableCard.tsx: clear.packages/core/src/SelectableCard/SelectableCard.tsx: clear.packages/core/src/__tests__/NestedControlPress.a11y.chromium.spec.ts: clear.packages/core/src/__tests__/nestedControlPress.test.tsx: clear.packages/core/src/hooks/useClickableContainer.test.tsx: clear.packages/core/src/hooks/useClickableContainer.ts: finding (its published doc file still describes the old mouse behavior); non-blocking comment-length note.packages/core/src/privateAttributes/press.stylex.ts: clear.packages/core/src/utils/interactionOverlay.stylex.ts: clear.scripts/build-css.test.mjs: clear.
…s gap match the shipped nested press
|
/approve-spec 62e8b70 |
PR Analysis Report
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet.
The fix holds: in Chromium, a mouse press on the nested control now leaves ClickableCard, SelectableCard, the Item and TreeList rows and Token at their hover tint, a press on the card's own surface still paints it, and the new jsdom tests fail on main and pass here. The three text issues from the last review (the hook docs, Token's verification row and the description) are fixed.
Non-blocking:
- The changeset says a press "now paints only that control", but Token's Remove button has no press paint of its own, so nothing on screen changes for it; "shows no pressed state on the container" matches what ships.
- A few new comments run past the 25-word sentence limit (
useClickableContainer.ts:140-143,ClickableCard.tsx:100-102,SelectableCard.tsx:120-122).
Claims and files checked
Review mode: full; reason: spec-record
Claims:
- A mouse or pen press on a nested control no longer paints ClickableCard, SelectableCard, Item rows, TreeList rows or Token, matching the finger: verified (new jsdom cases fail on the base and pass here; Chromium frames for all five).
- The container keeps its hover look, and a press on its own surface still paints it: verified (Chromium hover tint kept; surface press paints on both trees).
- Link-root and parent-role Item rows, delegated controls and Token's own button still paint for their own press: verified (jsdom cases; the parent-role row gets no handler in
Item.tsx). - A held Space still paints a Button's press: verified (Chromium, identical on both trees).
- Only where the press paints changes; hover, the finger path and
:activetiming are unchanged, with no new data attribute, prop, export or default: verified (diff; the one public type change is two private keys oninteractionOverlayStyles). - The new tests fail on the base for every container and pointer, and 53 of 53 pass here: verified (20 of 53 fail on the base).
- The neighbouring suites and the CSS order guard pass: verified (177 files, 3,889 tests;
build-css.test.mjs16 tests). - TypeScript, ESLint, the knowledge check, the changeset check and the private-attribute baseline are clean: verified.
- The Chromium spec's mouse, surface and Space cases fail or pass as described: verified by this review's own Chromium capture; its pen and finger cases were not re-run here.
- The press-feedback record gains the Space and Enter sentence, drops the nested-press gap and names a held-Space container gap; five component records drop their gap notes and name the new tests: verified (the Enter half has no test, as the description says).
- Changeset: a mouse or pen press on a nested control paints only that control, the container keeps its hover, and its own surface and link-root rows still paint: verified, with the Remove wording note above.
Files:
.changeset/nested-control-press-every-pointer.md: non-blocking wording note.apps/storybook/stories/NestedControlPress.stories.tsx: clear.docs/architecture/press-feedback.md: clear.docs/specs/components/ClickableCard/ClickableCard.spec.md: clear.docs/specs/components/Item/Item.spec.md: clear.docs/specs/components/SelectableCard/SelectableCard.spec.md: clear.docs/specs/components/Token/Token.spec.md: clear.docs/specs/components/TreeList/TreeList.spec.md: clear.packages/core/src/ClickableCard/ClickableCard.nestedPress.test.tsx: clear.packages/core/src/ClickableCard/ClickableCard.tsx: non-blocking comment length.packages/core/src/SelectableCard/SelectableCard.tsx: non-blocking comment length.packages/core/src/__tests__/NestedControlPress.a11y.chromium.spec.ts: clear.packages/core/src/__tests__/nestedControlPress.test.tsx: clear.packages/core/src/hooks/useClickableContainer.doc.mjs: clear.packages/core/src/hooks/useClickableContainer.test.tsx: clear.packages/core/src/hooks/useClickableContainer.ts: non-blocking comment length.packages/core/src/privateAttributes/press.stylex.ts: clear.packages/core/src/utils/interactionOverlay.stylex.ts: clear.scripts/build-css.test.mjs: clear.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] A mouse or pen press on a control inside a ClickableCard, SelectableCard, Item row, TreeList row or Token now paints only that control, as a finger's press already did. The container keeps its hover look and shows no pressed state. A press on the container's own surface still paints the container, and an Item row whose root is a link still paints, because a press there runs the row. |
There was a problem hiding this comment.
Non-blocking: Token's Remove button has no press paint of its own, so after this change a mouse press on it shows no press anywhere; "now paints only that control" reads as if Remove lights up. "shows no pressed state on the container" matches what ships.
User impact
interactiveRef) and a Token's own button paint the container, as its own action. A held Space key still paints a control's press (a Button's).Problem and solution fit
:active, and a browser applies:activeto every ancestor of the pressed element, so the container's:activearm matches too.cancelNestedPress) ends the press controller's paint for a press that starts on a nested control. Mouse and pen presses were the gap.The fix extends that same rule to a mouse and a pen. A press that starts on a nested control, other than the container's own action, sets
--_nested-press-painton the container until the press ends. The shared press styles':activearms paintvar(--_nested-press-paint, <pressed overlay>). Each style also declares--_nested-press-rest, its look at rest under the pointer, and the mark points the container's paint at that. Each style resets--_nested-press-painton its own element, so a nested control, a nested row or a nested card keeps its own press. The press keeps:activetiming; only where it paints changes.Expected behavior and authority
architecture:press-feedbackINV7 (docs(architecture): press feedback has one engine and three recipes #12115): a press paints the surface it lands on that invokes the action, and nothing else, for every pointer. A press on a nested interactive element that does not activate the row or card paints that element only. A row whose root is a link, or that carries a parent-supplied role, paints, because a press there activates it.component:ClickableCardFR5 andcomponent:SelectableCardFR4, as docs(architecture): press feedback has one engine and three recipes #12115 amends them;component:ItemFR9;component:TreeListandcomponent:Tokenas docs(architecture): press feedback has one engine and three recipes #12115 amends them.architecture:press-feedback(Owner decisions, 2026-11-16).Smallest restoration
hooks/useClickableContainer.ts:cancelNestedPressmarks the container for a primary mouse or pen press on a nested control and clears the mark at the release, a cancel, or the container's next press. It no longer needs the press-box check, since the rule now covers every pointer.utils/interactionOverlay.stylex.tsandprivateAttributes/press.stylex.ts: the:activearms read the custom property; each style resets it and declares its rest look.ClickableCard.tsxandSelectableCard.tsx: the cards' own overlay arms do the same.:activetiming are unchanged. Moving mouse presses onto the press engine (INV5) stays out of scope.Evidence
__tests__/nestedControlPress.test.tsxfails on the base for all five containers, for both a mouse and a pen (the container is never marked).hooks/useClickableContainer.test.tsx"turns off the container’s press paint for a mouse or pen press…" fails on the base.__tests__/NestedControlPress.a11y.chromium.spec.tschecks the presented pixels in Chromium for each container:Real-Chrome stills follow below once the run finishes.
scripts/build-css.test.mjsstill finds the shared overlay's pressed arm after its hover arm at equal specificity, and the bare pressed rule for touch.cancelNestedPressfails the jsdom tests. Removing thevar()read from an arm fails that container's Chromium case.Records
architecture:press-feedback::activeonly to the focused element, and that was so before this change; a follow-up pull request fixes it.component:ClickableCardFR5,component:SelectableCardFR4,component:ItemFR9,component:TreeListFR7 andcomponent:TokenFR6 drop their mouse-and-pen gap notes. Their verification rows name the new tests and the finger, pen and mouse cases. Item's row keeps a gap for a row with a parent-supplied role.Writing rubric results
Records touched:
architecture:press-feedback;component:ClickableCard,component:SelectableCard,component:Item,component:TreeList,component:Token(gap notes and verification rows).Scope
Components: ClickableCard, SelectableCard, Item, TreeList, Token, useClickableContainer, interactionOverlay, press styles
Testing
vitest run packages/core/src/__tests__/nestedControlPress.test.tsx packages/core/src/hooks/useClickableContainer.test.tsx: red on the base for the mouse and pen cases, green here; the finger case per container passes on both.vitest runover hooks, ClickableCard, SelectableCard, Item, TreeList, Token, List, CheckboxList, RadioList, Button, utils, privateAttributes and Thumbnail: 3,882 pass. One Tokenizer bottom-sheet announcement case timed out under machine load; it passes alone.scripts/build-css.test.mjs: pass. TypeScript, ESLint,check:knowledge,check:changesetsand the private-attribute baseline: clean.playwright test NestedControlPress.a11y.chromium.spec.ts(Chromium, desktop and phone contexts): on the base the 10 mouse and pen nested cases fail; at this change they pass, with the finger, surface and Button Space cases passing on both. Stills follow at that later head.Builds on cixzhang's draft in #9930, which marked the cards for a mouse press.
#12115, the record this implements, has merged; main is merged in. In the merge order this PR follows the device-tested pull requests #11813, #10062, #8200, #9777 and #8206, #8084 and #10462, whose device evidence it would void, and takes its real-Chrome stills at that head.
Overlap checked: #12115 (base of this stack; records only), #9930 (closed draft this supersedes)
Owner: Astryx fix-loop lane 0. Land path: CodeBunny approval of the exact head, Specs stamp, CI, then the merge queue after #12115.