Repository navigation
Conversation
… is down off the sheet (spec:AST-094 FR10) The lone-finger hold counts only the fingers the pan tracks, so a second finger on plain page content left the sheet's finger held, and the moves of a pinch across the sheet's edge were cancelled. This test fails until the host counts every finger on the screen.
…is down anywhere (spec:AST-094 FR10) The lone-finger hold counted only the fingers the pan tracks, so a second finger on plain page content left the sheet's finger held, and a pinch across the sheet's edge had its moves cancelled. The host now applies a recognizer's hold only while the move's event reports one finger on the screen; the pan's own count still covers two fingers on the sheet.
An attach reads the element's own will-change in a task of its own. A shared animator (animatorFor) is never detached, so its node can leave the document with that read still waiting, and the read then forces a style pass on a node with no style: a test run that mounts and unmounts many pagers piled up such reads until a later wait timed out. The read now skips a node out of the document; a promotion that needs it reads it then, as one on a node attached in the same task does. A detach and dispose already cancel it. The new test fails on the previous code (one read of a removed node); the in-task read test now puts its element in the document, where the read happens.
…ter the browser takes the touch A host that stopped feeding the finger at the takeover and still delivered the lift would have passed. Each transition now records the list's scrollTop, and the test expects a 'changed' while the list is scrolled (spec:AST-094 FR20: it follows the scroll to the lift).
…keover) into the host line
…of the document) into meta#8270
…sture system (spec:AST-094 FR24, FR43) utils/pressFeedback.ts reaches gestures/coarsePointer.ts, so a page whose only touch work is press feedback carries a gesture module, and a bundle check that counts gestures/ code finds it in the root and hooks entries. The coarse-pointer query belongs with the environment queries. This test walks the controller's import graph and fails until it reaches no module under gestures/.
…ries in utils/ (spec:AST-094 FR43) gestures/coarsePointer.ts becomes utils/coarsePointer.ts, beside utils/touchQueries.ts, with its test; the gesture host's selection lock, the press controller and the pointer test helper import it from there. The press controller's import graph now reaches no module under gestures/, so a page whose only touch work is press feedback carries none of the gesture system. No behavior changes.
CI's lint rejected the three Array<T> types the previous commit added (@typescript-eslint/array-type); the test now names its record once (WatchTransition) and reuses it.
…e arena's reset The arena resets a recognizer to possible after it ends, as UIKit does, and the transition listener records that too, so the last transition is possible: the test now asserts the ended-then-possible tail.
…nter query in utils/) into meta#8356 # Conflicts: # packages/core/src/gestures/GestureHost.ts # packages/core/src/gestures/fingerScroll.ts # packages/core/src/gestures/pageHold.ts # packages/core/src/gestures/selectionLock.ts # packages/core/src/utils/pressFeedback.ts
… FR19, FR24) Under a fine primary pointer: each element that uses a gesture keeps one passive pointerdown listener and the page none while idle; a mouse or a pen pans, its page listeners lasting only the press; a press consumer takes a mouse press with no feedback-only mode (DEC-21); a pan writes its touch-action for a touchscreen laptop's finger (FR18); perEventPointer is taken as any attach, with no warning; a secondary button starts nothing. All but the last fail until the host attaches for every pointer.
…nues the release spec:AST-094 FR37: a release whose velocity points back toward rest springs the card back, however far out it is. FR38: after a dismissing release the retract starts at the card's release velocity; a release faster than the curve can start carries the card out sooner. architecture:component-style-authoring INV6: the touch module imports the settle row alone. design:reduced-motion DR2: under reduced motion on a touch screen, a toast-presentation card fades out before its row closes. architecture:react-component-runtime INV3: the mount-flag Effect is gone; the two-frame check reads whether the card is still in the document. The follow test reads long tasks only in Chromium: the harness's long-task log refuses to answer in WebKit, which has no Long Tasks API.
# Conflicts: # packages/core/src/Toast/__tests__/ToastSwipe.interaction.browser.spec.ts # packages/core/src/Toast/toastSwipe.test.ts # packages/core/src/Toast/toastSwipe.ts
… the scroll brake for a finger only (spec:AST-094 FR11, DEC-21) A mouse or a pen press paints at once, inside a scroller too; a mouse press on a scroller a flick set moving still presses, as the brake is a finger's. The brake case fails until the tracker brakes only a touch.
… (spec:AST-094 FR43) A drag from the edge band begins a screen-edge pan for a finger only, unless the caller allows another pointer. The mouse and pen case fails until the recognizer defaults to touches.
… lift and the browser's menu, keeps a kept press's finger, and goes when the page hides From the review of this pull request, three cases fail on its head: - an armed press installed the page listeners without the claiming ones, so a claimed finger's touchend stayed passive and the browser's menu opened during a claimed long press (spec:AST-094 FR21); - a kept press got its blocking touchmove during an armed press, but its moves were cancelled only where the primary pointer is coarse, so a held stepper on a touchscreen laptop lost its finger (FR11, DEC-21); - a page hidden mid-press cancelled the press but kept the page's listeners until the next lift anywhere (FR24).
…lift and the browser's menu, keeps a kept press's finger, and goes when the page hides - A finger's or a pen's armed press now brings the claiming listeners (the cancelable touchend and the contextmenu canceller) with the page listeners, as wherever the host installs, so a claimed lift clicks nothing and a claimed hold opens no browser menu (spec:AST-094 FR21). A mouse's press needs neither and adds neither. - A kept press keeps its finger under any pointer: its target blocks and its moves are cancelled once its press is delivered, not only where the primary pointer is coarse (FR11, DEC-21). - A page hidden mid-press releases the armed press as a blur does, so the page's listeners go with the cancelled press (FR24).
…'s selection An action group's press is a long press with no minimum duration, so it claims at the press's pointerdown, before any movement. The drag selection hold then cleared the page's selection, so a plain click on a group's button left its Copy or Cut with nothing to act on. The case fails on this head: the selection is gone after the pointerdown.
…age's selection The drag selection hold cleared the page's selection when any mouse or pen contact was claimed, but an action group's press claims at its pointerdown, before it has moved or selected anything, so a plain click on a group's button left its Copy or Cut with nothing to act on. A claim before any movement now keeps the page's selection: the hold still refuses a new one, and puts the page's back over a selection that appears while it runs. A claim after movement clears what its drag selected, as before (spec:AST-094 FR41). The case before the new one now waits for its hold to end a task after the lift, so no hold outlives that test.
…t every pointer does - GestureHost's header, the gestures README and coarsePointer.ts no longer describe the coarse-only host: a finger or a pen takes the touch-down lock under any primary pointer, a kept press's finger is kept during a fine pointer's press too, and recognizers attach for every pointer while the page listeners last a press (spec:AST-094 FR19, FR24, FR41, FR43). - The fine-pointer selection case asserted the replaced rule and passed only because it read iOS WebKit's inline lock without iOS WebKit: it now asserts the lock a fine pointer's finger and pen take, and that a mouse takes none. - FR41's sentence and its verification row say that a press claimed at its own pointerdown, before it moves, keeps the page's selection, while a drag that moved before its claim loses what it selected.
…ion, in the present tense The sentence said a drag that moved before its claim loses the selection it started, but the hold clears the page's selection then, whatever made it; and an unclaimed mouse drag kept "today's" behavior, a phrase that ages. It now says a claim after movement clears the page's selection, a press claimed at its own pointerdown keeps it, and an unclaimed mouse drag keeps its released behavior.
meta#8665's review fixes: an armed press under a fine pointer brings the claiming listeners, keeps a kept press's finger and goes when the page hides; a press claimed at its own pointerdown keeps the page's selection; FR41 says what a claimed drag does with the selection; meta#8360's input-stream notes. The merge is clean.
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.
Toast.spec.md records what this branch adds: a mouse drag, a wheel and a trackpad scroll swipe a toast in both presentations (FR4, with the page keeping a scroll it can still take and a claimed drag holding off text selection), a second touch never ends a swipe that began, and only a finger's release is a touch release under reduced motion. The current-state bullet on the mouse goes; the toast presentation keeps its listed gaps (net travel, a theme-timed settle, no projection, and a reduced-motion fade that follows the primary pointer).
There was a problem hiding this comment.
Approval of this pull request waits on an engineering owner's decision. This head writes new rules that main does not state into spec:AST-094 FR41 (a mouse or pen drag a gesture claims clears the page's text selection) and into Toast's record (the presentation concept and the FR4 and FR5 rewrites). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Separately, please rebase as #8076, #8121, #8144, #8360, #8665, #8666 and #8676 land, or retarget onto the immediate predecessor's branch, so that the diff shows only this pull request's nine Toast files instead of 37,002 changed lines.
[Automated review]
| acts as a finger's; a mouse makes the context request by a right click, not | ||
| a long press (FR43), and otherwise keeps its released behavior | ||
| (`spec:AST-017` FR59; DEC-9). | ||
| (`spec:AST-017` FR59; DEC-9). A mouse or pen drag that a recognizer claims |
There was a problem hiding this comment.
This adds normative text that FR41 on main does not state: there a mouse "otherwise keeps its released behavior", and the verification row fails any change to mouse selection. It needs an engineering owner's approval for this head (/approve-spec <full head SHA>), or it can stay in #8665, where it originates.
|
|
||
| - Released default preserved: `yes` | ||
| - Compatibility class: records shipped behavior; no public change | ||
| - Released default preserved: `no`: under a finger the default `adaptive` |
There was a problem hiding this comment.
This changes Toast's current record. The presentation concept, the FR4 and FR5 rewrites, and this released-default change need an engineering owner's approval for this head before they govern.
55fe123 to
0e4fe36
Compare
…r, and every pointer swipes
Toast takes `presentation` ('adaptive' by default, 'toast', 'notification').
Under a finger the swipe and the exit follow the iOS notification banner
(values and sources in motion/uikit/toast.ts): the card follows past a
first distance at a ratio, a release decides on the card's offset or the
finger's speed at the lift, a release moving back springs back, a drag that
turns back stretches the card and springs it back, and every dismissal
retracts the card past its edge. Toast's own swipe (a fine pointer, or
`presentation="toast"`) runs on the shared pan for every pointer, a finger,
a pen and a mouse, with a flick at any travel read from the shared release
filter at the lift. Toast.spec.md records the Presentation concept, FR4,
FR5 and the gaps that remain.
One solution from four pull requests: meta#8121 (the banner swipe and
`presentation`), meta#8144 (the turn-back stretch), meta#8678 (every pointer on the
shared pan) and meta#8047 (a flick at any height). Left out, since no spec
decides them yet: the wheel and trackpad swipe, and the text-selection hold
during a mouse or pen drag.
…r, and every pointer swipes
Toast takes `presentation` ('adaptive' by default, 'toast', 'notification').
Under a finger the swipe and the exit follow the iOS notification banner
(values and sources in motion/uikit/toast.ts): the card follows past a
first distance at a ratio, a release decides on the card's offset or the
finger's speed at the lift, a release moving back springs back, a drag that
turns back stretches the card and springs it back, and every dismissal
retracts the card past its edge. Toast's own swipe (a fine pointer, or
`presentation="toast"`) runs on the shared pan for every pointer, a finger,
a pen and a mouse, with a flick at any travel read from the shared release
filter at the lift. Toast.spec.md records the Presentation concept, FR4,
FR5 and the gaps that remain.
One solution from four pull requests: meta#8121 (the banner swipe and
`presentation`), meta#8144 (the turn-back stretch), meta#8678 (every pointer on the
shared pan) and meta#8047 (a flick at any height). Left out, since no spec
decides them yet: the wheel and trackpad swipe, and the text-selection hold
during a mouse or pen drag.
…r, and every pointer swipes
Toast takes `presentation` ('adaptive' by default, 'toast', 'notification').
Under a finger the swipe and the exit follow the iOS notification banner
(values and sources in motion/uikit/toast.ts): the card follows past a
first distance at a ratio, a release decides on the card's offset or the
finger's speed at the lift, a release moving back springs back, a drag that
turns back stretches the card and springs it back, and every dismissal
retracts the card past its edge. Toast's own swipe (a fine pointer, or
`presentation="toast"`) runs on the shared pan for every pointer, a finger,
a pen and a mouse, with a flick at any travel read from the shared release
filter at the lift. Toast.spec.md records the Presentation concept, FR4,
FR5 and the gaps that remain.
One solution from four pull requests: meta#8121 (the banner swipe and
`presentation`), meta#8144 (the turn-back stretch), meta#8678 (every pointer on the
shared pan) and meta#8047 (a flick at any height). Left out, since no spec
decides them yet: the wheel and trackpad swipe, and the text-selection hold
during a mouse or pen drag.
…r, and every pointer swipes
Toast takes `presentation` ('adaptive' by default, 'toast', 'notification').
Under a finger the swipe and the exit follow the iOS notification banner
(values and sources in motion/uikit/toast.ts): the card follows past a
first distance at a ratio, a release decides on the card's offset or the
finger's speed at the lift, a release moving back springs back, a drag that
turns back stretches the card and springs it back, and every dismissal
retracts the card past its edge. Toast's own swipe (a fine pointer, or
`presentation="toast"`) runs on the shared pan for every pointer, a finger,
a pen and a mouse, with a flick at any travel read from the shared release
filter at the lift. Toast.spec.md records the Presentation concept, FR4,
FR5 and the gaps that remain.
One solution from four pull requests: meta#8121 (the banner swipe and
`presentation`), meta#8144 (the turn-back stretch), meta#8678 (every pointer on the
shared pan) and meta#8047 (a flick at any height). Left out, since no spec
decides them yet: the wheel and trackpad swipe, and the text-selection hold
during a mouse or pen drag.
…r, and every pointer swipes
Toast takes `presentation` ('adaptive' by default, 'toast', 'notification').
Under a finger the swipe and the exit follow the iOS notification banner
(values and sources in motion/uikit/toast.ts): the card follows past a
first distance at a ratio, a release decides on the card's offset or the
finger's speed at the lift, a release moving back springs back, a drag that
turns back stretches the card and springs it back, and every dismissal
retracts the card past its edge. Toast's own swipe (a fine pointer, or
`presentation="toast"`) runs on the shared pan for every pointer, a finger,
a pen and a mouse, with a flick at any travel read from the shared release
filter at the lift. Toast.spec.md records the Presentation concept, FR4,
FR5 and the gaps that remain.
One solution from four pull requests: meta#8121 (the banner swipe and
`presentation`), meta#8144 (the turn-back stretch), meta#8678 (every pointer on the
shared pan) and meta#8047 (a flick at any height). Left out, since no spec
decides them yet: the wheel and trackpad swipe, and the text-selection hold
during a mouse or pen drag.
There was a problem hiding this comment.
Approval waits on an engineering owner's decision, and changes are needed whatever that decision is.
This head writes new rules into Toast's record that main does not state: the presentation concept with its public prop and type, the notification-banner FR4 and FR5 text, a trackpad scroll that swipes a toast, and a released default that is no longer preserved. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner. Otherwise the text is dropped.
Blocking findings:
- Desktop behavior change needs an owner decision: Toast's swipe now takes a mouse drag, a wheel notch and a trackpad scroll for every desktop user (
useToastGesture.ts:107-117,useToastBannerSwipe.ts:193-200). Gate it to touch input, or cite the decision that covers it. - A mouse wheel notch dismisses a toast, but
spec:AST-094FR43 and DEC-24 onmainkeep a mouse wheel's notches off every pan. Take only a trackpad's scroll, if any, and flip the tests atToastViewport.test.tsx:1339and:4204. - A mouse drag that starts on a toast's text swipes the toast away and clears the page's selection, but FR41 on
mainleaves such a drag to the text and never clears an existing selection. Drop this head's FR41 rewrite and fix the test atToastSwipe.interaction.browser.spec.ts:908. - The diff carries 37,002 authored lines and conflicts with
main. Most of it is older copies of #8076, #8360, #8665, #8666 and #8676, now onmainin other forms, and of the open #8121 and #8144. Rebase so the diff shows only this branch's Toast change.
[Automated review]
| }); | ||
| const sessionRef = useRef<SwipeSession | null>(null); | ||
|
|
||
| const pan = useGestureRecognizer( |
There was a problem hiding this comment.
This pan has no pointer-type gate, so every desktop user with default props now swipes toasts with a mouse drag, a wheel notch and a trackpad scroll. That is a desktop behavior change, and it needs an owner decision. Keep the base's touch-and-pen gate (allowedPointerTypes: ['touch', 'pen']), or cite the decision that covers it.
| const pan = useGestureRecognizer( | ||
| rootRef, | ||
| () => | ||
| new PanGestureRecognizer({ |
There was a problem hiding this comment.
allowedScrollTypes is unset, so this branch's pan takes its default ['continuous', 'discrete'], and one mouse wheel notch toward the edge dismisses the toast. spec:AST-094 FR43 on main has a pan take "never a mouse wheel's notches" (DEC-24). If a trackpad scroll stays, use allowedScrollTypes: ['continuous'], as an earlier commit here had. The same applies to the banner swipe's pan.
| (`spec:AST-017` FR59; DEC-9). A mouse or pen drag that a recognizer claims | ||
| takes no new text selection for that drag only. A claim made after the | ||
| drag has moved clears the page's selection; a press claimed at its own | ||
| pointerdown, before it moves, keeps it. An unclaimed mouse drag keeps its | ||
| released behavior. |
There was a problem hiding this comment.
FR41 on main now reads: a claimed mouse or pen drag "never clears an existing selection; a drag that starts on selectable text is not claimed." This text says the opposite, so it conflicts with the current record. Drop this edit and its verification-row change, and conform to main's FR41.
| await expect(page.locator('.astryx-toast')).toHaveCount(0); | ||
| }); | ||
|
|
||
| test('a mouse drag across the toast’s text swipes it away and leaves no text selected (spec:AST-094 FR43, FR41)', async ({ |
There was a problem hiding this comment.
Under FR41 on main, a drag that starts on the toast's text is not claimed, so it selects the text and leaves the toast. This test asserts the opposite: a swipe with nothing selected. Flip it once the head conforms.
|
|
||
| - Released default preserved: `yes` | ||
| - Compatibility class: records shipped behavior; no public change | ||
| - Released default preserved: `no`: under a finger the default `adaptive` |
There was a problem hiding this comment.
This changes Toast's current record: "Released default preserved" becomes no, alongside the presentation concept and the FR4 and FR5 rewrites. An engineering owner needs to approve it at this head with /approve-spec <full head SHA>. The record also now lives at docs/specs/components/Toast/Toast.spec.md on main.
Depends on #8144 and #8676 (and their predecessors). Review only this PR's change: vjeux/astryx@d54551c...9118ec7 and the commits vjeux@363d754, vjeux@786d25e, vjeux@c027f5f, vjeux@81bd53b and vjeux@55fe123 (the rest merge #8676 and #8144)
Primary intent
Toast's swipe takes every pointer and wheel scrolling, and its own swipe (a fine pointer, or
presentation="toast") runs on the shared gesture host (spec:AST-094FR43). Other templates don't fit: it changes behavior.User or maintainer impact
design:reduced-motionDR3).Problem and solution fit
Toast kept private touch and pen listeners with their own slop, second-finger rule and velocity tracking. It now attaches a one-way
PanGestureRecognizerand reads its travel and release velocity. Both pans let the host manage the card's touch-action (FR24).Authority
spec:AST-094FR43, FR41, FR10, FR17, FR24.Change and evidence
useToastGesture.ts: the pan replaces the listeners. Both pans decline a scroll the page can take; the banner marks only a finger's release as touch. Docs, and apresentation="notification"story.Toast.spec.md: FR4 states the mouse, wheel, trackpad and second finger.presentation="toast", a finger's drag toward the edge dismisses; away leaves it.Scope
Size: +1,313 / −563 (tests 949). Toast's import (the CI's measurement): JS 95,551 → 94,818 B gzip; no CSS change.
Testing
pnpm exec vitest run packages/core/src/(16 workers): 15,261 pass (563 files), with no unhandled error; the node project (16 workers): 14,436 pass; its reds are twostory-tree.test.tscases (see test(storybook): run the story-tree check where Storybook is built, and bring the tree back to its shape #8509), twocache.test.mjscases (see fix(cli): a crashed run's release install is recognized by the Node it ran on, whatever its name #8520) and the touch-module bundle test below. The red-first tests fail on the previous head.pnpm test:interaction ToastSwipe: Chromium 31/31; WebKit (the harness container script) 26 passed, 5 skips (3 Chromium-only; the 2 pen tests, which drive Chromium input). Real touch with a coarse pointer, and a real mouse and trackpad scroll (the web input drivers) with a fine one, no engine emulation.pnpm build, the Storybook build,pnpm typecheck,CI=true pnpm lint(0 errors; the one warning in Toast's files ismain's) andpnpm check:knowledge: clean. A merge-tree withmain(90da4a7) is clean (rc 0). The touch-module bundle test's "is absent from the root entry" red (scripts/touch-support-bundle.test.mjs, frommain's refactor(core): one shared touch module that components import directly, reached by Lab through internal/touch #8465) is the one test(core): a touch component's import carries its gesture code, and nothing else does #8671 resolves.Writing rubric results
R1 narration: FR4's wheel, trackpad, and second-finger sentences, the compatibility line, and the two edited current-state bullets state what the system does, in the present tense; none found.
R2 research: none in the record.
R3 evidence: the FR4–FR5 verification row names its inputs and test files, not changes; no basis cell changed.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: none; the record keeps "None".