Repository navigation
feat(AlertDialog): touch motion on the theme's timing - #8373
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
a157048 to
c56cb3a
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: no current spec covers AlertDialog's touch input rule as implemented here (every tap, press and click is held for 435 ms after the alert starts presenting, and while it fades out its content is inert and focus leaves it), so an engineering owner needs to approve or reject that rule and say which record states it, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Independently of that decision, these need changes:
- The branch carries the unmerged #8084, #8342 and touch-foundation commits (about 37,000 authored lines in 214 files); once they land, rebase so this pull request is only the 7-file AlertDialog commit.
gestures/VelocityTracker.tsoffers four selectable release filters and no stillness reset, which contradictsarchitecture:interaction-modalityINV10 andspec:AST-100FR2.- AlertDialog's touch action tracking has no
presentationopt-out, whicharchitecture:public-component-apiINV16 requires unless a current AlertDialog record defines it. - Reopening the alert during its fade leaves focus on the document body, because the dismissal hold blurs the focused action and nothing restores it.
- Under React StrictMode, an alert mounted open loses its presentation hold: the unmount-only effect's cleanup releases it during replay and the transition effect never places it again.
- The description should give element counts for the hold's shield, as
architecture:component-style-authoringINV7 asks for added elements.
[Automated review]
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayerProvider | 4.4 kB (0) · 20 B CSS (0) | — | ✓ · ✓ · ✗ |
| AlertDialog · Storybook | 🔴 128.5 kB (+17.1 kB) · 15.4 kB CSS (+29 B) | 448 (+238) | ✓ · ✓ · ✓ |
| lab/Comments | 368.9 kB (+1.4 kB) · 2.5 kB CSS (0) | — | — · — · — |
147 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/CommentThread | 361.5 kB (+1.3 kB) · 2.4 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 299.3 kB (+826 B) · 454 B CSS (0) | — | — · — · — |
| Pagination | 123.4 kB (+754 B) · 18.9 kB CSS (0) | — | — · — · — |
| Markdown | 201.9 kB (+739 B) · 21.7 kB CSS (0) | — | — · — · — |
| Selector | 112.6 kB (+731 B) · 18.5 kB CSS (0) | — | — · — · — |
| DropdownMenu | 106.8 kB (+717 B) · 18.6 kB CSS (0) | — | — · — · — |
| MoreMenu | 107.0 kB (+695 B) · 18.6 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 162.5 kB (+673 B) · 1.9 kB CSS (0) | — | — · — · — |
| Table | 138.5 kB (+637 B) · 19.4 kB CSS (0) | — | — · — · — |
| lab/Schedule | 114.5 kB (+631 B) · 3.9 kB CSS (0) | — | — · — · — |
| Popover · Storybook | 98.4 kB (+620 B) · 15.1 kB CSS (0) | 1,545 (−7) | ✓ · ✓ · ✓ |
| TableHeaderCell | 121.3 kB (+611 B) · 18.7 kB CSS (0) | — | — · — · — |
| ContextMenu | 120.3 kB (+607 B) · 18.4 kB CSS (0) | — | — · — · — |
| TableCell | 121.6 kB (+603 B) · 18.9 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 113.3 kB (+588 B) · 773 B CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 114.4 kB (+560 B) · 1.1 kB CSS (0) | — | — · — · — |
| PowerSearch | 306.1 kB (+352 B) · 25.5 kB CSS (0) | — | — · — · — |
| SideNav | 121.1 kB (+298 B) · 12.2 kB CSS (0) | — | — · — · — |
| charts/ChartTooltip | 214.6 kB (+263 B) · 451 B CSS (0) | — | — · — · — |
| CommandPalette | 79.1 kB (+246 B) · 12.7 kB CSS (0) | — | — · — · — |
| AppShell | 97.4 kB (+242 B) · 14.3 kB CSS (0) | — | — · — · — |
| MobileNav | 76.1 kB (+226 B) · 11.4 kB CSS (0) | — | — · — · — |
| DateInput | 199.8 kB (+210 B) · 17.9 kB CSS (0) | — | — · — · — |
| TopNav | 77.9 kB (+207 B) · 11.7 kB CSS (0) | — | — · — · — |
| charts/Chart | 237.4 kB (+206 B) · 516 B CSS (0) | — | — · — · — |
| DateTimeInput | 223.3 kB (+205 B) · 19.7 kB CSS (0) | — | — · — · — |
| TimeInput | 174.6 kB (+205 B) · 16.9 kB CSS (0) | — | — · — · — |
| Dialog | 25.5 kB (+183 B) · 6.9 kB CSS (0) | — | ✓ · ✓ · — |
| Drawer | 53.9 kB (+182 B) · 8.4 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 96.2 kB (+174 B) · 13.1 kB CSS (0) | — | — · — · — |
| BottomSheet | 73.0 kB (+158 B) · 7.7 kB CSS (0) | — | — · — · — |
| ButtonGroup | 44.1 kB (+102 B) · 3.7 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 79.1 kB (+102 B) · 10.3 kB CSS (0) | — | — · — · — |
| lab/ChatVirtualizer | 57.2 kB (+100 B) · 223 B CSS (0) | — | — · — · — |
| lab/NavigationScreen | 84.9 kB (+97 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/NavigationStack | 84.9 kB (+97 B) · 1.5 kB CSS (0) | — | — · — · — |
| lab/TabBar | 83.5 kB (+92 B) · 1.8 kB CSS (0) | — | — · — · — |
| lab/PageControl | 78.1 kB (+81 B) · 709 B CSS (0) | — | — · — · — |
| ToggleButtonGroup | 41.3 kB (+80 B) · 3.7 kB CSS (0) | — | — · — · — |
| ToggleButton | 91.9 kB (+73 B) · 10.9 kB CSS (0) | — | — · — · — |
| SegmentedControl | 102.0 kB (+71 B) · 6.9 kB CSS (0) | — | — · — · — |
| Switch | 108.8 kB (+70 B) · 10.0 kB CSS (0) | — | — · — · — |
| Lightbox | 145.2 kB (+69 B) · 11.9 kB CSS (0) | — | — · — · — |
| Toast | 103.4 kB (+66 B) · 11.1 kB CSS (0) | — | — · — · — |
| Slider | 114.3 kB (+59 B) · 8.9 kB CSS (0) | — | — · — · — |
| Tokenizer | 103.5 kB (+34 B) · 20.1 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 79.6 kB (+32 B) · 11.9 kB CSS (0) | — | — · — · — |
| RadioListItem | 75.8 kB (+31 B) · 10.5 kB CSS (0) | — | — · — · — |
| Carousel | 74.5 kB (+30 B) · 11.7 kB CSS (0) | — | — · — · — |
| DateRangeInput | 99.1 kB (+29 B) · 13.3 kB CSS (0) | — | — · — · — |
| lab/TourStep | 93.0 kB (+29 B) · 691 B CSS (0) | — | — · — · — |
| ListItem | 78.8 kB (+27 B) · 11.9 kB CSS (0) | — | — · — · — |
| NavHeadingMenu | 18.5 kB (+21 B) · 3.5 kB CSS (0) | — | — · — · — |
| lab/TabBarMoreList | 101.6 kB (+21 B) · 1.8 kB CSS (0) | — | — · — · — |
| MultiSelector | 101.3 kB (+20 B) · 17.7 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 120.6 kB (+19 B) · 1.4 kB CSS (0) | — | — · — · — |
| lab/TransferList | 111.8 kB (+13 B) · 1.2 kB CSS (0) | — | — · — · — |
| DrawerHeader | 67.9 kB (+2 B) · 13.7 kB CSS (0) | — | — · — · — |
| TopNavMenu | 81.4 kB (+2 B) · 12.0 kB CSS (0) | — | — · — · — |
| CodeBlock | 79.9 kB (+1 B) · 12.1 kB CSS (0) | — | — · — · — |
| ContextMenuItem | 35.1 kB (+1 B) · 6.9 kB CSS (0) | — | — · — · — |
| DropdownMenuItem | 27.6 kB (+1 B) · 6.8 kB CSS (0) | — | — · — · — |
| SideNavHeading | 82.3 kB (+1 B) · 12.1 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 75.1 kB (+1 B) · 14.0 kB CSS (0) | — | — · — · — |
| Text | 14.2 kB (+1 B) · 5.5 kB CSS (0) | — | — · — · — |
| TextInput | 72.6 kB (+1 B) · 12.0 kB CSS (0) | — | — · — · — |
| Timer | 16.4 kB (+1 B) · 6.1 kB CSS (0) | — | — · — · — |
| Timestamp | 35.8 kB (+1 B) · 11.0 kB CSS (0) | — | — · — · — |
| lab/DiffViewer | 92.8 kB (+1 B) · 2.1 kB CSS (0) | — | — · — · — |
| Avatar | 45.8 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| AvatarGroup | 48.6 kB (0) · 5.8 kB CSS (0) | — | — · — · — |
| AvatarGroupOverflow | 51.8 kB (0) · 5.7 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 78.2 kB (0) · 11.7 kB CSS (0) | — | — · — · — |
| Calendar | 76.0 kB (0) · 11.4 kB CSS (0) | — | — · — · — |
| ChatComposer | 84.4 kB (0) · 12.9 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 82.0 kB (0) · 12.1 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 82.0 kB (0) · 12.1 kB CSS (0) | — | — · — · — |
| ChatLayout | 88.2 kB (0) · 11.3 kB CSS (0) | — | — · — · — |
| ChatMessageList | 30.6 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| ChatSendButton | 65.3 kB (0) · 10.8 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 34.9 kB (0) · 8.4 kB CSS (0) | — | — · — · — |
| CheckboxInput | 68.8 kB (0) · 10.1 kB CSS (0) | — | — · — · — |
| CheckboxList | 73.0 kB (0) · 7.8 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 34.3 kB (0) · 7.6 kB CSS (0) | — | — · — · — |
| CommandPaletteItem | 13.4 kB (0) · 3.6 kB CSS (0) | — | — · — · — |
| ComplexSelector | 77.4 kB (0) · 12.6 kB CSS (0) | — | — · — · — |
| DialogHeader | 67.7 kB (0) · 12.3 kB CSS (0) | — | ✓ · ✓ · ✓ |
| DropdownMenuCheckboxItem | 28.4 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| DropdownMenuRadioItem | 28.5 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| Field | 59.3 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| FieldLabel | 55.2 kB (0) · 5.8 kB CSS (0) | — | — · — · — |
| FileInput | 74.0 kB (0) · 11.7 kB CSS (0) | — | — · — · — |
| Heading | 14.8 kB (0) · 5.5 kB CSS (0) | — | — · — · — |
| HoverCard | 30.1 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| InfoTip | 50.2 kB (0) · 5.4 kB CSS (0) | — | — · — · — |
| InputGroup | 60.9 kB (0) · 7.9 kB CSS (0) | — | — · — · — |
| Link | 56.2 kB (0) · 7.1 kB CSS (0) | — | — · — · — |
| Outline | 25.3 kB (0) · 4.1 kB CSS (0) | — | — · — · — |
| Overlay | 23.0 kB (0) · 3.9 kB CSS (0) | — | — · — · — |
| ProgressBar | 11.9 kB (0) · 6.4 kB CSS (0) | — | — · — · — |
| RadioList | 60.7 kB (0) · 7.3 kB CSS (0) | — | — · — · — |
| SegmentedControlItem | 18.8 kB (0) · 4.3 kB CSS (0) | — | — · — · — |
| SelectableCard | 18.7 kB (0) · 7.5 kB CSS (0) | — | — · — · — |
| SelectorOption | 23.8 kB (0) · 6.6 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 65.7 kB (0) · 10.8 kB CSS (0) | — | — · — · — |
| Spinner | 27.2 kB (0) · 6.3 kB CSS (0) | — | — · — · — |
| StatusDot | 33.7 kB (0) · 5.4 kB CSS (0) | — | — · — · — |
| Step | 31.6 kB (0) · 5.6 kB CSS (0) | — | — · — · — |
| Stepper | 66.6 kB (0) · 10.9 kB CSS (0) | — | — · — · — |
| Tab | 14.9 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TabList | 47.1 kB (0) · 6.5 kB CSS (0) | — | — · — · — |
| Thumbnail | 69.2 kB (0) · 12.3 kB CSS (0) | — | — · — · — |
| Token | 29.3 kB (0) · 4.8 kB CSS (0) | — | — · — · — |
| Toolbar | 47.0 kB (0) · 8.1 kB CSS (0) | — | — · — · — |
| Tooltip | 32.0 kB (0) · 4.5 kB CSS (0) | — | — · — · — |
| TopNavHeading | 81.9 kB (0) · 12.0 kB CSS (0) | — | — · — · — |
| TopNavItem | 14.6 kB (0) · 4.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 75.9 kB (0) · 12.6 kB CSS (0) | — | — · — · — |
| TopNavMegaMenuItem | 14.3 kB (0) · 4.2 kB CSS (0) | — | — · — · — |
| TreeList | 46.2 kB (0) · 5.9 kB CSS (0) | — | — · — · — |
| Typeahead | 87.5 kB (0) · 13.3 kB CSS (0) | — | — · — · — |
| lab/CommentPin | 60.2 kB (0) · 1.2 kB CSS (0) | — | — · — · — |
| lab/DialogHeroHeader | 88.4 kB (0) · 372 B CSS (0) | — | — · — · — |
| lab/LineClamp | 16.4 kB (0) · 168 B CSS (0) | — | — · — · — |
| lab/ListInput | 93.4 kB (0) · 922 B CSS (0) | — | — · — · — |
| lab/SelectableCardGroup | 68.6 kB (0) · 162 B CSS (0) | — | — · — · — |
| lab/TabBarItem | 3.9 kB (0) · 1.8 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 305.3 kB (0) · 2.6 kB CSS (0) | — | — · — · — |
| richtext/RichTextView | 281.9 kB (0) · 2.3 kB CSS (0) | — | — · — · — |
| Button | 64.9 kB (−1 B) · 10.8 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 65.4 kB (−1 B) · 10.8 kB CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 65.4 kB (−1 B) · 11.0 kB CSS (0) | — | — · — · — |
| Collapsible | 29.0 kB (−1 B) · 4.5 kB CSS (0) | — | — · — · — |
| SideNavItem | 76.8 kB (−1 B) · 11.9 kB CSS (0) | — | — · — · — |
| TabMenu | 78.7 kB (−1 B) · 11.9 kB CSS (0) | — | — · — · — |
| TextArea | 66.7 kB (−1 B) · 9.4 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 92.3 kB (−1 B) · 751 B CSS (0) | — | — · — · — |
| charts/ChartLegend | 56.6 kB (−2 B) · 224 B CSS (0) | — | — · — · — |
| Banner | 66.9 kB (−2 B) · 11.3 kB CSS (0) | — | — · — · — |
| ClickableCard | 18.5 kB (−2 B) · 7.3 kB CSS (0) | — | — · — · — |
| Item | 20.3 kB (−2 B) · 6.0 kB CSS (0) | — | — · — · — |
| List | 19.0 kB (−2 B) · 790 B CSS (0) | — | — · — · — |
| MobileNavToggle | 65.2 kB (−2 B) · 10.8 kB CSS (0) | — | — · — · — |
| NumberInput | 77.4 kB (−2 B) · 12.2 kB CSS (0) | — | — · — · — |
| IconButton | 64.9 kB (−7 B) · 10.8 kB CSS (0) | — | — · — · — |
| layer | — | — | — · ✓ · — |
| Layer | — | — | ✓ · ✓ · — |
Package size: @astryxdesign/core 7.57 MB packed (+9.8 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
|
Deployment failed for project astryx with the following error: |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: no current spec covers AlertDialog's touch input rule as implemented here (every tap, press and click is held for 435 ms after the alert starts presenting, and while it fades out its content is inert and focus leaves it), so an engineering owner needs to approve or reject that rule and say which record states it, by commenting /approve-spec <full head SHA> on this pull request; the author may do so as an engineering owner. Independently of that decision, these need changes:
- The branch carries the unmerged #8084, #8342 and touch-foundation commits (about 37,600 authored lines in 198 files); once they land, rebase so this pull request is only its 7-file AlertDialog commit.
- AlertDialog's touch action tracking has no
presentationopt-out, whicharchitecture:public-component-apiINV16 requires unless a current AlertDialog record defines it. - AlertDialog's import now carries the whole touch layer and the complete spring table, while
architecture:component-style-authoringINV6 asks for a lazy load under a coarse pointer or a stated justification, and only the table rows the alert uses. - Reopening the alert during its fade leaves focus on the document, because the dismissal hold blurs the focused action and nothing restores it.
- Under React StrictMode an alert mounted open loses its presentation hold, since the unmount-only effect's cleanup releases it during replay and the transition effect never places it again.
- The description should give element counts for the hold's shield, as
architecture:component-style-authoringINV7 asks for added elements.
[Automated review]
There was a problem hiding this comment.
Changes requested: one copied helper and the device results this head needs. The record edits carry an engineering owner's approval for this head, and the motion, input holds and phone width match component:AlertDialog FR6, FR7 and FR9.
- Miss:
useAlertMotion.ts:58-67copies Popover'stimingOn(Popover/popoverSurfaceMotion.ts:83-86, the same fallback to no motion when a theme's timing does not resolve), so please export that fallback frommotion/themeTiming.ts, call it from both files and delete both copies. component:AlertDialogFR6's verification row andspec:AST-094DEC-27 need the iPhone Safari and Android emulator results stated for the head that lands, and the earlier runs do not carry here because this head'smainmerges changedLayer/inputHold.ts,Button/Button.tsxandDialog/Dialog.tsx.
Non-blocking: the docs say the motion runs "on any touch device", but it follows a coarse primary pointer, so a finger on a touchscreen laptop gets the mouse behavior, and "on a phone or tablet" would be accurate. A head that changes record text needs a new /approve-spec <full head SHA>.
Claims and files checked
- Claim: under a finger the alert scales from 1.2 to 1 while it and the dimming fade in, on the theme's entrance duration and easing. Verified:
useAlertMotion.ts:41-44,:108-120; a probe 700 ms into a slowed entrance read scale 1.06, opacity 0.70 and dimming 0.70. - Claim: it dismisses with a fade alone on the exit tokens and stays open until the fade ends. Verified:
useAlertMotion.ts:47-50,:279-300; a probe 700 ms into a slowed exit read it open at 0.89 with no scale. - Claim: a close or a reopen midway turns back from where it is. Verified:
fadeFromHere(useAlertMotion.ts:90-100); the hook's unit tests. - Claim: under Reduce Motion both are the animator's 200 ms cross-fade. Verified in code (the animator's reduced-motion plan); the browser case was not run here.
- Claim: pointer input waits while the alert enters, and its content is inert while it leaves. Verified: the
'viewport'and'layer'holds (useAlertMotion.ts:251,:292); a probe found Cancel and Delete inert during the exit. - Claim: the leaving hold leaves a nested layer, its path and a child live region live, so a toast above the alert keeps its taps and its words are read. Verified:
inputHold.ts:157,:196-202,:511,:804,:1059,:1083; the four new hold cases fail on the base and pass here; an Undo tap during the fade ran. - Claim: a mouse keeps today's motion and width. Verified: the desktop frame is pixel-identical at 400 px.
- Claim: no new prop, export or data attribute, and callers decide nothing new. Verified: the generated API surface has no row;
AlertDialog.public.test.ts. - Claim: the motion and input rules apply under a coarse primary pointer only. Verified:
useTouchPresentationreads(pointer: coarse);AlertDialog.tsx:214-217. - Claim: the default width on a phone goes from 400 to 320 px, and a passed width still wins. Verified:
AlertDialog.tsx:213; unit test; probe 370 to 320 px. - Claim: the motion needs no exit copy, no registry and no new private attribute. Verified: it animates the live dialog and adds no attribute or module-scope registry.
- Claim: one private hook drives the dialog and its backdrop with the shared animator and the theme's timing, and no spring plays. Verified:
useAlertMotion.ts:108-120; unit test "plays no spring". - Claim: a new reader in the existing layer-root owner finds a nested layer. Verified:
layerRoot.stylex.ts:40-42. - Claim: the input hold's exports are unchanged; only its layer scope changes. Verified: the new helpers are module-local.
- Claim: size is +2,902 / −100 in 18 files, product code +475 / −36 and tests +2,263 / −23. Verified against the clone's numstat.
- Claim: this head adds one record line to a merge of main that changes none of the pull request's files but changes Button and Dialog. Verified; that merge also changes Toast and ToastViewport, which the toast case uses.
- Claim: main's kept-inside hold runs on a separate path from the new exceptions. Verified:
inputHold.ts:464-466. - Claim: red-first, mutation, unit, accessibility, typecheck and lint runs pass. Re-run here: the four hold cases fail on the base and pass on the head; the AlertDialog, Layer, Dialog, Toast and BottomSheet unit suites, the core typecheck and ESLint on the changed files pass; the browser and accessibility specs were not re-run.
- Claim: device runs at this head are pending. True, and they are still required.
- Claim: the changeset repeats the claims above, ending "With a mouse nothing changes". Verified as above.
- Claim: the docs say the actions are tracked as one group under a finger or a pen while a mouse keeps each button's click. Verified: tracking requires a coarse pointer. The docs' "on any touch device" overstates where the motion runs (non-blocking).
- File
.changeset/alertdialog-touch-motion.md: clear. - File
apps/sandbox/src/app/(raw)/pages/alert-dialog-cases/caseIds.ts: clear. - File
apps/sandbox/src/app/(raw)/pages/alert-dialog-cases/cases.tsx: clear. - File
apps/storybook/stories/AlertDialog.stories.tsx: clear. - File
docs/architecture/layer-runtime.md: clear (owner-approved at this head). - File
docs/specs/components/AlertDialog/AlertDialog.spec.md: finding: the FR6 row (line 231) needs the device and emulator results at this head. - File
packages/core/src/AlertDialog/AlertDialog.doc.mjs: clear, with one non-blocking wording note. - File
packages/core/src/AlertDialog/AlertDialog.public.test.ts: clear. - File
packages/core/src/AlertDialog/AlertDialog.test.tsx: clear. - File
packages/core/src/AlertDialog/AlertDialog.tsx: clear. - File
packages/core/src/AlertDialog/__tests__/AlertDialog.motion.interaction.browser.spec.ts: clear (read, not run here). - File
packages/core/src/AlertDialog/useAlertMotion.test.tsx: clear. - File
packages/core/src/AlertDialog/useAlertMotion.ts: finding at lines 58-67 (copied helper). - File
packages/core/src/Dialog/__tests__/Dialog.reduced-motion.a11y.browser.spec.ts: clear (read, not run here). - File
packages/core/src/Dialog/__tests__/DialogTouchEntrance.interaction.browser.spec.ts: clear (read, not run here). - File
packages/core/src/Layer/inputHold.test.tsx: clear. - File
packages/core/src/Layer/inputHold.ts: clear. - File
packages/core/src/privateAttributes/layerRoot.stylex.ts: clear.
readThemeTimingOrInstant in motion/themeTiming.ts reads a theme timing, or plays no motion when the timing does not resolve. AlertDialog's motion and Popover's surface motion call it in place of their own copies, so a change to that fallback reaches both.
The motion follows a coarse primary pointer, so a finger on a touchscreen laptop gets the mouse behavior. The docs now say "on a phone or tablet" instead of "on any touch device".
|
/approve-spec 5a5e131 |
|
Decision: D-20261114-169 Records the Specs consistency stamp at 43d6ceb after a main merge that brought swipe actions. The records stay consistent, and every applicable device cell was taken again at this exact head: all 61 Android emulator cells kept at normal, slow and reduced motion, and the real iPhone side-by-side against the owner's passed head shows the same behavior in all 16 pairs. One early red was a capture failure in the test rig, not either build, and its re-run kept. |
There was a problem hiding this comment.
Changes requested: the code and the record edits are in order, and one piece of evidence the spec requires is still missing at this head.
- The FR6 verification row of
component:AlertDialogandspec:AST-094DEC-27 need real-iPhone Safari and Android emulator results for the head that lands, stated in text (device or emulator, browser, head, animation settings, result); the description still lists this head's device runs as pending, and DEC-31 cannot carry the earlier runs because this head changes the pull request's own files.
The record edits carry an engineering owner's approval for this head, and the unit tests for the alert, the input hold and the theme timing pass here. The two comment-wording suggestions from the last review still apply and stay non-blocking.
Claims and files checked
- Changeset, under a finger the alert scales into place from 1.2 while it and the dimming fade in on the theme's entrance timing: verified (
useAlertMotion.ts:226-239, the unit curve cases). - Changeset, on close it fades out with the dimming on the theme's exit timing, and a close or reopen midway turns back from where it is: verified (
useAlertMotion.ts:241-288, unit cases). - Changeset, a touch does nothing while it appears, and keys and assistive technology still act: verified (the
'viewport'hold; unit cases). - Changeset, nothing reaches it while it leaves, but a toast its action raised stays live and is read: verified (
AlertDialog.tsx:221-229,inputHold.ts:1059-1105; the nested-layer and live-region hold cases). - Changeset, reduced motion only cross-fades: verified (the animator's opacity-only plan; the browser spec's reduced-motion case covers it).
- Changeset and description, with no
widtha phone's default goes from 400 to 320 px in every theme and a passed width wins: verified (AlertDialog.tsx:213, the width unit case). - Changeset and description, nothing changes with a mouse: verified (every new path is gated on a coarse primary pointer; unit mouse case).
- Description, no new prop, export or data attribute: verified (the generated API surface has no row;
AlertDialog.public.test.ts). - Description, one fallback for an unresolved theme timing shared by the alert and Popover: verified (
motion/themeTiming.ts:311-319). - Description, the head merges main with no conflict, and that merge changes the layer runtime record and Button: verified.
- Description, size of +2,943 / −117 lines in 22 files: verified.
- Description, device runs at this head are pending: verified, and this is the finding above.
- Description, test tallies: partly verified (a 398-test unit subset passes here; the browser runs were not repeated).
- Files: all 22 changed files were read;
AlertDialog.spec.mdcarries the finding above,useAlertMotion.tsandAlertDialog.tsxcarry the wording suggestions, and the other 19 are clear.
| * The presentation plays the theme's entrance easing over its duration step | ||
| * for UIKit's measured 404 ms alert present. A tap opens an alert, and a tap |
There was a problem hiding this comment.
Non-blocking (architecture:knowledge-contracts INV29 style): "over its duration step for UIKit's measured 404 ms alert present" leaves the step unnamed. Suggested: "The present plays --ease-entrance over --duration-medium-max, the theme's step for UIKit's measured 404 ms present."
| // Only under the touch presentation does a press slide across the | ||
| // actions, and does the alert scale in and fade out. A desktop press stays | ||
| // the native button's, and a mouse keeps the theme's entrance. |
There was a problem hiding this comment.
Non-blocking (architecture:knowledge-contracts INV29 style): the first sentence carries two topics. Suggested: "Only the touch presentation tracks a press across the actions. It also scales the alert in and fades it out. A desktop press stays the native button's, and a mouse keeps the theme's entrance."
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. Every job skipped because the pull request is a draft, and it already has the ci:run label, so CI runs once it is marked ready for review.
The device results for this head are now stated in the description, which resolves the one item from the last review. The touch motion, the input holds, the phone width and the toast that stays live during the fade follow component:AlertDialog FR6, FR7 and FR9. The record edits carry an engineering owner's approval for this head.
Two optional comment-wording suggestions from the last review still apply (useAlertMotion.ts:36-37 and AlertDialog.tsx:209-211). Neither blocks.
Claims and files checked
- Changeset: under a finger the alert scales into place from 1.2 while it and the dimming fade in, on the theme's entrance timing. Verified (
useAlertMotion.ts:40-43,:226-240; the unit curve cases; a Chromium frame mid-entrance). - Changeset: on close it fades out with the dimming on the theme's exit timing, and a close or a reopen midway turns back from where it is. Verified (
useAlertMotion.ts:45-49,:242-295; unit cases). - Changeset: while it appears a touch does nothing, and keys and assistive technology still act. Verified (the pointer-only entrance hold; unit cases).
- Changeset: while it leaves nothing reaches it, but a toast its action raised stays live and is read. Verified (
AlertDialog.tsx:218-229,inputHold.ts:1059-1122; unit cases; a Chromium frame where Undo ran during the fade). - Changeset: with reduced motion it only cross-fades. Verified (the animator's fixed opacity-only cross-fade; the pull request's reduced-motion browser case).
- Changeset and description: on a phone with no
widththe alert goes from 400 to 320 px in every theme, and a passedwidthwins. Verified (AlertDialog.tsx:213; the width unit case; frames at 370 → 320 px). - Changeset and description: nothing changes with a mouse. Verified (every new path is gated on a coarse primary pointer; desktop frames are pixel-identical).
- Description: today the alert rises with Dialog's entrance, vanishes at once and is 400 px wide. Verified (base frames).
- Description: no new prop, export or data attribute. Verified (the generated API surface shows no changed row;
AlertDialog.public.test.ts). - Description: one internal hook drives the dialog and its backdrop on the shared animator and the theme's timing, and the measured springs stay reference only. Verified (no spring plays; unit case).
- Description: one shared fallback for an unresolved theme timing, used by the alert and Popover. Verified (
motion/themeTiming.ts:311-319; Popover's removed copy was identical). - Description: the alternative pull request is open, and only one of the two lands. Verified that it is still an open draft.
- Description: the head merges main with no conflict, and that merge changes the layer runtime record and Button. Verified, along with the described commit history.
- Description: size is +2,943 / −117 lines in 22 files, with product code +487 / −53 and tests +2,292 / −23. Verified.
- Description: unit tests, the core typecheck, strict ESLint and Prettier on the changed files, and the knowledge and changeset checks pass. Verified here (396 unit tests in the AlertDialog, Layer hold, theme timing, Popover and Dialog suites).
- Description: browser interaction, accessibility-spec and Storybook tallies, and the red-first and mutation results. Not re-run here, since CI skipped on the draft. They are consistent with the unit results and with this review's frames.
- Description: iPhone Safari runs side by side with the approved head, and Android emulator runs at normal, slow and removed animations, all at this head. Stated in text as the repository requires, and they cover the cases the spec lists.
- Files: all 22 changed files were read.
useAlertMotion.tsandAlertDialog.tsxcarry the two optional wording suggestions. The other 20 are clear: the changeset, the two sandbox case files, the story, both records,AlertDialog.doc.mjs,AlertDialog.public.test.ts,AlertDialog.test.tsx, the motion browser spec,useAlertMotion.test.tsx, the two Dialog browser specs,inputHold.test.tsx,inputHold.ts,popoverSurfaceMotion.ts, both theme-timing tests,themeTiming.tsandlayerRoot.stylex.ts.
|
/approve-spec 43d6ceb |
1 similar comment
|
/approve-spec 43d6ceb |
There was a problem hiding this comment.
Changes requested: one report is missing. The code, the record edits and the device evidence otherwise check out at this head.
- Newly live check: this pull request grows the shared
Layer/inputHold.ts,motion/themeTiming.tsandprivateAttributes/layerRoot.stylex.tsmodules, soarchitecture:component-import-boundariesINV10 asks the description to state the base-against-head first-load gzip delta on the four reference pages (docs, form, menu and table); a source build here measures 0, 0, +670 B and +661 B, mostly from the new import ofLayer/modalOutlet.tsininputHold.ts.
The device results stated for the previous head still count here, because this head only merges main and changes none of the pull request's files or their direct imports. Two optional comment-wording suggestions from the last review still apply (useAlertMotion.ts:36-37 and AlertDialog.tsx:209-211).
Claims and files checked
- Changeset: under a finger the alert scales into place from 1.2 while it and the dimming fade in on the theme's entrance timing. Verified (
useAlertMotion.ts:40-43,:226-240; unit curve cases). - Changeset: it fades out with the dimming on the theme's exit timing, and a close or reopen midway turns back from where it is. Verified (
useAlertMotion.ts:45-49,:241-287; unit cases). - Changeset: while it appears a touch does nothing, and keys and assistive technology still act. Verified (pointer-only
'viewport'hold; unit cases). - Changeset: while it leaves nothing reaches it, but a toast its action raised stays live and is read. Verified (
AlertDialog.tsx:221-229,inputHold.ts:1059-1110; unit cases). - Changeset: with reduced motion it only cross-fades. Verified (the animator's opacity-only substitution; the reduced-motion browser case).
- Changeset and description: on a phone with no
widththe alert goes from 400 to 320 px in every theme, and a passedwidthwins. Verified (AlertDialog.tsx:213; width unit case). - Changeset and description: nothing changes with a mouse. Verified (every new path is gated on a coarse primary pointer).
- Description: no new prop, export or data attribute. Verified (the generated API surface shows no changed row;
AlertDialog.public.test.ts). - Description: one internal hook drives the dialog and its backdrop on the shared animator and the theme's timing, and the measured springs stay reference only. Verified (no spring plays; unit case).
- Description: one shared fallback for an unresolved theme timing serves the alert and Popover. Verified (
motion/themeTiming.ts:311-319). - Description: this head merges
mainwith no conflict and changes none of the pull request's files or their direct imports, while deeper imports and the sandbox page's Link import change. Verified. - Description: size is +2,943 / −117 lines in 22 files, product code +487 / −53 and tests +2,292 / −23. Verified.
- Description: unit tests, the core typecheck and the knowledge and changeset checks pass. Verified here (558 unit tests in 16 files).
- Description: browser interaction and accessibility tallies, red-first and mutation results. Not re-run here, since CI skipped on the draft; consistent with the unit results.
- Description: iPhone Safari and Android emulator runs at the previous head. Stated in text as the repository requires, and they carry to this head.
- Files: all 22 changed files were read.
Layer/inputHold.ts,motion/themeTiming.tsandlayerRoot.stylex.tscarry the INV10 report finding;useAlertMotion.tsandAlertDialog.tsxcarry the two optional wording notes; the other 17 are clear (the changeset, both sandbox case files, the story, both records,AlertDialog.doc.mjs,AlertDialog.public.test.ts,AlertDialog.test.tsx, the motion browser spec,useAlertMotion.test.tsx, both Dialog browser specs,inputHold.test.tsx,popoverSurfaceMotion.tsand both theme-timing tests).
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because every job skips while the pull request is a draft; it runs once the pull request is ready for review, and the ci:run label is already set.
The per-page first-load size report is now in the description and matches a fresh measurement on the built packages (docs +10 B, form 0 B, menu +649 B, table +630 B gzip). The device results stated for the previous head still count here, because this head only merges main and touches none of the pull request's files or their direct imports. Two optional comment-wording suggestions remain inline (useAlertMotion.ts:36-38, AlertDialog.tsx:209-211).
Claims and files checked
- Changeset: under a finger the alert scales into place from 1.2 while it and the dimming fade in, on the theme's entrance timing. Verified (
useAlertMotion.ts:40-43,:96-108; unit curve cases; a frame 700 ms into a slowed entrance shows scale 1.059 at opacity 0.704). - Changeset: it fades out with the dimming on the theme's exit timing, and a close or a reopen midway turns back from where it is. Verified (
useAlertMotion.ts:46-49,:78-88,:242-289; unit cases). - Changeset: while it appears a touch does nothing, and keys and assistive technology still act. Verified (the pointer-only
'viewport'hold; unit and hold cases). - Changeset: while it leaves nothing reaches it, but a toast its action raised stays live and its words are read. Verified (
AlertDialog.tsx:218-229,inputHold.ts:157-206,:1059-1113; unit cases; a frame of the Undo tap running during the fade). - Changeset: with reduced motion it only cross-fades. Verified (the shared animator's opacity-only 200 ms substitution).
- Changeset and description: on a phone with no
widththe alert goes from 400 to 320 px in every theme, and a passedwidthwins. Verified (AlertDialog.tsx:213; the width unit case; frames at 320 px against 370 px after the clamp on a 402 px screen). - Changeset and description: with a mouse nothing changes. Verified (every new path is gated on a coarse primary pointer; desktop frames are pixel-identical).
- Description: today the alert rises with Dialog's entrance, vanishes at once and requests 400 px. Verified (base frames).
- Description: the leaving hold now leaves a nested layer, its path and a child live region live. Verified (
inputHold.ts:1083-1113; hold unit cases). - Description: the governing claims are the component's own touch-motion, input and width requirements under the touch-presentation spec, with the toast's hosting and announcement rules. Verified (the component record is current; the record edits carry an owner's approval for this head).
- Description: an earlier pull request implements the same requirements differently, and only one should land. Verified (it is still an open draft).
- Description: no new prop, export or data attribute, and the motion and input rules apply under a coarse primary pointer only. Verified (the generated API surface shows no changed row; the width default is the one documented change).
- Description: one internal hook drives the dialog and its backdrop on the shared animator and the theme's timing, and the measured springs stay reference only. Verified (no spring plays; unit case).
- Description: red-first and mutation results on an earlier base. Not re-run here.
- Description: this head merges
mainwith no conflict and changes none of the pull request's files or their direct imports, while deeper imports and the sandbox page's link import change; the earlier merge chain is as described. Verified against the commit graph and the merge's changed files. - Description: browser interaction and accessibility tallies. Not re-run here, since CI skips the draft.
- Description: unit tests, the core typecheck, and the knowledge and changeset checks pass. Verified here (1,225 unit tests in 41 files; the other checks pass); the Storybook build, ESLint and Prettier were not re-run.
- Description: iPhone Safari and Android emulator results at the previous head, recorded by an owner. Stated in text as the repository requires, and they carry to this head.
- Description: size is +2,943 / −117 lines in 22 files, product code +487 / −53 and tests +2,292 / −23. Verified.
- Description: first-load gzip on the four reference pages is docs +10 B, form 0 B, menu +649 B and table +630 B; menu and table now load the modal-outlet module (1,436 B minified), the hold grows 421 B and the layer-root owner 55 B. Verified by a fresh build of each page.
- Description: the new hook, the new layer-root reader and the new theme-timing export are internal, in their existing owners, and no package entry exports them; the hold changes only its dismissal scope. Verified.
- Description: the story for a toast and the sandbox case for interruptions serve the tests and device runs. Verified.
- Description: writing-rubric results for both records. Verified against the record diffs.
- Files: all 22 changed files were read.
useAlertMotion.tsandAlertDialog.tsxcarry the two optional wording notes; the other 20 are clear (the changeset, both sandbox case files, the story, both records,AlertDialog.doc.mjs,AlertDialog.public.test.ts,AlertDialog.test.tsx, the motion browser spec,useAlertMotion.test.tsx, both Dialog browser specs,inputHold.test.tsx,inputHold.ts,popoverSurfaceMotion.ts,themeTiming.ts, both theme-timing tests andlayerRoot.stylex.ts).
|
The 320 px phone width is an approved design: AlertDialog DEC-2 (decided by the owner, 2026-10-26) and FR9 state that on a phone an alert is 320 px wide in every theme, as iOS's is. Approved designs ship on the normal gates, so needs:design-review is cleared. (Posted by Cindy's agent.) |
A loaded engine can run the commit that closes the alert late. The animator then dates the fade at the last frame, and it can retire the fade before the next frame. The check looked for the fade in the dialog's running animations once per frame, so it could miss it and fail with "no fade after the close". The check now records the fade where the animator makes it, reads its start time in that task, and waits for it on a timer, still for at most 1 s. A close that makes no fade still fails with "no fade after the close". A take whose fade ends before any frame is taken again, as before, and the report records each retake.
|
/approve-spec 16a8869 |
There was a problem hiding this comment.
Changes requested: one line of the description is out of date. The code, the record edits and the evidence otherwise check out at this head, and an engineering owner approved the record edits for it.
- The description's size line still says +2,943 / −117 lines with tests +2,292 / −23, but this head's test commit makes it +2,971 / −117 with tests +2,320 / −23; please update that line, which needs no new commit.
Two optional comment-wording suggestions remain inline (useAlertMotion.ts:36-38, AlertDialog.tsx:209-211). CI has not run on this head because the pull request is a draft.
Claims and files checked
- Changeset: under a finger the alert scales into place from 1.2 while it and the dimming fade in, on the theme's entrance timing. Verified (
useAlertMotion.ts:226-240; unit curve cases; a frozen frame 23% into a slowed entrance shows scale 1.063 with card and dimming at 0.681). - Changeset: it fades out with the dimming on the theme's exit timing, and a close or a reopen midway turns back from where it is. Verified (
useAlertMotion.ts:241-289; unit cases; a frame 900 ms into a slowed exit shows the open alert at 0.833). - Changeset: while it appears a touch does nothing, and keys and assistive technology still act. Verified (the pointer-only hold at
useAlertMotion.ts:239; unit and hold cases). - Changeset: while it leaves nothing reaches it, but a toast its action raised stays live and its words are read. Verified (
AlertDialog.tsx:218-229,inputHold.ts:152-168,:1054-1110; unit cases; a frame of the toast's Undo tap running during the fade). - Changeset: with reduced motion it only cross-fades. Verified (200 ms opacity-only curves on the card and the dimming under reduced motion).
- Changeset and description: on a phone with no
widththe alert goes from 400 to 320 px in every theme, and a passedwidthwins. Verified (AlertDialog.tsx:213; the width unit case; frames at 320 px against 370 px on the base). - Changeset and description: with a mouse nothing changes. Verified (every new path is gated on a coarse primary pointer; desktop frames are pixel-identical).
- Description: today the alert rises with Dialog's entrance, vanishes at once and requests 400 px. Verified (base frames).
- Description: the leaving hold leaves a nested layer, its path and a child live region live. Verified (
inputHold.ts:152-168,:1054-1110; hold unit cases). - Description: the governing claims are the component's touch-motion, input and width requirements under the touch-presentation spec, with the toast's hosting and announcement rules. Verified (the component record is current; the record edits carry an owner's approval for this head).
- Description: an earlier pull request implements the same requirements differently, and only one should land. Verified (it is still an open draft).
- Description: no new prop, export or data attribute, and the motion and input rules apply under a coarse primary pointer only. Verified (the generated API surface shows no changed row; the width default is the one documented change).
- Description: one internal hook drives the dialog and its backdrop on the shared animator and the theme's timing, and the measured springs stay reference only. Verified (no spring plays; unit case).
- Description: red-first and mutation results on an earlier base. Not re-run here.
- Description: this head changes one test file, the turn-back check, over the previous head; that head merged
mainwith no conflict and changed none of the pull request's files or their direct imports. Verified against the commit graph and the merge's changed files. - Description: the turn-back check now finds the fade where it is made, still waits at most 1 s, keeps its tolerances and three takes, and records each retake. Verified by reading the change; the check was not run here.
- Description: browser, accessibility, Storybook-build and lint results at the previous head. Not re-run here, since CI skips the draft.
- Description: unit tests, the knowledge check and the changeset check pass. Verified here (1,225 unit tests in 41 files; both checks pass).
- Description: iPhone Safari and Android emulator results at the previous head. Stated in text as the repository requires, and they carry to this head because only a test file changed.
- Description: the previous head's owner record is linked as the decision for an earlier head. That comment now records the previous head's stamp; the paragraph is out of date (non-blocking).
- Description: size is +2,943 / −117 lines in 22 files, product code +487 / −53 and tests +2,292 / −23. False at this head: +2,971 / −117, tests +2,320 / −23 (product code is right).
- Description: first-load gzip on the four reference pages is docs +10 B, form 0 B, menu +649 B and table +630 B. Stated for the previous head; no package source changed since.
- Description: the new hook, the layer-root reader and the theme-timing export are internal and in their existing owners, and the hold changes only its dismissal scope. Verified.
- Description: the toast story and the interruptions sandbox case serve the tests and device runs. Verified.
- Description: writing-rubric results for both records. Verified against the record diffs.
- Files: all 22 changed files were read.
useAlertMotion.tsandAlertDialog.tsxcarry the two optional wording notes; the other 20 are clear (the changeset, both sandbox case files, the story, both records,AlertDialog.doc.mjs,AlertDialog.public.test.ts,AlertDialog.test.tsx, the motion browser spec,useAlertMotion.test.tsx, both Dialog browser specs,inputHold.test.tsx,inputHold.ts,popoverSurfaceMotion.ts,themeTiming.ts, both theme-timing tests andlayerRoot.stylex.ts).
|
The size line now reads +2,971 / −117 in 22 files, with tests +2,320 / −23, from |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet, because every job skips while the pull request is a draft; it runs once the pull request is ready for review, and the ci:run label is already set.
The description's size line now matches the diff, which was the one change requested on this revision. The record edits carry an engineering owner's approval for this head, and the device results stated for the previous head still count, because the only commit since edits a browser test. Optional: the device-runs paragraph for an earlier head links an owner comment that now describes a later head, and two comment-wording suggestions remain inline (useAlertMotion.ts:36-38, AlertDialog.tsx:209-211).
Claims and files checked
- Changeset: under a finger the alert scales into place from 1.2 while it and the dimming fade in, on the theme's entrance timing. Verified (
useAlertMotion.ts:40-43,:226-239; unit curve cases; a frame 700 ms into a slowed entrance shows scale 1.059 at opacity 0.706). - Changeset: it fades out with the dimming on the theme's exit timing, and a close or a reopen midway turns back from where it is. Verified (
useAlertMotion.ts:46-49,:242-289; unit cases; open at opacity 0.834 900 ms into a slowed exit). - Changeset: while it appears a touch does nothing, and keys and assistive technology still act. Verified (the pointer-only hold at
useAlertMotion.ts:239; unit and hold cases). - Changeset: while it leaves nothing reaches it, but a toast its action raised stays live and its words are read. Verified (
AlertDialog.tsx:221-229,inputHold.ts:157-205,:1059-1110; unit cases; an Undo tap ran during the fade in the toast story). - Changeset: with reduced motion it only cross-fades. Verified (the shared animator's 200 ms opacity-only substitution).
- Changeset and description: on a phone with no
widththe alert goes from 400 to 320 px in every theme, and a passedwidthwins. Verified (AlertDialog.tsx:213; the width unit case; 320 px against 370 px after the clamp on a 402 px screen). - Changeset and description: with a mouse nothing changes. Verified (every new path is gated on a coarse primary pointer; desktop frames are pixel-identical).
- Description: today the alert rises with Dialog's entrance, vanishes at once and requests 400 px. Verified (base frames).
- Description: the leaving hold leaves a nested layer, its path and a child live region live. Verified (
inputHold.ts:1083-1110; hold unit cases). - Description: no new prop, export or data attribute. Verified (the generated API surface shows no changed row; the width fallback is the one documented default change).
- Description: one internal hook drives the dialog and its backdrop on the shared animator and the theme's timing, and Popover shares the new timing fallback with no behavior change. Verified (
popoverSurfaceMotion.tscalls the shared fallback with a non-null element). - Description: the size line (+2,971 / −117, tests +2,320 / −23). Verified against the diff.
- Description: first-load size deltas on the four reference pages (docs +10 B, form 0 B, menu +649 B, table +630 B). Verified by a fresh build of the four pages from the built packages.
- Description: this head changes one test file over the previous head, whose merge of
maintouches none of the pull request's files. Verified. - Description: device results on a real iPhone and an Android emulator at the previous head. Stated in text; they carry to this head because the only commit since edits a test-only file.
- Description: the link to the owners' decision for an earlier head's device runs. The linked comment now describes a later head (optional fix).
- Description: red-first and mutation results on an earlier base. Not re-run here.
- Files:
.changeset/alertdialog-touch-motion.md, the sandboxcaseIds.tsandcases.tsx,AlertDialog.stories.tsx,layer-runtime.md,AlertDialog.spec.md,AlertDialog.doc.mjs,AlertDialog.public.test.ts,AlertDialog.test.tsx,AlertDialog.motion.interaction.browser.spec.ts,useAlertMotion.test.tsx,Dialog.reduced-motion.a11y.browser.spec.ts,DialogTouchEntrance.interaction.browser.spec.ts,inputHold.test.tsx,Popover/popoverSurfaceMotion.ts,themeTiming.server.test.ts,themeTiming.test.ts,themeTiming.ts,layerRoot.stylex.ts: clear. - Files:
AlertDialog.tsxanduseAlertMotion.ts: clear apart from the optional wording notes;inputHold.ts: clear.
User need
On a phone, an alert should appear and leave as iOS's does, and be 320 px wide. Today it rises with Dialog's entrance, vanishes at once and is 400 px wide. A toast its action raises must stay usable while it leaves.
Problem and solution fit
--duration-medium-maxand--ease-entrance.--duration-exitand--ease-exit. The dialog stays open until the fade ends.Current specification
component:AlertDialogFR6, FR7 and FR9, underspec:AST-094FR7, FR35 and FR45. The toast followsspec:AST-003FR16 andspec:AST-086FR2.Overlap with #8084
#8084 implements the same FR6, FR7 and FR9 with a different design: CSS keyframes, an exit copy and a page-wide host registry. Only one of the two lands. This one fades the live dialog, so it needs no copy, no registry and no new private attribute.
Public delta and caller burden
widthstill wins.Design and alternatives
One internal hook drives the dialog and its
::backdropwith the shared motion animator, onreadThemeTimingand the entrance easing, as Popover's touch motion does. The measured springs stay as reference only. An exit copy was rejected: it adds an element, and the toast then needs a registry.Evidence
Scope
Components: AlertDialog, Layer. Popover's surface motion shares the new timing fallback.
Testing
The head, 16a8869, changes one test file over 43d6ceb: the turn-back check in
AlertDialog.motion.interaction.browser.spec.ts.43d6cebf27merges main 9d19da9 into 5a5e131 with no conflict. That merge changes none of this pull request's files or the files they import directly. Deeper in AlertDialog's imports, throughButton/Button.tsx, it changesutils/pressFeedback.ts(#8690) and two Icon files (#11498, #11502), and addsprivateAttributes/pressHeld.stylex.ts(#8690). The sandbox page that the device runs open also imports@astryxdesign/core/Link, which this merge changes (#11558).5a5e131eb2merges main ca36b56 into d46da0f with no conflict. That merge changesarchitecture:layer-runtime, which this pull request also changes, in other rows, andButton/Button.tsx, which AlertDialog imports.d46da0f01fadds two commits to ccac987. One moves the fallback for a theme timing that does not resolve intomotion/themeTiming.ts, which AlertDialog's and Popover's motion now call. The other says the motion runs on a phone or tablet.ccac987293adds one record commit to 8476269: the line under Owns forLayer/inputHold.tsnow names a blur dismissal hold.847626984fmerges main f5b5f96 into 1e2dd21 with no conflict. That merge changes none of this pull request's files. It changesButton/Button.tsxandDialog/Dialog.tsx, which AlertDialog imports.1e2dd21952adds two commits to c4d74bc. One adds a sentence to INV16 ofarchitecture:layer-runtime. The other splits four comment sentences for length, and makes two comments say a modal hosts its toast viewport.c4d74bcd18merges main b890479 into c44f975 with no conflict. Main changedLayer/inputHold.ts, its test and INV16 ofarchitecture:layer-runtime, which this pull request also changes. Its newfocus: 'kept-inside'hold and this pull request's dismissal exceptions run on separate paths.c44f975d04merges main 721dbf1 into 6f7e747 with no conflict, and 6f7e747 merges main 9d2ce46 into 836dd4c.836dd4cf0bmerges main a4595ef into 25b54b3, then adds two test commits. Main's line forLayer/holdEntranceInput.tsinarchitecture:layer-runtimemet ours, and the merge keeps both. The entrance check ofdesign:reduced-motionnow reads script animations too, and the turn-back check dates the close at its call.25b54b33ddmerges main 1740654 into b5a6854 with no conflict. Then the motion reads its pointer flag throughuseCommittedRef, asarchitecture:react-component-runtimeINV3 asks.b5a68547bcis seven commits on main b537123: the hold change, the alert's motion, two record commits, the entrance easing and two sandbox commits.Its first CI run, at 43d6ceb, failed once in WebKit with "no fade after the close".
Under load, the close's commit ran late. WebKit dated the fade at its last frame, and the fade ended before the next one.
The check looked for the fade once per frame, so it missed it. It now records the fade where the animator makes it.
A missing fade still fails. The check still waits at most 1 s for the fade, and the tolerances and the three takes are unchanged.
A local change makes the close end the alert with no fade. The check then fails with "no fade after the close", 3 of 3 times in each engine.
A take that paints no frame of the open alert while it fades is taken again, as before. The report records each retake with its frame count.
Failures in 20 runs per row, WebKit in CI's container with one worker, before and after the change:
Every failure before the change is "no fade after the close". Every failure after it is a run in which no take painted two frames of the open alert while it faded.
In those runs, the fade still starts at the presented opacity.
Unloaded, the changed check passes 20 of 20 times in WebKit and 5 of 5 in Chromium. Strict ESLint and Prettier pass.
For 16a8869, every run used 1 worker, on a tree that differs from it only in two comments:
pnpm test:a11y-contract:pr): 308 passed in Chromium. That is 45 fewer than at 5a5e131: main's test(Lightbox): run the keyboard and viewport specs on Lightbox changes #11524 now runs the two Lightbox specs only when Lightbox changes. Before its check read script animations,Dialog.reduced-motionsaw none on the alert under Reduce Motion with a finger, and failed.pnpm check:knowledgeandpnpm check:changesetspass.Earlier, at 3c1ab6d on main b537123:
AlertDialog.motion.interaction.browser.spec.tshas 19 cases. On main with only the spec and the story, 16 fail and 3 pass: a key during the entrance, and both mouse cases. At 3c1ab6d, Chromium passes all 19, and WebKit in CI's container passes 16 and skips the three Chromium-only cases.--ease-standardback, the unit case "plays a theme's own entrance and exit tokens" fails.Device runs at 16a8869: none. This head changes only a test file over 43d6ceb, so its shipped code is the code that these runs tested (
spec:AST-094DEC-31).Device runs at the prior head 43d6ceb, stated in text: the clips exist and are not attached. The owners' decision for 43d6cebf27 records these runs (D-20261114-169). On one iPhone 14, both heads ran interleaved, two takes in normal motion and two under Reduce Motion each. Each take used a fresh page load. The phone read the sandbox's
version.jsonfor each head before and after the takes: 43d6ceb and 25b54b3. Between the two heads, this pull request's code differs only in tests, comment and doc wording, and one helper. Every other code difference comes from main.Device runs at the prior head 5a5e131, stated in text: the clips exist and are not attached. The owners recorded these runs for 5a5e131 and required nothing further on the device side (D-20261113-331). On one iPhone 14, both heads ran interleaved, two takes in normal motion and two under Reduce Motion each. Each take used a fresh page load. The phone read the sandbox's
version.jsonfor each head: 5a5e131 and 25b54b3. Between the two heads, this pull request's code differs only in tests, comment and doc wording, and one helper. Its theme-timing fallback moved intomotion/themeTiming.ts, with no behavior change. Every other code difference comes from main.Device runs at the prior head ccac987, stated in text: the clips exist and are not attached. On one iPhone 14, both heads ran interleaved, two takes in normal motion and two under Reduce Motion each. Each take used a fresh page load. The phone read the sandbox's
version.jsonfor each head: ccac987 and 25b54b3. Between the two heads, this pull request's code differs only in two tests and in comment wording. Every other code difference comes from main.Device runs at the prior head c44f975, stated in text: the clips exist and are not attached. On one iPhone 14, both heads ran interleaved, two takes in normal motion and one under Reduce Motion each. The phone read the sandbox's
version.jsonfor each head: c44f975 and 25b54b3. Between the two heads, this pull request's code differs only in two tests. Every other code difference comes from main. The level read is the dimming under the card, per stream frame of about 28 ms.Device runs at the prior head 6f7e747, stated in text: the clips exist and are not attached. Both heads ran interleaved on one iPhone 14, two takes each. The phone read the sandbox's
version.jsonfor each head: 6f7e747 and 25b54b3. Between the two heads, this pull request's code differs only in two tests. Every other code difference comes from main. Scale is the card's width against its settled width, and opacity is the title's contrast against rest, read from frames of about 30 ms.Device runs at the prior head 25b54b3, stated in text: the clips exist and are not attached. Each iPhone run first read the sandbox's
version.json, which names 25b54b3.Public and internal API delta
architecture:component-import-boundariesINV10, from main 9d19da9 to 43d6ceb:Layer/modalOutlet.ts(1,436 B minified), whichLayer/inputHold.tsimports to put a nested layer back above the shield.inputHold.tsitself grows 421 B minified andlayerRoot.stylex.ts55 B..github/scripts/lib/component-size.js), on each page's import of its components from the built packages.@astryxdesign/corechanges.packages/core/src/AlertDialog/useAlertMotion.ts, exportinguseAlertMotion. No package entry exports it.const motion = useAlertMotion({isOpen, isEnabled: isTouch && isInline !== true});in AlertDialog. The Dialog then getsisOpen={motion.isPresented}and the mergedmotion.ref.motion/animator.ts,motion/themeTiming.tsandLayer/inputHold.tsdo the work, and the hook only orders them. AlertDialog.tsx could hold it, but would double in size.hasLayerRootWithin(element)in the existing ownerprivateAttributes/layerRoot.stylex.ts, asarchitecture:public-component-apiINV23 allows.Layer/inputHold.tskeeps live an element that holds a nested layer, and makes its other children inert.isLayerRootreads one element; a walk with it would visit every node of the layer.readThemeTimingOrInstant(element, tokens)in the existing modulemotion/themeTiming.ts. No package entry exports it.useAlertMotion.tsandPopover/popoverSurfaceMotion.tstake the theme's timing from it, or no motion when that timing does not resolve.Layer/inputHold.ts: no export changes. Only its'layer'scope changes, asarchitecture:layer-runtimenow states.AlertOverAToastserves the toast cases. The sandbox caseinterruptionslets a device clip show both interruptions.Writing rubric results
component:AlertDialog: FR6, FR7 and FR9 lose their implementation-gap notes, and Current-state impact keeps only AR1's Tab gap. FR7 gains one clause for a toast (spec:AST-003FR16). The verification rows name the new tests. Its Owns list namesuseAlertMotion.tsand says why it stays a private file.architecture:layer-runtimegains one present-tense ownership line forLayer/inputHold.ts, and one INV16 sentence on the nested layers a blur hold leaves live. It nameshasLayerRootWithin, and says why the owner's other readers do not fit.