Skip to content

fix(Toast): a swipe that turns back stretches the card and springs it back - #8144

Draft
vjeux wants to merge 1666 commits into
meta:mainfrom
vjeux:uikit/c25-toast-pull-away
Draft

vjeux wants to merge 1666 commits into
meta:mainfrom
vjeux:uikit/c25-toast-pull-away

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8121 (and its predecessors). Review only this PR's change: vjeux/astryx@2b59f30...260694b

Primary intent

Under a finger, a toast swipe that turns back away from the edge now stretches the card and springs it back, like iOS notification banners; that drag was dead.

User or maintainer impact

Each path: a named test, and a clip where marked. Recorded on the iOS 26.2 simulator.

Path Clip
Chromium and WebKit (real touch, no page scroll): up 20 px, then down 100 px: the card follows at 0.55× past 14 px (36 px below rest), then springs back; under Reduce Motion the release cross-fades (tests)
Mobile Safari, the same stroke: the browser takes the touch at the pan's 10 pt start, so the card never moves (owner question) turn-back

A drag starting away from the edge, or turning back within 10 pt, stays the page's; fine pointers: unchanged.

Problem and solution fit

On the iOS 26.2 simulator the banner's pull-down tracks at 0.55 × (travel − 14) (60 pt: 25.3; 70 pt: 31.3) and springs back; past ~75 pt it opens an expanded view a toast lacks, so the card keeps the ratio. One function becomes symmetric (followOffset); such a release springs back. No new values.

Authority

Owner decisions (proposed; pending owner review):

  • once the swipe began, the toast stretches away from its edge and springs back (the banner expands instead);
  • the stretch stays linear at 0.55× past the banner's measured 70 pt (no cap).

Change and evidence

  • toastSwipe.ts: followOffset follows either way; a stretched card's release never dismisses.
  • jsdom: 12 px up, then 74 px down: once begun, no move reaches the page; the card goes 33 px down, then back (fails before).
  • Unit: the banner's 60 pt pull-down (fails before).
  • Real touch, Chromium and WebKit: up 20 px, then down 100 px stretches the card to 0.55 × (80 − 14) and springs it back; with Reduce Motion, an opacity cross-fade.

Scope

  • This PR has one primary intent.
  • Independently removable deltas were removed or split.
  • Public text and artifacts contain no internal Meta context.

Size: +190 / −25 (tests 144). Toast's import (the CI's measurement): JS 93,254 → 93,267 B gzip; no CSS change.

Testing

@vercel

vercel Bot commented Oct 24, 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 Oct 29, 2026 10:27pm UTC

Request Review

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

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 31, 2026, 7:42 PM UTC

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval is on hold for maintainer spec direction: the pull-away stretch and its uncapped 0.55× rule have no governing spec yet, and the draft spec:AST-094 added here also proposes updating current records such as architecture:theme-tokens. A maintainer needs to provide or approve the governing spec for the stretch and settle those record updates, which an engineering owner can do by commenting /approve-spec 1df23fe27e1046cabaec0f6a172be9b3af133ccd (you can do this yourself if you are an engineering owner). Separately from that decision, please address:

  • A stretched card flicked back toward its edge is dismissed (packages/core/src/Toast/toastSwipe.ts:40), although the docs, the changeset and the test at toastSwipe.test.ts:78 say it always springs back.
  • The diff still carries the 19 predecessor pull requests (#8052–#8121): land them first and rebase so this one carries only its own commit.
  • packages/core/src/gestures/README.md:338 documents a utils/touchPresentation.ts module that does not exist, .changeset/toast-swipe-follows-banner.md:5 describes a velocity projection the code does not use, and the lint job ran out of memory on this head.

[Automated review]

Comment thread packages/core/src/Toast/toastSwipe.ts Outdated
* faster (UIKit's estimator keeps a stopped finger's last speed).
*/
export function isDismissRelease(offset: number, velocity: number): boolean {
return offset >= toast.dismissOffset || velocity >= toast.flickVelocity;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

A card stretched away from the edge still dismisses here when the finger flicks back toward the edge at 105 px/s or more: a top toast pulled 40 px down (card 14.3 px past rest) and flicked 20 px back up in 32 ms calls onHide('manual'). The doc comment above, useToastGesture.ts:28-30, the changeset and the test name all say a release there always springs back. Either gate the speed on the card being at or past rest (offset >= toast.dismissOffset || (offset >= 0 && velocity >= toast.flickVelocity)) or, if the banner dismisses in this case, correct those texts.

},
);

