Repository navigation
fix(ClickableCard, SelectableCard): no touch pressed look for a finger press that starts on a control inside the card - #9801
Conversation
…hat starts on a control inside it A press on a button, link or InfoTip inside a ClickableCard or SelectableCard does not open the card, yet the card looked pressed: a mouse's :active reaches every ancestor of the pressed element, and the touch press controller painted the nearest pressable surface, the card. useClickableContainer returns onPointerDown beside onClick and onMouseUp. It applies the test onClick uses (hasInteractiveAncestor): for a press that starts on a nested interactive element, it marks the container for the press (privateAttributes/nestedPress.stylex.ts) and cancels the press controller's paint on it (cancelPress). The cards' mouse press arm, now in nestedPressStyles.cardPressOverlay, stays at rest while the mark is on. ClickableCard and SelectableCard spread it, composed with a caller's onPointerDown; Item's delegated rows and TreeList's link rows spread it too. A container that does not spread it works as before.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 076f4e9 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TreeList · Storybook | 39.0 kB (+99 B) · 5.0 kB CSS (0) | 1,154 (+2) | ✗ · ✓ · ✓ |
| RadioList | 🔴 43.0 kB (+2.3 kB) · 6.9 kB CSS (+590 B) | — | — · — · — |
| Field | 🔴 41.6 kB (+2.3 kB) · 6.9 kB CSS (+590 B) | — | — · — · — |
127 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| FieldLabel | 🔴 37.6 kB (+2.2 kB) · 5.4 kB CSS (+595 B) | — | — · — · — |
| Overlay | 21.1 kB (+1.3 kB) · 4.0 kB CSS (0) | — | — · — · — |
| InputGroup | 42.6 kB (+1.1 kB) · 7.3 kB CSS (0) | — | — · — · — |
| CheckboxList | 44.2 kB (+1.1 kB) · 7.5 kB CSS (0) | — | — · — · — |
| TextArea | 47.8 kB (+1.1 kB) · 8.8 kB CSS (0) | — | — · — · — |
| Slider | 89.6 kB (+1022 B) · 8.3 kB CSS (0) | — | — · — · — |
| lab/Comments | 259.2 kB (+574 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/ListInput | 82.4 kB (+446 B) · 1.6 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 253.9 kB (+429 B) · 2.4 kB CSS (0) | — | — · — · — |
| charts/Chart | 140.4 kB (+356 B) · 494 B CSS (0) | — | — · — · — |
| BreadcrumbItem | 67.7 kB (+187 B) · 10.8 kB CSS (0) | — | — · — · — |
| Markdown | 145.2 kB (+159 B) · 18.4 kB CSS (0) | — | — · — · — |
| Toast | 59.2 kB (+157 B) · 9.0 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 104.6 kB (+121 B) · 1.9 kB CSS (0) | — | — · — · — |
| ClickableCard · Storybook | 15.0 kB (+116 B) · 7.0 kB CSS (0) | 269 (+7) | ✓ · ✓ · — |
| lab/TransferListSelector | 82.8 kB (+114 B) · 1.9 kB CSS (0) | — | — · — · — |
| DateTimeInput | 168.0 kB (+108 B) · 17.2 kB CSS (0) | — | — · — · — |
| DateInput | 147.3 kB (+107 B) · 15.5 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 20.2 kB (+106 B) · 5.6 kB CSS (0) | — | — · — · — |
| SelectorOption | 17.0 kB (+106 B) · 5.4 kB CSS (0) | — | — · — · — |
| SelectableCard · Storybook | 15.1 kB (+97 B) · 7.2 kB CSS (0) | 393 (+7) | ✓ · ✓ · — |
| DropdownMenuRadioItem | 18.7 kB (+94 B) · 5.9 kB CSS (0) | — | — · — · — |
| Pagination | 86.7 kB (+93 B) · 16.1 kB CSS (0) | — | — · — · — |
| DropdownMenuCheckboxItem | 18.7 kB (+91 B) · 5.9 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 117.0 kB (+89 B) · 423 B CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 56.8 kB (+87 B) · 8.9 kB CSS (0) | — | — · — · — |
| Token | 25.6 kB (+86 B) · 4.8 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 17.9 kB (+85 B) · 5.5 kB CSS (0) | — | — · — · — |
| Item · Storybook | 13.6 kB (+82 B) · 4.9 kB CSS (0) | 1,609 (+10) | ✓ · ✓ · — |
| lab/ChatReactionBar | 66.4 kB (+81 B) · 1.1 kB CSS (0) | — | — · — · — |
| AlertDialog | 83.3 kB (+79 B) · 13.1 kB CSS (0) | — | — · — · — |
| Selector | 77.9 kB (+68 B) · 15.7 kB CSS (0) | — | — · — · — |
| MoreMenu | 73.0 kB (+59 B) · 15.6 kB CSS (0) | — | — · — · — |
| TopNavMenu | 58.2 kB (+59 B) · 9.9 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 65.8 kB (+57 B) · 773 B CSS (0) | — | — · — · — |
| lab/TourStep | 57.9 kB (+57 B) · 590 B CSS (0) | — | — · — · — |
| DropdownMenu | 72.8 kB (+47 B) · 15.6 kB CSS (0) | — | — · — · — |
| lab/TransferList | 75.2 kB (+45 B) · 1.7 kB CSS (0) | — | — · — · — |
| PowerSearch | 236.2 kB (+37 B) · 21.8 kB CSS (0) | — | — · — · — |
| LayerProvider | 62.9 kB (+26 B) · 9.4 kB CSS (0) | — | — · — · — |
| MobileNav | 51.8 kB (+21 B) · 9.3 kB CSS (0) | — | — · — · — |
| Popover | 51.8 kB (+15 B) · 12.8 kB CSS (0) | — | — · — · — |
| TabMenu | 55.6 kB (+9 B) · 9.8 kB CSS (0) | — | — · — · — |
| lab/Schedule | 60.2 kB (+6 B) · 3.9 kB CSS (0) | — | — · — · — |
| charts/ChartLegend | 34.4 kB (+2 B) · 224 B CSS (0) | — | — · — · — |
| CommandPaletteInput | 26.9 kB (+1 B) · 7.4 kB CSS (0) | — | — · — · — |
| Avatar | 34.4 kB (0) · 5.4 kB CSS (0) | — | — · — · — |
| AvatarGroup | 37.1 kB (0) · 5.5 kB CSS (0) | — | — · — · — |
| ChatMessageList | 22.8 kB (0) · 6.9 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 25.9 kB (0) · 8.2 kB CSS (0) | — | — · — · — |
| Collapsible | 23.3 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 10.3 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| Heading | 7.9 kB (0) · 4.9 kB CSS (0) | — | — · — · — |
| InfoTip | 36.8 kB (0) · 5.0 kB CSS (0) | — | — · — · — |
| Outline | 22.2 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 10.6 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| Spinner | 18.5 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| Step | 28.2 kB (0) · 5.6 kB CSS (0) | — | — · — · — |
| Tab | 11.6 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| Text | 7.4 kB (0) · 4.9 kB CSS (0) | — | — · — · — |
| Timer | 9.5 kB (0) · 5.9 kB CSS (0) | — | — · — · — |
| TopNavItem | 10.9 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 11.0 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| ContextMenu | 74.1 kB (−1 B) · 15.5 kB CSS (0) | — | — · — · — |
| ProgressBar | 10.8 kB (−2 B) · 6.2 kB CSS (0) | — | — · — · — |
| Timestamp | 21.3 kB (−2 B) · 8.9 kB CSS (0) | — | — · — · — |
| TopNavHeading | 58.4 kB (−3 B) · 9.7 kB CSS (0) | — | — · — · — |
| HoverCard | 19.2 kB (−4 B) · 3.9 kB CSS (0) | — | — · — · — |
| AppShell | 70.5 kB (−7 B) · 12.2 kB CSS (0) | — | — · — · — |
| Tooltip | 20.2 kB (−11 B) · 3.9 kB CSS (0) | — | — · — · — |
| Carousel | 49.4 kB (−12 B) · 9.5 kB CSS (0) | — | — · — · — |
| TableCell | 75.3 kB (−14 B) · 15.9 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 53.2 kB (−15 B) · 10.0 kB CSS (0) | — | — · — · — |
| ListItem | 52.5 kB (−15 B) · 10.0 kB CSS (0) | — | — · — · — |
| DateRangeInput | 71.2 kB (−22 B) · 11.2 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 74.9 kB (−25 B) · 15.6 kB CSS (0) | — | — · — · — |
| Tokenizer | 69.4 kB (−31 B) · 17.1 kB CSS (0) | — | — · — · — |
| SideNavHeading | 58.9 kB (−48 B) · 9.9 kB CSS (0) | — | — · — · — |
| Lightbox | 52.1 kB (−49 B) · 9.1 kB CSS (0) | — | — · — · — |
| TopNav | 53.3 kB (−49 B) · 9.6 kB CSS (0) | — | — · — · — |
| SideNav | 70.8 kB (−50 B) · 10.1 kB CSS (0) | — | — · — · — |
| StatusDot | 22.4 kB (−51 B) · 5.2 kB CSS (0) | — | — · — · — |
| Switch | 86.9 kB (−59 B) · 9.5 kB CSS (0) | — | — · — · — |
| CommandPalette | 51.1 kB (−63 B) · 12.3 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 224.9 kB (−79 B) · 454 B CSS (0) | — | — · — · — |
| MultiSelector | 73.0 kB (−80 B) · 15.3 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 258.3 kB (−93 B) · 2.3 kB CSS (0) | — | — · — · — |
| RadioListItem | 50.9 kB (−94 B) · 9.0 kB CSS (0) | — | — · — · — |
| Table | 83.6 kB (−94 B) · 16.1 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 53.9 kB (−99 B) · 10.6 kB CSS (0) | — | — · — · — |
| SegmentedControl | 81.5 kB (−106 B) · 6.7 kB CSS (0) | — | — · — · — |
| ChatComposer | 61.1 kB (−124 B) · 10.6 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 70.3 kB (−125 B) · 722 B CSS (0) | — | — · — · — |
| Typeahead | 62.7 kB (−130 B) · 11.2 kB CSS (0) | — | — · — · — |
| CodeBlock | 58.8 kB (−133 B) · 10.0 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 59.0 kB (−134 B) · 10.0 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 59.0 kB (−135 B) · 10.0 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 54.9 kB (−139 B) · 9.6 kB CSS (0) | — | — · — · — |
| DrawerHeader | 47.9 kB (−146 B) · 11.6 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 54.4 kB (−167 B) · 11.8 kB CSS (0) | — | — · — · — |
| Banner | 46.8 kB (−169 B) · 9.2 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 70.8 kB (−170 B) · 2.1 kB CSS (0) | — | — · — · — |
| DialogHeader | 47.7 kB (−174 B) · 10.2 kB CSS (0) | — | — · — · — |
| TimeInput | 131.4 kB (−185 B) · 14.5 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 45.2 kB (−186 B) · 8.7 kB CSS (0) | — | — · — · — |
| IconButton | 44.9 kB (−190 B) · 8.7 kB CSS (0) | — | — · — · — |
| CheckboxInput | 48.2 kB (−192 B) · 8.7 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 45.4 kB (−195 B) · 8.8 kB CSS (0) | — | — · — · — |
| ChatSendButton | 45.3 kB (−198 B) · 8.7 kB CSS (0) | — | — · — · — |
| Button | 44.8 kB (−199 B) · 8.7 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 38.4 kB (−201 B) · 5.5 kB CSS (0) | — | — · — · — |
| lab/CommentPin | 46.7 kB (−203 B) · 1.2 kB CSS (0) | — | — · — · — |
| Thumbnail | 49.1 kB (−208 B) · 10.3 kB CSS (0) | — | — · — · — |
| ToggleButton | 45.8 kB (−209 B) · 8.8 kB CSS (0) | — | — · — · — |
| SideNavItem | 54.4 kB (−210 B) · 9.8 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 45.7 kB (−240 B) · 8.8 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 45.4 kB (−247 B) · 8.9 kB CSS (0) | — | — · — · — |
| Calendar | 54.0 kB (−250 B) · 9.3 kB CSS (0) | — | — · — · — |
| ChatLayout | 48.0 kB (−253 B) · 9.3 kB CSS (0) | — | — · — · — |
| Stepper | 46.4 kB (−258 B) · 8.9 kB CSS (0) | — | — · — · — |
| Link | 42.3 kB (−271 B) · 6.9 kB CSS (0) | — | — · — · — |
| TextInput | 52.5 kB (−271 B) · 9.9 kB CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 50.0 kB (−272 B) · 162 B CSS (0) | — | — · — · — |
| FileInput | 53.3 kB (−310 B) · 9.7 kB CSS (0) | — | — · — · — |
| ComplexSelector | 55.3 kB (−362 B) · 10.4 kB CSS (0) | — | — · — · — |
| NumberInput | 54.6 kB (−363 B) · 10.1 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 277.9 kB (−384 B) · 2.6 kB CSS (0) | — | — · — · — |
Visual changes: 2 snapshots in 1 component
A change is a question for the reviewer, not a failure.
| Component · story | Before | After | Diff |
|---|---|---|---|
| TreeList · Basic (neutral, dark) | ![]() |
![]() |
![]() |
| TreeList · Basic (neutral, light) | ![]() |
![]() |
![]() |
Package size: @astryxdesign/core 6.32 MB packed (+1.7 kB); no new dependencies.
API changes: core +1 · ~0 · −0
Committed API report behind this build: cli 8 rows, theme-butter 1 row, theme-chocolate 1 row, theme-gothic 1 row, theme-matcha 1 row, theme-neutral 1 row, theme-stone 1 row, theme-y2k 1 row; run pnpm api:report.
1 API change (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | core |
. · Types · interface ClickableContainerResult |
onPointerDown: (event: PointerEvent<HTMLElement>) => void |
import type {ClickableContainerResult} from '@astryxdesign/core'; const x: ClickableContainerResult = {onPointerDown: …} |
Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
…m records the rule and its mouse gap A press on a delegated row's own control, such as a CheckboxListItem's checkbox, is the row's action, so the row still paints for it. Item FR9 states the rule for delegated rows and records the mouse gap: the shared overlay's :active still paints a row under a nested control.
|
/approve-spec b3ae1a8 |
There was a problem hiding this comment.
Approval is waiting on an engineering owner's spec decision, and one wording fix is needed.
The ClickableCard, SelectableCard and Item record changes are approved at this head, but two additions have no governing spec yet:
- TreeList link rows stop painting a touch press when the finger lands on a control in Start or End content. The TreeList record covers those controls' activation, not their press paint.
useClickableContainerreturnsonPointerDown, a new public API member that no record decides.
A maintainer needs to provide or identify the governing spec for both. The alternative is to keep onPointerDown internal and leave TreeList as it is. An engineering owner then records the decision by commenting /approve-spec <full head SHA>; the author may do so if they are an engineering owner.
Blocking:
- The changeset and the hook's docs say that spreading
onPointerDowngives an app's own container the same behavior, but the mouse half relies on a private style, so an app container keeps its mouse pressed look; please describe what ships (cards for mouse and touch, other containers touch-only throughusePressFeedback) and narrow the title to clickable cards.
[Automated review]
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] A clickable card no longer shows its pressed look when a press starts on a control inside it, such as an info button, a button, or a link, since that press does not open the card. `useClickableContainer` returns `onPointerDown` beside `onClick` and `onMouseUp`; spread it on the container to get the same behavior in your own clickable container. A container that does not spread it works as before. |
There was a problem hiding this comment.
This promises app containers the same behavior, but it does not hold for a mouse. Spreading onPointerDown only drops a touch press on a usePressFeedback surface. The mouse half needs the private nestedPressStyles, so an app container keeps its :active pressed look. Suggested wording: "ClickableCard and SelectableCard no longer show their pressed look when a press starts on a control inside them, such as an info button, a button, or a link. useClickableContainer returns onPointerDown; on a container that paints its press with usePressFeedback, spreading it drops a touch press that starts on a nested control. A mouse :active press paint is unchanged."
| | 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. No new target, state, or theme-level default is added. | `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 | A delegated row (`interactiveRef`) shows its pressed paint only for a press that would activate it: a press on the row's surface or on the control it delegates to paints the row, and a press that starts on another interactive element inside the row paints none. Implementation gap: a mouse press on a nested control inside a delegated row still paints the row's pressed overlay; the touch path is fixed. | Owner direction, 2026-11-03: no pressed state on a container for a press that does not activate it | |
There was a problem hiding this comment.
Non-blocking: this row has three cells in a four-column table, so FR9's "Draft review state" is blank. The other rows say settled.
…em FR9 name the link and delegated rows' press Cards drop the press look for mouse and touch. Another container that spreads onPointerDown drops only a usePressFeedback touch press: the mouse half uses the cards' private style.
|
/approve-spec 581b4de |
There was a problem hiding this comment.
Changes requested: one fix is needed before approval.
The ClickableCard, SelectableCard, Item and TreeList record changes, including the new onPointerDown on useClickableContainer's result, are approved at this head, and the tests back each claim.
Blocking:
markNestedPressadds its own windowpointerupandpointercancellisteners (packages/core/src/privateAttributes/nestedPress.stylex.ts:36-37), but Core routes window input listeners throughsubscribeInputinutils/inputStream.ts(react-component-runtime INV16), so please subscribe there and unsubscribe when the mark clears.
The branch also conflicts with main at the ../utils import in SelectableCard.tsx and needs a rebase. The other notes in the review are optional.
[Automated review]
| view.addEventListener('pointerup', unmark, true); | ||
| view.addEventListener('pointercancel', unmark, true); |
There was a problem hiding this comment.
Blocking: these are new window listeners outside Core's shared input stream. subscribeInput in utils/inputStream.ts is the one entry for window input listeners in Core (react-component-runtime INV16), and the press controller already hears pointerup and pointercancel through it. Subscribe there and unsubscribe when the mark clears:
const stops = [
subscribeInput(view, 'pointerup', unmark),
subscribeInput(view, 'pointercancel', unmark),
];
function unmark() {
container.removeAttribute(NESTED_PRESS);
stops.forEach(stop => stop());
}| {...(isDelegate | ||
| ? { | ||
| onPointerDown: chainEventHandlers( | ||
| swipeHandlers?.onPointerDown ?? restProps.onPointerDown, |
There was a problem hiding this comment.
Non-blocking: swipeHandlers is always undefined here, because hasSwipe requires !isDelegate, so this can be restProps.onPointerDown alone.
…tream markNestedPress subscribes to the press's end through subscribeInput, as every Core window input listener does. Item's delegated root reads the caller's onPointerDown alone: a delegated row has no swipe.
# Conflicts: # packages/core/src/SelectableCard/SelectableCard.tsx
|
/approve-spec 01ac710 |
There was a problem hiding this comment.
Recommending approval. The record changes are owner-approved at this head, the earlier window-listener issue now goes through subscribeInput, and the new tests show that the cards no longer look pressed for a press on a nested control while a press on the card itself still does.
Optional follow-ups:
onPointerDowninuseClickableContainermarks the container for any pointer button. Returning early unlessevent.button === 0would stop a right-click whosepointerupa context menu swallows from leaving the card's next mouse press unpainted.- The new press clauses in SelectableCard FR4 and TreeList FR7 have no committed test yet; one case each would keep them from regressing.
[Automated review]
| return {onClick, onMouseUp}; | ||
| // The press-state counterpart of onClick's rule: a press that would not | ||
| // activate the container shows no press on it. | ||
| const onPointerDown = useCallback( |
There was a problem hiding this comment.
Non-blocking: this callback runs for every pointer button, while :active and the press controller follow only the primary button (pressFeedback.ts checks event.button === 0). A secondary-button press on a nested control marks the container. If a context menu swallows the pointerup, as macOS browsers do, the mark stays until the next pointerup, and the next mouse press on the card's surface shows the hover tint. Returning early unless event.button === 0 avoids that; touch and pen presses report 0.
|
/approve-spec 2e26090 |
There was a problem hiding this comment.
This pull request needs one engineering-owner decision before it can be approved; no blocking code defect was found.
- Newly live check: desktop behavior change needs an owner decision. Under a desktop mouse, a press that starts on a control inside a ClickableCard or SelectableCard now leaves the card at its hover tint instead of the pressed overlay (
packages/core/src/privateAttributes/nestedPress.stylex.tslines 56 and 64), with no touch gate; either an engineering owner records the decision for this desktop change, or the cards' mouse arm is gated to touch input so only the touch half ships.
The record changes are owner-approved at this head, and the new tests fail on the base and pass here. Optional: onPointerDown in useClickableContainer could return early unless event.button === 0, so a right-click whose pointerup a context menu swallows cannot leave the card's next press unpainted, and one SelectableCard and one TreeList test would cover their new press clauses.
[Automated review]
| default: 'transparent', | ||
| ':where(:not(:disabled,[aria-disabled="true"]))': { | ||
| default: null, | ||
| ':active:not([data-astryx-nested-press])': { |
There was a problem hiding this comment.
This arm and the one at line 64 change what a desktop mouse press paints: a press that starts on a nested control now leaves the card at its hover tint (Chromium: overlay 0.1 to 0.05). The mouse half needs an engineering owner's recorded decision; otherwise gate it to touch input and ship the touch half only.
…that compose its styles useClickableContainer imports only markNestedPress from the nested-press owner module and paints nothing from it, so the guard now asks only the files that import one of a module's stylex.create exports to be marked.
|
/approve-spec be7a1ca |
There was a problem hiding this comment.
This pull request needs one engineering-owner decision before it can be approved; no blocking code defect was found.
- Newly live check: desktop behavior change needs an owner decision. Under a desktop mouse, a press that starts on a control inside a ClickableCard or SelectableCard now leaves the card at its hover tint instead of the pressed overlay (
packages/core/src/privateAttributes/nestedPress.stylex.tslines 56 and 64, with no touch gate); either an engineering owner records the decision for this desktop change in words, since an/approve-specof the record text does not by itself settle it, or the cards' mouse arm is gated to touch input so only the touch half ships.
The record changes are owner-approved at this head, the narrowed touch-coverage guard is sound and passes, and the new tests fail on the base and pass here. Optional: onPointerDown in useClickableContainer could return early unless event.button === 0, one SelectableCard and one TreeList test would cover their new press clauses, and one doc comment in pressableCoverage.test.ts moved away from its function.
[Automated review]
| .map(([file]) => file); | ||
| } | ||
|
|
||
| /** Files that import the module at `file` (by its relative specifier). */ |
There was a problem hiding this comment.
Non-blocking: this JSDoc belongs to importers below (line 122). The new helpers landed between them, so styleExports now carries two doc comments and importers none. Move this line back above importers.
A secondary press paints nothing, and a context menu can swallow its pointerup, which would leave the mark on. The pressableCoverage helper doc comments sit above their functions again.
|
/approve-spec 9dbdb49 |
There was a problem hiding this comment.
This pull request needs one engineering-owner decision before it can be approved; no code defect was found.
- Newly live check: desktop behavior change needs an owner decision. With a mouse, a press that starts on a control inside a ClickableCard or SelectableCard now leaves the card at its hover tint instead of its pressed tint (
packages/core/src/privateAttributes/nestedPress.stylex.tslines 56 and 64, applied inClickableCard.tsxandSelectableCard.tsx), and nothing gates it to touch input; either cite the owner decision that covers this desktop half, or gate those two arms to touch input so only the touch half ships.
The record changes (ClickableCard FR5, SelectableCard FR4, Item FR9 and TreeList FR7) are approved at this head, and the touch fix for the cards, Item's delegated rows and TreeList's link rows is covered by tests that fail before the change. Optional: one SelectableCard test and one TreeList test for the new press clauses would keep them from regressing.
[Automated review]
# Conflicts: # packages/core/src/utils/pressFeedback.ts
…keeps main's paint The owner's words are about tapping, so useClickableContainer's onPointerDown acts only on a finger press. The cards keep their own :active press colour, the nested-press owner module goes, and the pressableCoverage guard returns to main's. ClickableCard FR5, SelectableCard FR4, Item FR9 and TreeList FR7 state the touch rule and that a mouse press keeps the :active paint.
# Conflicts: # docs/specs/components/TreeList/TreeList.spec.md
|
/approve-spec 05c71e9 |
There was a problem hiding this comment.
Changes requested: one wording fix before approval.
- The title says a press that starts on a control inside the card shows no pressed look, but this head changes only a finger press (a mouse or pen press there still paints the card, as the body and changeset say), so please retitle it, for example "fix(ClickableCard, SelectableCard): no touch pressed look for a finger press that starts on a control inside the card".
The record changes (ClickableCard FR5 and its contract row, SelectableCard FR4, Item FR9 and TreeList FR7) are approved at this head, and the touch fix is covered by tests that fail before the change. Optional: one SelectableCard test and one TreeList test for the new press clauses would keep them from regressing.
[Automated review]
There was a problem hiding this comment.
Approved pending CI: the heavy test and build suites have not run on this head yet; they run before merge.
The title now matches the change, a finger press only, which was the one fix requested last time. The record changes (ClickableCard FR5 and its contract row, SelectableCard FR4, Item FR9 and TreeList FR7) are approved at this head, and the new tests fail before the change and pass after it.
- Optional: one SelectableCard test and one TreeList test for the new press clauses would keep them from regressing; Item FR9's verification row also cites the ClickableCard test, which renders no Item.
[Automated review]






With a finger, ClickableCard and SelectableCard now show their pressed look only for a press that would open them. A finger press that starts on a control inside the card shows the control's own press, not the card's. Mouse and pen presses are unchanged.
User impact
useClickableContainerreturnsonPointerDownbesideonClickandonMouseUp. On your own container that paints its press withusePressFeedback, spreading it drops a finger press that starts on a nested control. If you don't spread it, everything works as before.Owner's words, mapped to the code
data-astryx-press="on".useClickableContainerreturnsonPointerDown. It decides with the samehasInteractiveAncestor(target, container)test thatonClickuses for activation.pointerType === 'touch') that starts on a nested control,onPointerDowncallscancelPress(container), so the press controller drops the card's paint before it shows.Scope: touch only
The owner's words are about tapping, so this pull request ships the touch half only. With a mouse or pen, the cards paint exactly as on main: a press on a nested control still shows the card's
:activelook. The mouse half (the cards':activepaint excluding a press on a nested control) is a separate draft pull request, waiting for the owner's decision.Will it cause issues?
onPointerDown: nothing changes for it. The return value only gains a field, and existing destructuring ({onClick, onMouseUp}) is unaffected.interactiveRef, for example a CheckboxListItem's checkbox) is the container's own action, so the row still paints. A test covers this.onPointerDown(chainEventHandlers): both run, and a test covers it. Item chains it with the caller's handler on delegated rows.Consumers of
useClickableContaineronPointerDown(they paint a press): ClickableCard, SelectableCard, Item (delegated rows), TreeListItem (link rows).What changes
hooks/useClickableContainer.ts:onPointerDown, a callback for finger presses only, with no effect and no new hook.utils/pressFeedback.ts:cancelPress(element), internal, ends the controller's press on that element.onPointerDown. The cards' styles are unchanged.:activepaint;onPointerDown;useClickableContainer.doc.mjsdocuments it.[feat]. api-report: only the addedonPointerDownfield onClickableContainerResult.Evidence
ClickableCard.nestedPress.test.tsx: finger on an InfoTip, button and link inside the card, the card's own surface, and a caller'sonPointerDown;useClickableContainer.test.tsx: finger on nested control cancels the press; mouse and pen presses don't; neither does a surface press or a disabled container;Item.nestedPress.test.tsx: delegated control versus another control.git diff main -- packages/core/srcreturn 0.Main merges
This branch merged current main twice with no change to its own product diff. The last merge resolved one header line in
utils/pressFeedback.tsagainst main's AlertDialog change. The touch path is unchanged since the owner's phone check.Writing rubric results
The rubric in
docs/contributing/spec-writing.mdwas run over ClickableCard FR5 and Public contract, SelectableCard FR4, Item FR9 and TreeList FR7.:activepaint.