Repository navigation
spec(AST-094, AST-057): gestures work on the web for every pointer (FR43) #8646
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
10d85dd
c037c2f
ff18a21
0329096
91bc491
874ee55
848021a
1bb6eb7
06fa181
a3f189c
c46ace4
c7c4091
8e6c9ef
459c961
7270894
d5aee72
7a823e3
da36283
4fb6ea2
4084b67
4e3f644
18da5ed
b61be38
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -183,9 +183,10 @@ those contracts. | |
| keeps one copy per page however many components use them. There is no | ||
| install call, no public entry, and no public installed check; tests reset | ||
| the modules through an internal hook only. A component's own touch logic is | ||
| small glue in its own build over these modules. Where the primary pointer | ||
| is fine, no recognizer attaches and no touch listener is registered | ||
| (`spec:AST-094` FR19, FR24). The modules are not public exports and are not | ||
| small glue in its own build over these modules. The gesture host attaches for | ||
| every pointer, with no touch-only query, and pointer and hover queries live | ||
| with the environment queries; under a fine pointer only a component that | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. “the environment queries” is not defined in any record or in |
||
| uses a gesture listens (`spec:AST-094` FR19, FR24, FR43). The modules are not public exports and are not | ||
| documented for consumers; Core and Lab components reach them through | ||
| `@astryxdesign/core/internal/touch`, a subpath reserved for Astryx's own | ||
| packages: undocumented, outside the compatibility promise, versioned in | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -247,9 +247,11 @@ constants. | |
| activate it; while closed the panel MUST be out of the accessibility tree | ||
| and the tab order. Under `commit` the panel MUST be presentational | ||
| (`aria-hidden`) at all times, because nothing in it is ever tappable. | ||
| - **AR2 — The gesture touches nothing on a pointer that can hover.** | ||
| `swipeActions` MUST have no effect on the tab order, the accessible tree, | ||
| or the row's paint on such a pointer. Hover MUST NOT uncover the panel. | ||
| - **AR2 — A mouse never swipes a row.** On a pointer that can hover, | ||
| `swipeActions` MUST have no effect on the tab order or the accessible tree, | ||
| a mouse drag MUST NOT reveal the panel, and hover MUST NOT uncover it. A | ||
| trackpad's horizontal scroll swipe MAY reveal the panel, as a pan that takes | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This MAY contradicts the rest of the record, which is unchanged: DEC-4 ("On a pointer that can hover, |
||
| trackpad scrolling (`spec:AST-094` FR43). | ||
| - **AR3 — The row's primary stays one tab stop.** `swipeActions` MUST NOT | ||
| change the primary element's role, name, or activation, and MUST add no | ||
| stop while closed. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,8 +42,9 @@ a measured, sourced difference exists. | |
|
|
||
| ## Non-goals | ||
|
|
||
| - Pointer (desktop) presentations. Their timing and easing stay with the | ||
| theme's duration and easing tokens (`architecture:theme-tokens`). | ||
| - Pointer (desktop) presentations' timing and easing, which stay with the | ||
| theme's duration and easing tokens (`architecture:theme-tokens`). Gestures | ||
| and press tracking themselves apply to every pointer (FR43). | ||
| - Platform-matched look and feel: glass versus material surfaces, glyphs and | ||
| chrome. This record governs behavior only. | ||
| - WebKit embedded in a native app and the native Swift package. This record | ||
|
|
@@ -186,6 +187,10 @@ a measured, sourced difference exists. | |
| views and activates by the browser's click on a lift inside. On the web a | ||
| control's press ends when the browser takes the touch (FR20), and its | ||
| activation stays the browser's click. | ||
| Under a fine pointer a control uses a third profile with no delay: its | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This adds a third profile, but FR11 is still titled "Two press profiles" and says "Press feedback MUST follow one of two native profiles" (line 185). The records that own the press look, the user-states design (DR1, DR3) and the buttons family's visual-state row, still hand FR11 their timing only under a finger, so they need the fine-pointer profile too. |
||
| press paint starts at once on `pointerdown`, through the same press | ||
| controller and release fade as a finger's, in place of CSS `:active`; the | ||
| scroll brake stays touch-only (DEC-21). | ||
| A cell (a table or collection cell) highlights 150 ms after touch-down inside | ||
| a scroll view, drops the highlight when the scroll wins (FR20), and activates on a | ||
| lift inside it with no scroll taking the touch (FR20). A control is inside a scroll view when it sits in a scrollable container, | ||
|
|
@@ -257,11 +262,8 @@ a measured, sourced difference exists. | |
| decides at 15 px of travel (UIKit's screen-edge hysteresis); outside the | ||
| band the author's scrolling is untouched, and FR19's 10 px governs every | ||
| other claim (DEC-13). | ||
| - **FR19 — Claims are made in time and only by an owner.** Recognizers attach only where the primary pointer | ||
| is coarse (FR13, DEC-6). Where the primary pointer is fine, no recognizer | ||
| attaches and no touch listener is registered (FR24), so a finger on a | ||
| touchscreen whose primary pointer is fine gets the browser's defaults for | ||
| this record's behaviors (`spec:AST-017` FR59, DEC-25). This rule governs | ||
| - **FR19 — Claims are made in time and only by an owner.** Recognizers attach for every pointer, with FR43's | ||
| exceptions. This rule governs | ||
| this record's behaviors only; `spec:AST-057` keeps its per-event pointer | ||
| read for the row swipe, as its record states. A recognizer that begins MUST claim its touches by cancelling | ||
| `touchmove` through a non-passive listener on its element; a watcher, | ||
|
|
@@ -307,13 +309,11 @@ a measured, sourced difference exists. | |
|
|
||
| FR26–FR28 and FR30 apply to every surface that carries the press model of | ||
| `module:DropdownMenu/useMenuPress` (DropdownMenu, ContextMenu, their sub-menus, | ||
| and Selector's listbox, whose options count as rows) when a finger or pen | ||
| drives it and the primary pointer is coarse (FR19); where the primary pointer | ||
| is fine, a finger in a menu keeps today's behavior (`spec:AST-017` FR59, | ||
| DEC-25), and menus make no per-gesture pointer read; FR29 applies to DropdownMenu's trigger under the same | ||
| and Selector's listbox, whose options count as rows) under every pointer | ||
| (FR43); FR29 applies to DropdownMenu's trigger under the same | ||
|
Comment on lines
+323
to
+324
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With FR26–FR30 under every pointer, |
||
| condition; FR34 applies to menus; | ||
| FR31 and FR35 apply to anchored menus and to Popover under a finger; FR32 and | ||
| FR33 apply to menus only. A mouse keeps today's behavior. | ||
| FR33 apply to menus only. | ||
|
|
||
| - **FR26 — The lift decides.** A menu row MUST act when the finger lifts over | ||
| it, never because the press began on it; a press that never left its row is | ||
|
|
@@ -442,11 +442,11 @@ FR33 apply to menus only. A mouse keeps today's behavior. | |
|
|
||
| ### Resources and compatibility | ||
|
|
||
| - **FR24 — Touch work costs nothing where it is not used.** Where the | ||
| primary pointer is fine (FR19), and while a touch presentation is | ||
| disabled, no touch-only listener, observer or timer is active, except the | ||
| released `module:DropdownMenu/useMenuPress` behavior a finger keeps there | ||
| (its FR9). The number of `document`- or `window`-level | ||
| - **FR24 — Gesture work costs nothing where it is not used.** A component | ||
| that uses no gesture registers no gesture listener, observer or timer, and | ||
| while a touch presentation is disabled none is active. Under a fine pointer | ||
| a component that uses a gesture keeps one listener on its element and adds | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The FR24 verification row (line 559) still fails "a touch listener on a fine pointer", but FR43 gives a finger gestures under every primary pointer and FR19 claims a finger through a non-passive
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. On a touchscreen laptop (a fine primary pointer) FR43 gives a finger gestures, and FR19 makes a claiming recognizer cancel
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "keeps one listener on its element" cannot hold for a pan FR43 also drives by the wheel: a drag needs |
||
| document listeners only during a press, removing them at the release (FR43). The number of `document`- or `window`-level | ||
| touch listeners MUST NOT grow with the number of component instances, a | ||
| repeated row or cell adds no touch observer of its own, and nothing | ||
| touch-related remains after the last instance unmounts | ||
|
|
@@ -464,6 +464,19 @@ FR33 apply to menus only. A mouse keeps today's behavior. | |
| This replaces `component:Selector` DEC-1's width-and-pointer query with the | ||
| FR13 rule for `adaptive`. | ||
|
|
||
| - **FR43 — Gestures work on the web.** Gestures attach for every pointer, a | ||
| mouse, a pen, and a finger, not only a coarse primary pointer. These stay | ||
| off: swipe actions under a mouse, which would take the browser's text | ||
| selection and native drag (`spec:AST-057` AR2); a pinch under a pen; the | ||
| screen-edge pan on every web input; and the 44 px touch target, which stays | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "the screen-edge pan on every web input" reads as covering a finger in a browser too, which would switch off FR18's screen-edge pan; "under a mouse, a trackpad or a pen" says what DEC-21 means. "the 44 px touch target" is also not defined by any current record yet. |
||
| coarse-only and never overlaps a neighbor's target. On the web, a pan also | ||
| takes wheel and trackpad scrolling; a pinch takes a ctrl-wheel; one shared | ||
| context request answers a long press, a right click, and Shift+F10; the | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This long press answers the context request under every pointer, a mouse included, but FR41 (lines 448–449), which this change leaves as it is, still says “a mouse keeps its released behavior”, and its verification row fails a change to mouse selection. Today's ContextMenu long press listens to touch only. Say whether a mouse long press makes the request (for example “a long press under a finger or a pen”) and amend FR41 and its row to match. |
||
| press model has a fine-pointer profile with no delay (FR11); and a reorder | ||
| starts on a drag from its handle without a hold. Under a fine pointer only a | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This names no pointer, so with "Gestures attach for every pointer" it covers a finger too, which contradicts
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This names no pointer, and FR43 opens with "Gestures attach for every pointer, a mouse, a pen, and a finger", so it also covers a finger on a phone.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This clause names no pointer, and FR43 opens with "Gestures attach for every pointer, a mouse, a pen, and a finger", so it also covers a finger on a phone. |
||
| component that uses a gesture listens (FR24), and the change adds no | ||
| stylesheet bytes (`spec:AST-080` FR8) (DEC-21). | ||
|
|
||
| ### Platform support | ||
|
|
||
| - Supported engines: Astryx's supported browsers (`spec:AST-013`) with touch | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With FR43 bringing gestures to desktop mouse, trackpad and pen browsers, this still names only browsers "with touch input, on iOS and Android", and the browser evidence below names phone emulation and devices only. Suggest adding the desktop engines and the desktop evidence FR43's verification row asks for. |
||
|
|
@@ -551,6 +564,7 @@ FR33 apply to menus only. A mouse keeps today's behavior. | |
| | FR34, FR35 | Browser tests and storyboards under a finger | a sub-menu drilling in and its Back row returning; a tap and a drag during a popover's and a menu's growth; a pinch during growth; a mouse | a drill-in that leaves the parent's rows in place, a change between levels that does not play on its roles, a tap during growth that closes, scrolls or moves focus, a pinch blocked other than by the author's `touch-action`, or a changed mouse path fails | | ||
| | FR36–FR40 | Release tests on synthetic touch streams with explicit timestamps, per use | below and past each commit point; a flick that projects past it; a slow drag past it; a release moving back; Reduce Motion; keyboard and mouse paths | a decision that changes mid-settle, a release moving back that commits, a settle that does not start at the release velocity, or an action with no keyboard or mouse path fails | | ||
| | FR41 | Browser tests with real touch input (`spec:AST-013` FR10) | a tap; a long press on a ContextMenu trigger, a DropdownMenu trigger the caller renders, a row with a context menu, and a slider thumb; a long press on a checkbox row's label and on plain text; a cancelled press; mouse and keyboard selection | a tap that selects, a hold with an action that starts a selection or callout, a label or plain text whose long press does not select natively, a suppression that outlives the press, or a change to native selection elsewhere or to mouse, keyboard, or assistive-technology selection fails | | ||
| | FR43 | Browser tests with a mouse, a trackpad, a pen, a finger, and the keyboard, and resource counts | a pan by drag and by wheel; a ctrl-wheel pinch; a long press, a right click, and Shift+F10; a mouse press; a handle drag; a row swipe with a mouse and a trackpad; a component with no gesture | a gesture missing under a mouse or pen, a mouse swipe action, a pen pinch, a web edge pan, a press delay under a fine pointer, an idle listener in a component with no gesture, or added stylesheet bytes, fails | | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This row's inputs include a finger, so "a web edge pan … fails" reads as failing FR18's finger edge pan. FR43 now says "under a mouse, a trackpad, or a pen"; say the same here. |
||
| | all | iOS simulator: the UIKit reference capture and the same gesture in Safari; real iOS Safari and Android Chrome devices | per component | an unmatched curve or timing is a parity defect | | ||
|
|
||
| ## Decision log | ||
|
|
@@ -702,6 +716,21 @@ iOS 26.2 simulator measures it. | |
|
|
||
| Rejected: the 150 ms delay on every menu row. | ||
|
|
||
| ### DEC-21 — Gestures work on the web, not only under a finger | ||
|
|
||
| **Reference:** `spec:AST-094/DEC-21` | ||
| **Decider:** `cixzhang`, `2026-10-26` | ||
|
|
||
| Most of these gestures work as well with a mouse, a trackpad, or a pen, so | ||
| they stay on for every pointer, with web inputs mapped in: wheel and trackpad | ||
| scrolling for a pan, a ctrl-wheel for a pinch, and right click or Shift+F10 | ||
| for a long press. What would fight the browser stays off: a mouse's swipe | ||
| actions, a pen's pinch, and the screen-edge pan. The 44 px target stays | ||
| touch-only. This supersedes the coarse-only press controller: a mouse press | ||
| now uses the press model with no delay instead of the browser's `:active`. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "a mouse press now uses the press model ... instead of the browser's |
||
|
|
||
| Rejected: keeping gestures and press tracking touch-only. | ||
|
|
||
| ## Open questions | ||
|
|
||
| - **OQ1 — Scroll view bounce-back curve.** What curve brings a scroll view | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The INV13 verification row (line 342) still fails "a touch listener under a fine primary pointer"; it needs the new budget this paragraph states.