it('springs a card stretched away from the edge back, however it is released', () => {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This only tries velocities −400 and 0, so it passes while a flick back toward the edge (a positive velocity at a negative offset) dismisses. Adding expect(isDismissRelease(followOffset(-80), toast.flickVelocity)).toBe(false) makes the test prove what its name says.

## Touch presentation

Whether a component presents itself the touch (UIKit) way is answered once,
in `../utils/touchPresentation.ts`:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

../utils/touchPresentation.ts, TOUCH_QUERY, COMPACT_QUERY, COMPACT_TOUCH_QUERY, useTouchPresentation(), readTouchPresentation() and useMotionPresentation() do not exist at this head, and no test enforces the query spelling. Please drop this section or point it at what ships.

'@astryxdesign/core': patch
---

[fix] A Toast's swipe now follows iOS notification banners. The card stays still for the first 14 px of finger travel and then follows at 0.55 of the finger, with no jump. On release, the finger's travel projected with its velocity decides: a quick flick dismisses even when it barely moved the card, and a release short of dismissing springs the card back. A dismissed card leaves from where the finger left it and never moves back toward rest. The swipe no longer fades or shrinks the card. While the card springs back, touches pass through to the page.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The release does not project the travel with the velocity: isDismissRelease compares the card's offset with 15.7 px and the finger's speed toward the edge with 105 px/s (toastSwipe.ts:39-41). The changelog should describe those two thresholds.

follows.
- **FR7 — Exits animate as UIKit's do.** A touch presentation MUST play the
exit its UIKit counterpart plays. **Proposed; pending owner review:** this
departs from the draft `spec:AST-090` FR1 (exits off by default) and FR10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-090 is not in the repository at this head, so this proposed amendment (and the one at line 235) points at no record. Cite it once it lands, or drop the reference.

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

Toast (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 304B 304B 0B
Lines of Code 1382 1771 -
Complexity Very High Very High (165) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.2KB +294B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.1KB +242B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.2KB +303B 6.4KB 6.4KB 0B
core/Banner 47.8KB 48.1KB +289B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.6KB +251B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.6KB +297B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.5KB +273B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.2KB +290B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.5KB +316B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.9KB +270B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 56.0KB +264B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 56.0KB +264B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.8KB +264B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.1KB +273B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.6KB +255B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 46.1KB +265B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.2KB +273B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.3KB +244B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.8KB +278B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.2KB +281B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 56.1KB +318B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 78.0KB +275B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.8KB +280B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.1KB +243B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.6KB +266B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.3KB +248B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 49.1KB +280B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.2KB +249B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 73.0KB +278B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.4KB +284B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.7KB +287B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.5KB +275B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.3KB +270B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.4KB +262B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.6KB +273B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.6KB +273B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 90.8KB +27.5KB ⚠️ 10.1KB 10.2KB +140B
core/Lightbox 51.2KB 51.4KB +249B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.8KB +288B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.7KB +268B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.7KB +247B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.3KB +264B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.5KB +259B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.2KB +278B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.4KB +270B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 56.0KB +278B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.9KB +290B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 88.0KB +263B 15.3KB 15.3KB 0B
core/Popover 49.8KB 50.1KB +238B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.3KB +263B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.4KB +286B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.9KB +285B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 13.1KB +294B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.4KB +268B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.8KB +251B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.3KB +272B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.9KB +242B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 55.0KB +248B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.8KB +266B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.7KB +279B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.7KB +265B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.7KB +285B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.9KB +276B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.2KB +253B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 79.1KB +267B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.8KB +272B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.6KB +278B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.8KB +281B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.9KB +274B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 87.1KB +266B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB -1B 9.5KB 9.5KB 0B
core/Toast 59.8KB 87.1KB +27.2KB ⚠️ 9.7KB 9.8KB +92B
core/ToggleButton 44.1KB 44.4KB +243B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.9KB +289B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 65.1KB +306B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.1KB +277B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.4KB +231B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.4KB +268B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.8KB +258B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.8KB +274B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.7KB +268B 11.3KB 11.3KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

Component JavaScript CSS
core/LayerProvider +27.5KB ⚠️ +140B
core/Toast +27.2KB ⚠️ +92B

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB +87B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval is on hold for an engineering owner's spec decision: the pull-away stretch and its linear, uncapped 0.55× rule have no governing spec, and the draft spec:AST-094 this diff adds is unapproved. Any engineering owner, including you as the author if you are one, records that decision by commenting /approve-spec 92bf839c864b3da7f6bd8020cdf37d3f58bf9ae3, or asks for the stretch to wait until AST-094 is current on main. Separately from that decision, please address:

  • A stretched card moved back toward its edge at 105 px/s or more before the lift is dismissed (packages/core/src/Toast/toastSwipe.ts:40), although the description, the doc comments and the test at toastSwipe.test.ts:80 say it always springs back.
  • The stacked theme API adds a platform adaptation condition that spec:AST-012 FR2 keeps closed and --motion-* theme variables outside the token vocabulary, and astryx docs motion describes sheet, menu and navigation motion that no component plays yet.
  • The diff still carries the predecessor pull requests (#8052–#8121): land them first and rebase so this one carries only its own commit; the gestures README also documents a utils/touchPresentation.ts that does not exist.

[Automated review]

* is everything else. Pair `ios` with `pointer: 'coarse'` for a touch
* profile, such as touch motion tuned per platform.
*/
platform?: 'ios' | 'other';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

platform adds a field to the adaptation condition vocabulary that spec:AST-012 FR2 keeps closed ("Future environment fields require explicit additions to this closed vocabulary"), and nothing in this pull request amends FR2. It belongs with #8257 once an owner amends that requirement, not in this diff.

Comment thread packages/cli/assets/docs/motion.doc.mjs Outdated
content: [
{
type: 'prose',
text: 'On a touch screen, sheets, alerts, menus, navigation and scrolling play the springs, durations and curves measured from iOS. Each value is a motion role named by its table path, such as `springs.sheetPresent` or `timing.curves.easeInOut`. A theme retunes a role through `motion.springs`, `motion.durations` or `motion.curves`, at its root or in an adaptation rule; a role it leaves alone keeps its measured default.',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At this head the only component that imports the motion layer is Toast, and the only role it plays is toast.settle. No sheet, alert, menu, navigation or scroll component plays these values yet, so a theme that retunes springs.sheetPresent or springs.navigationPush as the example below does sees no change. Describe what ships, or land this page with the components that read those roles.

Comment thread packages/core/src/motion/roles.ts Outdated
* spring, a duration (a key ending in `Ms`, in milliseconds) or a curve (four
* cubic-bézier control points). It is named by its table path, for example
* `springs.sheetDetent`, `timing.curves.easeInOut` or `sheet.present`, and
* carried by one CSS custom property, `--motion-` followed by the path in

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The --motion-* variables a theme writes originate here and in the motion tables, while architecture:theme-tokens INV1 says "A core token name and its default originate in tokens.stylex.ts; projections do not introduce names." The draft spec:AST-094 FR4 in this same diff also says touch physics are not themable. One of them has to change, under an owner ruling, before this API lands.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval is on hold for an engineering owner's spec decision: the pull-away stretch and its linear, uncapped 0.55× rule have no governing spec, and the draft spec:AST-094 this diff adds is unapproved. Any engineering owner, including you as the author if you are one, records that decision by commenting /approve-spec <full head SHA>, or asks for the stretch to wait until AST-094 is current on main. Separately from that decision, please address:

  • A stretched card moved back toward its edge at 105 px/s or more before the lift is still dismissed (packages/core/src/Toast/toastSwipe.ts:43), although the description, the doc comments and the test name at toastSwipe.test.ts:86 say it always springs back.
  • Under Reduce Motion the release still springs and every iOS dismissal still slides (useToastBannerSwipe.ts:103, asserted by the new browser test), which the current reduced-motion design record rules out: a transition a touch release starts cross-fades in 200 ms or less.
  • The stack's compact-touch resolver hard-codes 744 px (utils/touchPresentation.ts:75-79) where current spec:AST-012 FR9 uses the theme's md point or a height below 500, and the iOS swipe adds about 24 KB gzip of touch-only JavaScript to every Toast import without lazy loading or a stated justification.
  • The diff still carries the predecessor pull requests (#8052–#8121), including theme API that contradicts spec:AST-012 FR2 and architecture:theme-tokens INV1: land them first and rebase so this one carries only its own commit.

[Automated review]

) => boolean;
}

const RELEASE_OPTIONS = {reducedMotion: 'keep'} as const;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

reducedMotion: 'keep' makes the stretched card's spring-back (:205-209) and every iOS retract (:246-256) travel under Reduce Motion. The current reduced-motion design record asks a transition started by a touch release to change opacity only and finish within 200 ms, with a leaving element fading out where it is (DR2), and rules out keeping springs (DR4); spec:AST-057 FR5 already does this for a swiped row. Under reduced motion, bring the released card to rest with no travel and a short cross-fade, and fade a dismissed card out in place.

expect(await ownSwipe(card)).toEqual({y: 0, scale: 1, opacity: 1});
});

test('under Reduce Motion a turn-back still stretches the card and springs it back', async ({

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This test asserts the spring under Reduce Motion (50 ms after the lift the card is still more than 70% out), the behavior the current reduced-motion design record forbids for a transition a touch release starts. Once the release cross-fades, assert an opacity-only animation of 200 ms or less instead.


/** Both: presentations such as a sheet in place of a popover. */
export const COMPACT_TOUCH_QUERY =
'(width < 744px) and (pointer: coarse), (height < 500px) and (pointer: coarse)';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Current spec:AST-012 FR9 makes a screen compact "while its viewport width is below the effective md point (FR1) or its viewport height is below 500", names the web touch presentation resolver, and says it keeps no size numbers of its own; md is 768 unless a theme overrides it. With 744 here, a coarse-pointer screen 744 to 767 px wide, such as an iPad mini in portrait, gets the popover where FR9 gives it the sheet. Derive the width edge from the theme's effective md point and update touchPresentation.test.ts:328 and the changeset.

import {themeProps} from '../utils/themeProps';
import {useTouchIdiom} from '../utils/touchPresentation';
import {useTranslator} from '../i18n';
import {useToastBannerSwipe} from './useToastBannerSwipe';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This static import carries the iOS swipe's gesture system and animator into every Toast import: about 24 KB gzip bundled with React external, for code that runs only in the iOS touch idiom. Current architecture:component-style-authoring INV6 flags touch-only work over 2 KB gzip and asks for a lazy load when a coarse pointer needs it, or a stated justification.

@vjeux
vjeux force-pushed the uikit/c25-toast-pull-away branch from e17fbc1 to 4880102 Compare October 25, 2026 00:17
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval is on hold for an engineering owner's spec decision: the turn-back stretch and its linear, uncapped 0.55× rule have no governing spec, and the draft spec:AST-094 this diff adds is unapproved. Any engineering owner, including you as the author if you are one, records that decision by commenting /approve-spec <full head SHA> on this pull request, or asks for the stretch to wait until AST-094 is current on main. Separately from that decision, please address:

  • Every Toast import grows by about 26 KB gzip because Toast.tsx:55 imports the touch layer statically, with no lazy load or stated justification, while the changeset says that code is not loaded with a fine pointer.
  • The stacked theme API (the platform adaptation condition and the --motion-* roles) contradicts spec:AST-012 FR2 and architecture:theme-tokens INV1, and astryx docs motion and a changeset describe roles that no component plays or that do not exist.
  • The diff still carries #8121 and its predecessors: land them first and rebase so this pull request carries only its own commit.

[Automated review]

'@astryxdesign/cli': patch
---

[fix] Under a finger (a coarse primary pointer, on every touch device, iOS and Android alike), a Toast's swipe now follows iOS notification banners. The card stays still for the first 14 px of finger travel and then follows at 0.55 of the finger, with no jump. On release, a quick flick toward the edge dismisses even when it barely moved the card, as does a drag that leaves the card far enough out; anything else springs the card back. However a toast is dismissed (a swipe, the close button, the timeout), the card leaves as the banner does: it slides past its edge from where it is, without fading, and then the toast is dismissed. The swipe no longer fades or shrinks the card. While the card springs back or leaves, touches pass through to the page. A theme retunes the spring-back and the exit through the `toast.settle`, `toast.exitMs` and `toast.exitCurve` motion roles, which `astryx docs motion` now lists. With a fine pointer the swipe and exit stay as they were, and the swipe's code is not loaded. Under reduced motion nothing slides, springs or drifts: on a touch screen the toast fades in place, and with a mouse or keyboard it changes at once.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This says the swipe's code is not loaded with a fine pointer, but Toast.tsx:55 imports useToastBannerSwipe statically, so every Toast import carries the gesture system and the animator whatever the pointer: 42,409 bytes gzip on main, 68,338 at this head (one esbuild bundle of packages/core/src/Toast/index.ts, bare imports external). architecture:component-style-authoring INV6 asks for a lazy load under a coarse pointer or a stated justification; either load it lazily, or drop this sentence and justify the cost.

Comment thread .changeset/touch-motion-theme-roles.md Outdated
'@astryxdesign/cli': patch
---

[feat] Themes can retune touch motion. `defineTheme({motion})` takes `springs`, `durations` and `curves` keyed by motion role, the table path of a value touch presentations play (`springs.sheetPresent`, `timing.reducedMotionCrossFadeMs`), at the root or in an adaptation rule. A role the theme leaves out keeps its measured default, and the duration scale (`fast`, `medium`, `ratio`) is optional when a theme sets only roles. Adaptation rules gain a `platform` condition, `ios` or `other`. `astryx docs motion` lists every motion role with its CSS variable and default, and the theme authoring guide and template describe the new fields.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

timing.reducedMotionCrossFadeMs is not a role at this head: motion/uikit/timing.ts:158 excludes it, as design:reduced-motion DR4 requires (no theme value may lengthen the Reduce Motion fade). Name a role a theme can set and something plays, such as toast.settle.

Comment thread packages/core/src/theme/defineTheme.ts Outdated
@@ -247,9 +255,15 @@ export interface DefineThemeInput {
* // Snappy: { fast: 100, medium: 250, ratio: 0.75 }
* // Default: { fast: 175, medium: 410, slow: 975, ratio: 0.75 }
* // Cinematic: { fast: 200, medium: 500, slow: 1200, ratio: 0.7 }
*
* // A softer sheet and a slower reduced-motion fade:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

navigation.transitionMs is not the Reduce Motion fade (that length is excluded from the roles), and no component reads it at this head, so this example retunes nothing. Show a role that has a consumer, or keep the example until a navigation component plays it.

Comment thread packages/core/src/gestures/README.md Outdated
is right. Behaviour reads
`useTouchPresentation()` (SSR-safe), a decision taken once reads
`readTouchPresentation()`, and a component with no interaction to infer
from reads `useMotionPresentation()`: UIKit timings under a finger, theme

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

useMotionPresentation() does not exist at this head; the rest of this section now matches utils/touchPresentation.ts. Drop the sentence or point it at what ships.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval is on hold for an engineering owner's spec decision: the turn-back stretch, its linear and uncapped 0.55× rule, and the draft spec:AST-094 requirements this diff adds have no current authority. Any engineering owner, including you as the author if you are one, records that decision by commenting /approve-spec <full head SHA> on this pull request, or says the stretch should wait until AST-094 is current on main. Separately from that decision, please address:

  • Every Toast import grows by about 28 KB gzip because Toast.tsx:55 imports the touch layer statically, while the changeset says that code is not loaded with a fine pointer; load it lazily or justify the cost.
  • The theme motion roles contradict architecture:theme-tokens INV1 and the draft's own FR4; the theme template documents a platform axis that no longer exists, and the template and motion docs retune roles no component plays.
  • A flick that rests more than 40 ms before the lift now springs back, although toastSwipe.ts and the Toast table describe UIKit's filter keeping the last speed; the code also cites spec:AST-100, spec:AST-090 and an AST-094 OQ4 that do not exist.
  • The diff still carries #8121 and its predecessors (37,915 authored lines): land them first and rebase so this pull request carries only its own commit.

[Automated review]

import {useTouchPresentation} from '../utils/touchPresentation';
import {reducedMotionFadeConsts} from '../motion/reducedMotion.stylex';
import {useTranslator} from '../i18n';
import {useToastBannerSwipe} from './useToastBannerSwipe';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This static import brings the gesture host, arena, recognizers and compositor animator into every Toast import: one esbuild bundle of Toast/index.ts goes from 34,861 to 63,342 bytes gzip (npm packages external). That code runs only under a coarse pointer, so architecture:component-style-authoring INV6 asks for a lazy load or a stated justification, and .changeset/toast-swipe-follows-banner.md currently says the swipe's code is not loaded with a fine pointer.

Comment thread packages/core/src/Toast/toastSwipe.ts Outdated
Comment on lines +38 to +41
* Whether a release dismisses: the card is at least `toast.dismissOffset`
* out, or it is at or past rest toward the edge and the finger was moving
* toward the edge at `toast.flickVelocity` or faster (UIKit's estimator keeps
* a stopped finger's last speed). A card stretched away from the edge always

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At this head the pan's release velocity is not UIKit's 'keeps a stopped finger's last speed': VelocityTracker reads 0 when the contact was still for more than 40 ms before the lift (gestures/VelocityTracker.ts:124-128). A short flick that rests 40 to 150 ms before lifting now springs back, while the banner measurement in motion/uikit/toast.ts:92-96 dismisses it. Either keep the iOS blend for this pan or update this comment, the table's source note and draft FR17.

Comment thread packages/core/src/motion/roles.ts Outdated
Comment on lines +17 to +18
* carried by one CSS custom property, `--motion-` followed by the path in
* kebab case (`--motion-springs-sheet-detent`). A theme writes that property

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

These --motion-<path> names and their defaults originate in the motion tables, while architecture:theme-tokens INV1 says "A core token name and its default originate in tokens.stylex.ts; projections do not introduce names." The draft spec:AST-094 FR4 in this diff also says touch motion is not themable. This needs an owner-amended INV1 before it ships, or it should leave this pull request.

Comment thread packages/cli/assets/theme.template.ts Outdated
* `from` includes its point; `below` excludes it. The other supported axes
* are primary-pointer precision, contrast preference, and motion preference.
* are primary-pointer precision, contrast preference, motion preference, and
* platform (`ios` for the browsers of iPhone and iPad, `other` for the rest).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

themeAdaptations.ts accepts no platform field at this head (the condition was removed in this stack), so this sentence documents an axis a theme cannot use.

Comment thread scripts/sync-exports.js Outdated
@@ -177,6 +190,13 @@ const STATIC_EXPORTS = {
types: './dist/utils/interactionOverlay.stylex.d.ts',
default: './dist/utils/interactionOverlay.stylex.js',
},
// Proposed; pending owner review (spec:AST-094 OQ4): the Reduce Motion

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The draft spec:AST-094 has only OQ1 and OQ2, so this cites an open question that does not exist; and since ./motion/reducedMotion.stylex is not under an /experimental subpath, spec:AST-017 FR21 does not exempt it from the stable promise.

and MUST keep advancing at display rate through a main-thread block. It MUST
NOT animate layout properties, and MUST NOT step a frame from script when the
compositor can run the curve.
- **FR6 — Motion is interruptible.** A finger MUST be able to catch any

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The Toast this pull request ships lets touches pass through a card that is settling back or leaving (useToastBannerSwipe.ts:56-57, :167-177), so FR6 as written does not describe it. One of the two needs to change before an owner approves this record.

vjeux added 25 commits October 28, 2026 17:39
…llowance under every primary pointer

The useMenuPress record's FR9 puts the trigger's held finger under
spec:AST-094 FR29 under every primary pointer (FR43), so a finger on a
touchscreen laptop may drift 13 pt before the open, as on a phone. The
trigger read (pointer: coarse) as its press started and took the long
press's 10 px where the pointer was fine. Three cases fail until it does
not: a 12 pt drift opens under a fine pointer too, a (12, 12) settle
opens there, and nothing reads a pointer query, the trigger's press
included.
…lowance under every primary pointer

The useMenuPress record's FR9 governs the trigger's held finger by
spec:AST-094 FR29 under every primary pointer (FR43). The trigger now
hands the long press FR29's 13 px drift allowance whatever the primary
pointer, so it no longer reads (pointer: coarse) as its press starts, and
the menus drop their coarsePointer import. ContextMenu keeps the long
press's own allowable movement. The changeset says the same.
Strict ESLint reported six unused bindings in files this pull request
carries: the host's HAPTIC_SWITCH_ATTRIBUTE import, two unused imports
in the pan's tests (scrollProbe, ScreenEdgePanGestureRecognizer), the
swipe test's drift, the presented-hit-testing test's gestures, and a
GestureHost test's before, which now asserts what it was read for: a
second finger's moves leave the pan where it was.
…eal angular speed

The release velocity of a rotation whose listener sets rotation = 0 on
each change, at 2 degrees every 16 ms, read 4.363 rad/s against the
2.182 rad/s of the same stream without a re-base: the test asserted only
more than 1.5. It now asserts the 2.18 rad/s (spec:AST-100 FR2), and
fails.
The rotation's velocity tracker samples the raw unwrapped angle, which
setting rotation does not move, so the setter's shift of the samples read
each re-base as extra turn and doubled the release velocity of a
listener that re-bases on every change. The setter no longer touches the
tracker.
…mates while it runs

The proof read the element's animations 230 ms in, after the dip had
ended, and asserted only that every animated key is opacity, which an
empty list passes: with the cross-fade removed from the plan (the move
still landing), the proof still passed. It now reads the keyframe keys
right after the call starts and asserts they include opacity and nothing
else; the same mutant fails it. Chromium and WebKit pass. (F1's in-flight
read from c648034.)
…roller, and its claimed moves are cancelled under pointer events

Two comparisons stop at the shadow boundary, each failing a case:
- once the host's listener on a recognizer's inner node has seen the
  finger, isFingerDownIn reads it as outside a light-DOM scroller around
  that root, so a scroll under it is not the finger's (FR20);
- under inputMode 'pointer-events', a claimed pan on a shadow host
  cancels none of its finger's moves over the inner content, since the
  finger's target is the inner node and its touches reach the host
  retargeted (FR19).
…the flat tree

isFingerDownIn and the pointer-events finger match compare with
containsAlongFlatTree, as the scroll watch already does: a finger on
content inside an open shadow root is down in the scroller around that
root, and its touches, retargeted to the shadow host, match its pointer
finger, so a claimed pan cancels its moves there (spec:AST-094 FR19,
FR20).
…achments asks, and only then

The host let the last attachment decide whether an element is an action
group (useGestureRecognizer always passes the option), and never
recomputed it at a detach: a plain attachment after the group's turned
the group off, and a group's attachment released left a recognizer that
never asked taking presses under a fine pointer. Fails until the host
counts the attachments that ask.
…ents asks

The host counts the attachments that pass actionGroup: true and keeps the
element a group while one remains, recomputed at each detach. An
attachment that passes false, as useGestureRecognizer does by default,
no longer turns a group off, and a group's last asking attachment taking
its leave ends the group.
… that content

The presented hit test takes the document's elementFromPoint, which
answers a shadow host for anything inside its open root, and compares
with Node.contains, which stops at the boundary: a recognizer on a
control inside a moving sheet's shadow root gets no finger, and the tap's
click goes to the host. Fails until the hit test descends into open roots
and compares along the flat tree.
Where a moving element is drawn away from its layout box, the host
hit-tests what is drawn under the finger with the document's
elementFromPoint, which answers a shadow host for anything inside its
open root. The hit test now descends through each open root's own
elementFromPoint and compares with the movers along the flat tree, so a
recognizer on a control inside a moving sheet's shadow root gets its
finger and the tap clicks that control.
…nt lets go

The host's touch-action rules sit in an adopted sheet or a style element
per document or shadow root, and were never removed, so a page whose
last recognizer detached kept them, against spec:AST-094 FR24 (nothing
touch-related remains after the last instance unmounts). Fails until a
root's rules go with its last marked element.
…th its last marked element

The touch-action writer records which elements it marked in each
document or shadow root, and when the last one is unmarked (its last
recognizer detached) it removes that root's adopted sheet or style
element, so nothing touch-related remains after the last instance
unmounts (spec:AST-094 FR24). A later mark writes the rules again; an
element marked in another root first lets go of the old one.
… the inline style it reads

- The motion registry, the host's engine gate and the README name the
  presented hit test as an engine workaround (spec:AST-013 FR6) with its
  review condition (re-measure on each iOS release; remove it once iOS
  WebKit hit-tests a compositor-moved element where it is drawn) and its
  regression fixture.
- While a curve runs the animator holds the value it starts from inline,
  so presentation.ts and the README no longer say the inline style holds
  the end.
…core/internal/touch

Core ships the internal entry @astryxdesign/core/internal/touch, which
re-exports the gesture primitives for Astryx's own packages, and the
Lab-import guard fails a Lab import of core outside core's exports
(architecture:react-component-runtime INV13). The README and the barrel's
header named internal workspace imports and said nothing here is
exported; they now name that entry.
…ill needs the element, and the listeners that cancel

The release note, the stream's header, the host's comment and the README
said the stream is one passive listener per event type and that a
document-capture stopPropagation no longer starves the recognizers. Such a
stop never hid a listener on the same node, and some subscriptions cancel.
They now say what changed: an app's window-capture stopPropagation, or a
document-capture stopImmediatePropagation registered before core, no
longer hides a touch; a recognizer that must claim still needs the touch to
reach its element; the gesture host's touchend, click and contextmenu
cancel while a claimer is attached and the page hold's touchmove while it
holds; and the stream stays ahead of an app's window-capture listener only
until a type's listener is re-added. The README's list of blocking
touchmove listeners gains the claimed touch's target and the document
while a claiming element moves.
…default it moves

The {stylexOptions} form of astryxStylex now passes StyleX
treeshakeCompensation: true unless the caller sets it. spec:AST-017 FR3
asks the release note to name the old and new default and the option
that restores the old one; it now does.
…er and for the two stops the input stream fixes

- A still finger with sub-pixel jitter over a scroll view keeps its tap
  and scrolls nothing (spec:AST-094 FR18–FR22).
- A tap is still recognized under an app's window-capture
  stopPropagation, and under a document-capture
  stopImmediatePropagation registered before core's: the recognizers hear
  touches on the window's capture phase.
Chromium and WebKit pass.
…s once

Where nothing that claims is attached, the host's touchend listener is
passive and cannot cancel the engine's own click after a retargeted tap
clicks what is drawn. The shared click guard swallows that late click
whatever is attached; this case pins it, as asked on meta#8293.
…esture host's subscriptions

The gesture host subscribes no click: the one cancelling click subscriber
is the click guard's, added at a window's first arm and kept. The release
note, the stream's header and the gestures README listed click with the
host's touchend and contextmenu; they now name the guard's own.
Toast.spec.md records what this branch ships: the `presentation` concept
(`adaptive` by default, `toast`, `notification`), the notification swipe
in FR4 and its retract in FR5, the released default it changes under a
finger, and the current-state bullets and gap text the notification
presentation closes (a release moving back springs back, the settle starts
at the release velocity, and reduced motion fades on a touch screen). The
toast presentation keeps its listed gaps: net travel, a theme-timed settle,
a second touch that cancels, and no projection.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:31

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision: no current spec states the turn-back stretch or its uncapped 0.55 ratio (spec:AST-094 FR3 asks a drag past an edge to resist with a rubber band, and FR2 wants a dated owner decision to go beyond the 70 pt the banner was measured to), and this head also rewrites the current component:Toast record (FR4, FR5 and the new Presentation concept). Any engineering owner, including you as the author if you are one, can record that decision by commenting /approve-spec <full head SHA> on this pull request, or by saying which part should wait. Whatever is decided, these need fixing:

  • Make FR4 in packages/core/src/Toast/Toast.spec.md match the code: it still says a fast flick toward the edge dismisses, while toastSwipe.ts:54 keeps a stretched card, and it never mentions the stretch.
  • Land or drop the 17 open pull requests this branch carries (32,062 authored lines, of which this change is 215), then update the branch from main.
  • Back “on every touch device” in .changeset/toast-swipe-pull-away.md with real-device Mobile Safari and Chrome for Android evidence, or narrow the wording to a swipe that already holds the touch.

[Automated review]

| FR1 | A card carries `toast` with `type` and shows `body` and, on its first line, `endContent` then a dismiss Button named by `@astryx.toast.dismiss`; long body text wraps below. `renderContent` replaces that layout, receives `body`, `endContent`, `type`, timing, and a `dismiss` function, and gets no injected dismiss control. | Current source and tests |
| FR2 | With auto-hide on (the default for `info`, off for `error`), the card dismisses with reason `auto` after `autoHideDuration` ms. The timer pauses while the pointer is over the card, focus is inside it, a touch or pen gesture is active, or the window is blurred, and resumes with the remaining time (at least 1 s). Implementation gaps: the pause is one flag, so any pause condition ending resumes the timer while another still holds, and a toast raised while the window is already blurred starts its timer (Current-state impact). | Current source and tests |
| FR3 | The dismiss button, a swipe, a `dismiss` call, or the returned dismiss function dismiss with reason `manual`; `onHide` fires at most once, when the toast is dismissed, even when dismissed twice during its exit. Implementation gap: a toast dismissed before it first renders, through its returned dismiss function in the handler that showed it, never reports `onHide` and lingers in a provider-hosted viewport; with no provider above the caller, a dismissal called before the fallback viewport mounts does nothing, so the toast shows and stays unless it auto-hides (Current-state impact). A toast replaced through `uniqueID` is not dismissed and reports no `onHide`. | Current source and tests |
| FR4 | A drag toward the position's block edge, from any pointer (`spec:AST-094` FR43), decides once, at release, per `spec:AST-094` FR36–FR37: projected travel past the commit point dismisses, and a release moving back toward the start cancels. In the notification presentation the card stays still for the first `toast.followFrom` px of travel and then follows at `toast.followRatio` of the finger, and a release dismisses when the card is `toast.dismissOffset` out or the finger lifts moving toward the edge at `toast.flickVelocity` or faster, the notification banner's measured values; in the toast presentation the card follows the finger 1:1. A short drag snaps back; horizontal intent or a gesture starting on an interactive descendant does not dismiss; a second touch before the swipe begins leaves the page its pinch, and one after it begins leaves it going (`spec:AST-094` FR10). Native page scrolling continues until touch intent matches the dismiss edge. In the default layout the visible dismiss button stays as a non-gesture alternative; custom content supplies its own. Implementation gaps: the toast presentation dismisses on net travel past a distance threshold or a flick, even after the finger moves back, and a second touch cancels its swipe; neither presentation projects travel; and only touch and pen drags are recognized, not a mouse (Current-state impact). | Current source and tests |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

FR4 says a release dismisses when the finger lifts moving toward the edge at toast.flickVelocity or faster, but at this head isDismissRelease keeps a card stretched away from the edge on that flick (toastSwipe.ts:54), and the card follows a turn-back away from the edge (toastSwipe.ts:29-35), which FR4 never mentions. Please state the stretch and the at-or-past-rest flick condition here at the head owners approve, or drop the stretch.

if (past <= 0) {
return 0;
}
return Math.sign(fingerTravel) * toast.followRatio * past;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This keeps the 0.55 follow linear with no bound, past the 70 pt the banner was measured to (motion/uikit/toast.ts:63-65): a 300 px reversal holds the card about 157 px below rest. spec:AST-094 FR3 asks a drag past an edge to resist with UIKit's rubber band, and FR2 lets an owner decision depart from a measurement only by naming its date and that measurement, so this waits on an engineering owner's decision.

'@astryxdesign/core': patch
---

[fix] Under a finger (a coarse primary pointer, on every touch device), a Toast swipe that turns back away from the toast's edge now stretches the card the same way, at about half the finger's travel past the first 14 px, and springs it back on release, as iOS notification banners do; a release there never dismisses, however fast the finger flicks back toward the edge. Before, once the swipe had the touch, such a drag moved neither the card nor the page. With a fine pointer nothing changes.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

“On every touch device” is broader than the evidence: the description's Mobile Safari simulator run of this stroke shows the browser taking the touch at 10 pt and the card never moving, and spec:AST-094 Platform support asks for real-device evidence for iOS Safari and Android Chrome claims. Please add that evidence or narrow the wording to a swipe that already holds the touch.

This branch was successfully deployed

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

Labels

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