Skip to content

fix(AlertDialog): a mouse press on the actions acts natively again - #9771

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c01-alertdialog-mouse
Nov 3, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/c01-alertdialog-mouse

Conversation

@vjeux

@vjeux vjeux commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

User impact

Anyone using a mouse on a desktop. In an AlertDialog, a mouse press on Cancel that is released over Delete runs Delete, and the actions' pressed look follows the mouse. A native button runs only when the press begins and ends on it.

Problem and solution fit

  1. Why it occurs: the action group's tracking takes every pointer on every presentation. AlertDialog passes no pointer kinds to useActionGroupTracking, and it tracks whenever the alert is open and not inline.
  2. Why it harms: a press that starts on Cancel can end up deleting.
  3. The fix: AlertDialog tracks only under the touch presentation (spec:AST-094 FR13), for a finger and a pen. A mouse press acts as the platform's native button does. On a desktop the actions carry no tracking marker, as before the action group shipped. Under the touch presentation, the press controller paints a mouse press itself, since no group's tracker takes one.

Expected behavior and authority

The spec owners' card-45 ruling (cixzhang, 2026-11-03): the slide-across press runs for touch only, and a desktop mouse press behaves as a native button does. This PR records it:

  • family:action-groups FR1 starts "Under the touch presentation (spec:AST-094 FR13), …" and adds "A mouse press acts as the platform's native button does: on the action it began on, released over that action".
  • family:action-groups FR5 names the pointers that slide, a finger and a pen under the touch presentation, and scopes its listener budget to a group while it tracks.
  • family:action-groups "Allowed component variation" keeps the menus' own press and drag under every pointer: FR1's touch scope and FR5 do not change them.
  • The same section keeps Selector's and MultiSelector's options on the menu press model under every pointer (component:Selector FR7).
  • family:action-groups DEC-1 records the spec owner cixzhang's decision of 2026-11-03; rejected: every pointer.
  • spec:AST-094 FR43 names the exception: no slide across an action group under a mouse, or under any pointer outside the touch presentation. Its impact line covers the members outside the menu press model, "under the touch presentation". DEC-17 and FR19 say the same.
  • component:AlertDialog FR8, its compatibility line and its End-user impact clause read "under the touch presentation".

Three owner-gated records change, and each needs an engineering owner's /approve-spec <head sha>:

  • docs/families/action-groups.md
  • docs/specs/AST-094-touch-presentations/spec.md
  • docs/specs/components/AlertDialog/AlertDialog.spec.md

Smallest restoration

  • AlertDialog.tsx: tracking turns on only when useTouchPresentation().isTouch, with pointerTypes: ['touch', 'pen'].
  • utils/pressFeedback.ts: a mouse press paints on a tracked action too (buttonSurfaceAt skips a tracked action only for a finger or a pen).
  • Unchanged: a finger or a pen under the touch presentation, the keyboard, assistive technology, the inline preview.
  • The press-group mark now names the pointers its tracker follows (touch pen here). The press controller leaves only those presses to the tracker and paints the rest, so a group whose tracker follows a mouse (the hook's default) is never painted twice.
  • Release notes: fix(AlertDialog): a press that slides between the actions runs the one it lifts on #8083 is not in v0.7.7, so its pending note and this fix would publish together. This pull request rewords fix(AlertDialog): a press that slides between the actions runs the one it lifts on #8083's note to the shipped scope (a finger or a pen under the touch presentation; a mouse press stays the native button's) and adds no note of its own.
  • Not taken: moving the touch gate and a finger-and-pen default into useActionGroupTracking. Its every-pointer default serves a group that tracks a mouse too (TabBar's, in flight), so each caller passes its pointer types.

Evidence

  • Red first: 3 cases fail on main's AlertDialog.tsx and pressFeedback.ts:

    • a fine primary pointer marks no action;
    • under the touch presentation, a mouse press slid from the action to Cancel runs nothing;
    • the controller paints a mouse press on a tracked action.
  • Desktop before and after in real Chrome (Playwright's Chromium, a fine pointer, no touch), on the Delete story: press Delete, slide the mouse onto Cancel, hold, then release.

    Held on Cancel After the release
    main fc68123 main held main after The alert closed: the slide ran Cancel.
    this head fix held Delete keeps its pressed look. fix after The alert stays open: nothing ran.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • Unit: AlertDialog, hooks, gestures, Button and the press controller pass 1,875/1,875.
  • Browser: the mouse cases in AlertDialog.interaction.browser.spec.ts now expect native behavior. A press on Delete slid to Cancel leaves Delete :active and no tracker paint. After the release, a capture-phase click recorder holds no action click, and the dialog's open property stays true. A click on Delete then records Delete and closes the alert. The finger cases are unchanged. Runs to follow at this head.
  • Static: core typecheck, strict ESLint, Prettier, check:knowledge and review:pre pass.

Writing rubric results

family:action-groups FR1 and DEC-1, spec:AST-094 FR43, and component:AlertDialog FR8, its compatibility line and its End-user impact row: present tense, the owners' wording. DEC-1 holds the one rejected alternative. R1–R6 pass. The edits keep both tables' column widths, so only the changed rows move.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 3, 2026 7:03pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 3, 2026
@astracat-bot

astracat-bot Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 3, 2026, 7:11 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec a12f6f1

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@github-actions

github-actions Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · bcf3cf8

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
AlertDialog · Storybook 83.0 kB (+240 B) · 13.1 kB CSS (0) 215 (+5) ✓ · ✓ · ✓
lab/Comments 257.6 kB (+132 B) · 2.5 kB CSS (0) — — · — · —
lab/CommentThread 252.5 kB (+129 B) · 2.4 kB CSS (0) — — · — · —
103 more components
Component Size LoC Visual · A11y · RTL
richtext/RichTextEditorToolbar 224.0 kB (+53 B) · 454 B CSS (0) — — · — · —
lab/ListInput 82.1 kB (+42 B) · 1.6 kB CSS (0) — — · — · —
SelectableCard 14.7 kB (+40 B) · 7.3 kB CSS (0) — — · — · —
TopNavItem 10.7 kB (+38 B) · 4.0 kB CSS (0) — — · — · —
Tab 11.4 kB (+37 B) · 4.2 kB CSS (0) — — · — · —
richtext/RichTextEditor 278.8 kB (+37 B) · 2.6 kB CSS (0) — — · — · —
Outline 21.9 kB (+36 B) · 4.2 kB CSS (0) — — · — · —
richtext/RichTextView 259.2 kB (+36 B) · 2.3 kB CSS (0) — — · — · —
DropdownMenuItem 17.5 kB (+35 B) · 5.5 kB CSS (0) — — · — · —
LayerProvider 63.7 kB (+35 B) · 10.5 kB CSS (0) — — · — · —
NumberInput 55.7 kB (+35 B) · 11.3 kB CSS (0) — — · — · —
TopNavMegaMenuItem 10.8 kB (+35 B) · 4.2 kB CSS (0) — — · — · —
AvatarGroupOverflow 39.3 kB (+34 B) · 6.6 kB CSS (0) — — · — · —
ClickableCard 14.6 kB (+34 B) · 7.1 kB CSS (0) — — · — · —
CodeBlock 59.7 kB (+34 B) · 11.1 kB CSS (0) — — · — · —
CommandPaletteItem 10.1 kB (+34 B) · 3.6 kB CSS (0) — — · — · —
ContextMenu 76.0 kB (+34 B) · 15.4 kB CSS (0) — — · — · —
DropdownMenuSubMenu 56.5 kB (+34 B) · 10.0 kB CSS (0) — — · — · —
Popover 53.2 kB (+34 B) · 12.7 kB CSS (0) — — · — · —
Banner 47.8 kB (+33 B) · 10.3 kB CSS (0) — — · — · —
ChatLayoutScrollButton 46.4 kB (+33 B) · 10.0 kB CSS (0) — — · — · —
Link 43.3 kB (+33 B) · 8.0 kB CSS (0) — — · — · —
SegmentedControlItem 10.4 kB (+33 B) · 4.0 kB CSS (0) — — · — · —
SelectorOption 16.6 kB (+33 B) · 5.4 kB CSS (0) — — · — · —
SideNavCollapseButton 46.7 kB (+33 B) · 9.9 kB CSS (0) — — · — · —
Toast 59.7 kB (+33 B) · 10.1 kB CSS (0) — — · — · —
Token 25.3 kB (+33 B) · 4.8 kB CSS (0) — — · — · —
Lightbox 51.2 kB (+32 B) · 10.2 kB CSS (0) — — · — · —
MobileNavToggle 46.2 kB (+32 B) · 9.8 kB CSS (0) — — · — · —
Table 85.4 kB (+32 B) · 16.1 kB CSS (0) — — · — · —
TableCell 77.2 kB (+32 B) · 15.9 kB CSS (0) — — · — · —
lab/MobileTokenizer 102.6 kB (+32 B) · 880 B CSS (0) — — · — · —
Button 45.8 kB (+31 B) · 9.8 kB CSS (0) — — · — · —
Carousel 51.2 kB (+31 B) · 10.6 kB CSS (0) — — · — · —
ChatComposer 61.9 kB (+31 B) · 11.2 kB CSS (0) — — · — · —
ChatLayout 49.0 kB (+31 B) · 10.3 kB CSS (0) — — · — · —
ChatSendButton 46.3 kB (+31 B) · 9.8 kB CSS (0) — — · — · —
CheckboxListItem 53.9 kB (+31 B) · 11.1 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 18.3 kB (+31 B) · 5.9 kB CSS (0) — — · — · —
DropdownMenuRadioItem 18.3 kB (+31 B) · 5.9 kB CSS (0) — — · — · —
ListItem 53.3 kB (+31 B) · 11.1 kB CSS (0) — — · — · —
SideNavHeading 59.7 kB (+31 B) · 10.6 kB CSS (0) — — · — · —
ToggleButton 46.7 kB (+31 B) · 9.9 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 65.4 kB (+31 B) · 773 B CSS (0) — — · — · —
lab/ChatReactionBar 66.0 kB (+31 B) · 1.1 kB CSS (0) — — · — · —
lab/DiffViewer 71.8 kB (+31 B) · 2.1 kB CSS (0) — — · — · —
lab/TourStep 58.6 kB (+31 B) · 590 B CSS (0) — — · — · —
lab/TransferListSelector 81.6 kB (+31 B) · 1.9 kB CSS (0) — — · — · —
Item 13.3 kB (+30 B) · 4.9 kB CSS (0) — — · — · —
Pagination 87.3 kB (+30 B) · 16.1 kB CSS (0) — — · — · —
SideNav 67.0 kB (+30 B) · 11.2 kB CSS (0) — — · — · —
TableHeaderCell 76.8 kB (+30 B) · 15.6 kB CSS (0) — — · — · —
TopNavMegaMenu 54.8 kB (+30 B) · 11.2 kB CSS (0) — — · — · —
lab/MobilePowerSearch 217.3 kB (+30 B) · 1.2 kB CSS (0) — — · — · —
BaseTypeahead 55.8 kB (+29 B) · 10.3 kB CSS (0) — — · — · —
ChatComposerTokenElement 59.9 kB (+29 B) · 10.7 kB CSS (0) — — · — · —
ChatDictationButton 46.4 kB (+29 B) · 9.9 kB CSS (0) — — · — · —
IconButton 45.9 kB (+29 B) · 9.8 kB CSS (0) — — · — · —
TopNav 52.3 kB (+29 B) · 10.7 kB CSS (0) — — · — · —
AppShell 69.2 kB (+28 B) · 12.2 kB CSS (0) — — · — · —
ChatComposerInput 59.9 kB (+28 B) · 10.7 kB CSS (0) — — · — · —
DialogHeader 48.9 kB (+28 B) · 10.2 kB CSS (0) — — · — · —
DropdownMenu 74.0 kB (+28 B) · 15.5 kB CSS (0) — — · — · —
MobileNav 50.7 kB (+28 B) · 10.4 kB CSS (0) — — · — · —
SideNavItem 55.3 kB (+28 B) · 10.5 kB CSS (0) — — · — · —
Stepper 47.6 kB (+28 B) · 10.0 kB CSS (0) — — · — · —
TableSelectionToolbar 55.7 kB (+28 B) · 11.8 kB CSS (0) — — · — · —
Thumbnail 50.1 kB (+28 B) · 11.4 kB CSS (0) — — · — · —
TopNavHeading 59.1 kB (+28 B) · 10.4 kB CSS (0) — — · — · —
lab/CommentPin 47.5 kB (+28 B) · 1.2 kB CSS (0) — — · — · —
lab/TransferList 75.1 kB (+28 B) · 1.7 kB CSS (0) — — · — · —
Collapsible 22.7 kB (+27 B) · 4.5 kB CSS (0) — — · — · —
CommandPalette 49.2 kB (+27 B) · 12.3 kB CSS (0) — — · — · —
MoreMenu 74.3 kB (+27 B) · 15.5 kB CSS (0) — — · — · —
RadioListItem 51.7 kB (+27 B) · 10.1 kB CSS (0) — — · — · —
TabMenu 56.3 kB (+27 B) · 10.5 kB CSS (0) — — · — · —
Typeahead 63.6 kB (+27 B) · 11.8 kB CSS (0) — — · — · —
DrawerHeader 49.0 kB (+26 B) · 11.6 kB CSS (0) — — · — · —
FileInput 54.3 kB (+26 B) · 10.8 kB CSS (0) — — · — · —
Markdown 146.3 kB (+26 B) · 18.4 kB CSS (0) — — · — · —
Selector 78.4 kB (+26 B) · 15.7 kB CSS (0) — — · — · —
TreeList 38.1 kB (+26 B) · 5.0 kB CSS (0) — — · — · —
lab/CommentComposer 103.7 kB (+26 B) · 1.9 kB CSS (0) — — · — · —
lab/Schedule 62.0 kB (+26 B) · 3.9 kB CSS (0) — — · — · —
BreadcrumbItem 68.4 kB (+25 B) · 11.5 kB CSS (0) — — · — · —
TextInput 53.5 kB (+25 B) · 11.0 kB CSS (0) — — · — · —
lab/EmojiPicker 71.2 kB (+25 B) · 722 B CSS (0) — — · — · —
DateInput 104.3 kB (+24 B) · 15.4 kB CSS (0) — — · — · —
DateTimeInput 160.9 kB (+24 B) · 17.1 kB CSS (0) — — · — · —
MultiSelector 73.8 kB (+24 B) · 15.3 kB CSS (0) — — · — · —
Switch 87.7 kB (+24 B) · 10.6 kB CSS (0) — — · — · —
Tokenizer 71.3 kB (+24 B) · 17.1 kB CSS (0) — — · — · —
TopNavMenu 58.9 kB (+24 B) · 10.5 kB CSS (0) — — · — · —
Calendar 54.7 kB (+23 B) · 10.4 kB CSS (0) — — · — · —
CheckboxInput 49.2 kB (+23 B) · 9.8 kB CSS (0) — — · — · —
PowerSearch 192.8 kB (+23 B) · 21.6 kB CSS (0) — — · — · —
Step 27.9 kB (+23 B) · 5.6 kB CSS (0) — — · — · —
TimeInput 91.1 kB (+23 B) · 14.3 kB CSS (0) — — · — · —
ComplexSelector 56.3 kB (+22 B) · 11.1 kB CSS (0) — — · — · —
DateRangeInput 70.5 kB (+22 B) · 11.9 kB CSS (0) — — · — · —
ContextMenuItem 26.2 kB (0) · 5.0 kB CSS (0) — — · — · —
Timestamp 21.3 kB (0) · 10.0 kB CSS (0) — — · — · —
SegmentedControl 82.4 kB (−15 B) · 7.8 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 6.22 MB packed (+595 B); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: core 2 rows; run pnpm api:report.

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

@vjeux
vjeux force-pushed the uikit/c01-alertdialog-mouse branch from a12f6f1 to 745ea32 Compare November 3, 2026 16:40
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 745ea32

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The touch-only direction is approved by an engineering owner at this head, and the mouse and finger behaviour checks out in unit and browser tests. Three spec records still need to agree with it:

  • spec:AST-094 DEC-17 still says the slide "stays on for every pointer", which contradicts the new family:action-groups DEC-1, so amend or supersede that clause.
  • component:AlertDialog DEC-3 still says the actions "behave like a button group under every pointer", so reword it to the touch-presentation scope that FR8 now cites it for.
  • The new spec:AST-094 FR43 exception turns off the slide only "under a mouse", but FR1, DEC-1 and AlertDialog.tsx also turn it off for a finger or a pen where the primary pointer is fine, so extend the exception (and the description's "Unchanged: touch") to match.

A non-blocking note: the isTrackedByGroup check in pressFeedback.ts can no longer be true for any caller and can go.

[Automated review]

row (`spec:AST-057` AR2, DEC-7); a
pinch under a pen; the screen-edge pan under a mouse, a trackpad, or a pen;
and the 44 px coarse-pointer touch target, which stays coarse-only and never overlaps a
the slide across an action group under a mouse (`family:action-groups`

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exception names only a mouse, but family:action-groups FR1 and DEC-1, and AlertDialog.tsx's isTouch gate, also turn the slide off for a finger or a pen where the primary pointer is fine (a touchscreen laptop). Suggest: "the slide across an action group under a mouse, and under any pointer outside the touch presentation (family:action-groups FR1)".

if (pointerId != null && isTrackedByGroup(element)) {
// A group's tracker follows a finger or a pen only, so a key's press and a
// mouse press stay here.
if (pointerId != null && !isMouse && isTrackedByGroup(element)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: pressButton is called only for a mouse (pointer id, isMouse true) or Space (no pointer id), so this condition can no longer be true. The branch and the isMouse parameter can go. The comment also relies on AlertDialog passing pointerTypes; useActionGroupTracking still defaults to every pointer.

@vjeux
vjeux force-pushed the uikit/c01-alertdialog-mouse branch from 745ea32 to b95e8f5 Compare November 3, 2026 17:35
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 3, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec b95e8f5

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The touch-only direction is approved by an engineering owner at this head, and the mouse and finger behaviour checks out in the unit tests, the browser cases and a before/after run in Chromium. Two things still need to agree with it:

  • The pending .changeset/alertdialog-touch-action-tracking.md from #8083 still says the actions are "tracked as one group under every pointer", and this PR's changeset says a mouse works "again" although the mouse slide was never released, so reword #8083's changeset to the finger-and-pen, touch-presentation scope and drop or reword this one.
  • spec:AST-094 FR19 still says an action-group member "under a fine pointer … keeps one pointerdown listener on the group element", which the amended FR43 rules out, so reword it the way family FR5 was ("While it tracks …").

Non-blocking: useActionGroupTracking still defaults to every pointer under every presentation; moving the touch gate and the finger-and-pen default into the hook would let the next member adopt it with one call.

[Automated review]

Comment thread .changeset/alertdialog-mouse-native.md Outdated
'@astryxdesign/core': patch
---

[fix] AlertDialog's actions act as native buttons under a mouse again: a press runs the action it began on, released over that action, and a press slid from one action to the other runs nothing. Under the touch presentation a finger's or a pen's press still slides across the actions and runs the one it lifts on. On a desktop the actions carry no tracking marker, as before the action group shipped.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The mouse slide this undoes came from #8083, which has not been released, and its changeset .changeset/alertdialog-touch-action-tracking.md is still pending: it says the actions are "tracked as one group under every pointer". Both notes would publish together, so someone upgrading from v0.7.6 would read that the actions track every pointer and that a mouse works "again". Suggest rewording #8083's changeset to the shipped scope (a finger or a pen slides across the actions under the touch presentation; a mouse press stays the native button's) and dropping this one, or rewording it without "again" and "as before the action group shipped".

pinch under a pen; the screen-edge pan under a mouse, a trackpad, or a pen;
and the 44 px coarse-pointer touch target, which stays coarse-only and never overlaps a
the slide across an action group under a mouse, and under any pointer
outside the touch presentation (`family:action-groups` FR1); and the 44 px coarse-pointer touch target, which stays coarse-only and never overlaps a

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this exception, FR19 (lines 324-329) no longer holds: it still says an action-group member "tracks its own group as FR24 allows: under a fine pointer it keeps one pointerdown listener on the group element …". Outside the touch presentation the member now attaches nothing. Suggest the wording family FR5 got: "A family:action-groups member that tracks its group (family:action-groups FR1) keeps one pointerdown listener on the group element …".

@vjeux
vjeux force-pushed the uikit/c01-alertdialog-mouse branch from b95e8f5 to 5fcdc3b Compare November 3, 2026 18:16
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 5fcdc3b

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. An engineering owner approved the touch-only direction at this head, the pending #8083 changeset and spec:AST-094 FR19 now match it, and the mouse and finger behavior checks out in the unit tests and a before/after run in Chromium; one record gap remains:

  • The carve-out under "Allowed component variation" in docs/families/action-groups.md exempts only menus, so the touch-only FR1 and FR5 now take the mouse press-and-release slide away from Selector's and MultiSelector's options, against the unchanged component:Selector FR7 and module:DropdownMenu/useMenuPress FR1; add those options to the carve-out and scope the spec:AST-094 members' impact line (spec.md:727-729) to members outside the menu press model.

Non-blocking: useActionGroupTracking still defaults to every pointer under every presentation, so the next member that adopts it with its defaults would track a mouse on a desktop, and moving the touch gate and the finger-and-pen default into the hook would let each member make one call.

After the wording fix, an engineering owner records the decision again by commenting /approve-spec <full head SHA> on the pull request; the author may do so as an engineering owner.

[Automated review]

Comment on lines +167 to +169
- Menus keep their own opening and handoff (`spec:AST-094` FR29), their
press and drag under every pointer, and their scrolling rules; FR1's touch
scope and FR5 do not change them.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This bullet exempts only menus, but this record lists Selector's and MultiSelector's options apart from menus (membership rule, Shared owner, Adoption table), as architecture:interaction-modality INV13 does. So FR1 and FR5 now make a mouse press on a Selector option native, while component:Selector FR7 and module:DropdownMenu/useMenuPress FR1 keep the release-over-row rule for a mouse. Suggest adding beside it: "Selector's and MultiSelector's options keep the menu press model's press and drag under every pointer (component:Selector FR7); FR1's touch scope and FR5 do not change them."

- Every `family:action-groups` member, as its membership rule lists them:
a press that slides across sibling actions acts on the action it lifts on
(FR26–FR28), under every pointer.
(FR26–FR28), under the touch presentation (`family:action-groups` FR1).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Every member, as its membership rule lists them" includes menus and Selector's options, which this record's menu paragraph (lines 392-395) and DEC-17 ("Menus keep the behavior for every pointer") keep under every pointer. Suggest scoping it: "Every family:action-groups member outside the menu press model: … under the touch presentation (family:action-groups FR1)."


registerEnglishFallback(english);

/** The pointers a press slides with across the actions. */

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: this restates SLIDING_POINTERS, and the reason already sits beside pointerTypes below. Suggest deleting it.

The action group's tracking took every pointer on every presentation, so
a desktop mouse press on Cancel released on Delete ran Delete. Under the
touch presentation a finger's or a pen's press keeps sliding across the
actions; a mouse press acts as the platform's native button does, on the
action it began on, released over it.

The press-group mark names the pointers its tracker follows, so the
press controller leaves only those presses to the tracker and paints
the rest.
@vjeux
vjeux force-pushed the uikit/c01-alertdialog-mouse branch from 5fcdc3b to bcf3cf8 Compare November 3, 2026 18:50
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026
@cixzhang

cixzhang commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

/approve-spec bcf3cf8

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 3, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval recommended. An engineering owner approved the touch-only direction for this revision, the Selector and MultiSelector carve-out and the narrowed spec:AST-094 impact line close the last review's record gap, and the mouse and finger behavior checks out in the unit tests and a before/after run in Chromium.

Non-blocking:

  • useActionGroupTracking still defaults to every pointer under every presentation, so the next member that adopts it with its defaults would track a mouse on a desktop; moving the touch gate and the finger-and-pen default into the hook would keep one call per member.
  • In the desktop browser case, a [data-astryx-press] count of 0 also matches the press controller's own paint; asserting no data-astryx-press-group-item on the actions would test the tracker's absence that the comment describes.

[Automated review]

highlightOnsetMs: alertController.actions.highlightOnsetMs,
highlightExpansion: alertController.actions.highlightExpansion,
// A mouse press acts as a native button's under any presentation.
pointerTypes: SLIDING_POINTERS,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: the hook still defaults to every pointer under every presentation (useActionGroupTracking.ts EVERY_POINTER), so this gate and list live in each caller. With FR1, FR5 and DEC-1 now giving no member outside menus and Selector's options a mouse slide, a finger-and-pen default plus the touch gate in the hook would let each member make one call.

const lit = await looksPressed(cancelButton);
// Delete, where the press began, keeps `:active`; no tracker paints.
expect(await delButton.evaluate(el => el.matches(':active'))).toBe(true);
await expect(dialog.locator('[data-astryx-press]')).toHaveCount(0);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking: [data-astryx-press] is also what the press controller writes, so this pins today's desktop controller (which leaves a mouse to :active) rather than the tracker's absence. Checking that the actions carry no data-astryx-press-group-item, as the unit case does, would test what the comment says.

@vjeux
vjeux marked this pull request as ready for review November 3, 2026 19:15
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 3, 2026
@cixzhang
cixzhang marked this pull request as draft November 3, 2026 19:23
@cixzhang
cixzhang marked this pull request as ready for review November 3, 2026 19:23
@cixzhang
cixzhang merged commit bb3838b into meta:main Nov 3, 2026
151 of 156 checks passed
@vjeux
vjeux deleted the uikit/c01-alertdialog-mouse branch November 3, 2026 20:07

This branch was successfully deployed

1 active deployment
Preview — bcf3cf8c Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants