Skip to content

spec(AST-094): touch presentations feel native by default - #8425

Closed
cixzhang wants to merge 1 commit into
mainfrom
spec/ast-094-touch-native-default-r5
Closed

cixzhang wants to merge 1 commit into
mainfrom
spec/ast-094-touch-native-default-r5

Conversation

@cixzhang

Copy link
Copy Markdown
Contributor

Supersedes #8409 (whose three review rounds were spent), which superseded #8394, #8378, #8316 and #8052. It carries vjeux's record, credited as co-author, plus every owner ruling since. The record itself contains no pull request references.

What changed from #8409's last head:

  • FR36 no longer lists the row swipe: a row swipe keeps spec:AST-057's own release rule, and spec:AST-057 is not amended. Current-state impact drops row swipes from the release-decision line.

Exact decision needed

Approve spec:AST-094: touch presentations get one native-feeling behavior by default on every touch device, iOS and Android alike. Open questions: OQ5 (the menu's drift allowance), OQ6–OQ8 (opening a sub-menu without a lift, the opening haptic, a withdrawn tentative open), OQ9 (where a menu sits on a compact touch screen) and OQ10 (a sub-menu with its parent visible). Platform look and feel is a non-goal tracked separately. Release velocity is governed by spec:AST-100.

Existing authority searched

  • Current claims this record names as amended for touch presentations:
    • component:Selector DEC-1 (the adaptive query);
    • spec:AST-013 FR3 (an Android Chrome support row);
    • spec:AST-025 FR14 (nested scrolling);
    • design:user-states DR1/DR3;
    • the press treatment of family:buttons;
    • module:DropdownMenu/useMenuPress FR6.
  • Current claims it keeps and cites:
    • module:DropdownMenu/useMenuPress FR4;
    • design:user-states DR4;
    • spec:AST-043 FR1;
    • spec:AST-012 FR9 (compact);
    • design:reduced-motion;
    • architecture:public-component-api INV14, INV16;
    • spec:AST-017 FR3, DEC-23;
    • spec:AST-002 FR3;
    • architecture:react-component-runtime INV5/INV7;
    • family:overlay-dismissal AV6.
  • Why none of them settles it: no current record states native touch behavior as the default.

Decision

  • One behavior on every touch device: measured values with sources, the same on every platform unless a measured, sourced difference exists. Touch motion is themeable, with the measured values as theme defaults; gesture thresholds stay internal.
  • Motion and gestures: compositor motion a finger can catch. Recognizer arbitration and readings follow the native model. Two press profiles. Exits as native.
  • Reduce Motion: governed by design:reduced-motion DR2 and DR4.
  • When it applies: one rule for when the touch presentation applies, a coarse primary pointer plus the spec:AST-012 FR9 compact definition where a presentation depends on size. The touch presentation applies after hydration.
  • Defaults and cost: a moved default is restored by the caller's presentation choice (or longPressDelayMs for useMenuPress). Touch work costs nothing where the primary pointer is fine, and a finger there gets the browser's defaults (AST-057's row swipe keeps its own per-event read).
  • Menus and popovers under a finger (FR26–FR35):
    • The lift decides, and the highlight follows the finger with one lit row.
    • A lift outside keeps a menu open.
    • A menu opens on press: at once in a fixed bar, or after 150 ms with no scroll inside a scroll view. The opening finger's handoff applies.
    • Edge autoscroll while the finger is held.
    • Menus and Popover grow from the trigger and shrink back.
    • A pan outside dismisses, and pinch stays available.
    • ContextMenu's long press and lift.
    • A sub-menu drills in as DropdownMenu's does.
    • A presentation takes no input while it grows.
    • useMenuPress hands its finger rules here. DropdownMenu, ContextMenu and Popover point here.
  • Release decisions (FR36–FR40):
    • One decision at the release, from projected travel against a commit point.
    • Moving back cancels, and the settle continues the finger.
    • A keyboard and mouse path stays available.
    • Velocity comes from spec:AST-100.
    • A row swipe keeps spec:AST-057's own release rule.

Rejected alternatives

  • Per-platform behavior tables (one native-feeling behavior on every touch device is the ruling).
  • A generic restoring prop per moved default (presentation is the way back, INV16 and DEC-23).

Claim scope and non-goals

  • Out of scope: pointer presentations, scroll physics, which components adopt a touch presentation, and platform-matched look and feel (tracked separately).
  • Not governed here: public surface and experimental marking (spec:AST-017), and how Lab reaches private modules.

Evidence and implementation relationship

The values come from UIKit read on the simulator, Apple documentation, WWDC sessions and WebKit's source. Implementation stacks on this record. Implementations: #8078 (menu press and handoff), #8080 (menu grow and collapse), #8187 and #8198 (Popover grow and pan-outside dismissal), #8201 (ContextMenu lift), #7308 (ContextMenu under a finger), #8341 (the release decision), #8220 (sub-menus in place), #8223 (the presentation hold), #8195 (the menu cell profile); #8089 (menu placement on a phone) is OQ9.

Writing rubric results

  • R1 narration: none. Amendments are present-tense rules, and the record carries its deciders.
  • R2 research in the record: none. Measurements are cited, not reproduced.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none in the records.
  • R6 ruled open questions still listing options: none. OQ1, OQ2 and OQ5–OQ10 are unanswered.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations (FR1, FR9, FR13 and FR24 are stated as observable contracts, architecture:knowledge-contracts INV18).
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge: aligned.
  • Prettier: clean.
  • git diff --check: clean.

Touch presentations get one native-feeling behavior by default on every
touch device: measured values, compositor motion a finger can catch,
recognizer-tracked gestures, two press profiles, Reduce Motion per
design:reduced-motion, menus and popovers under a finger (FR26-FR35), and
one release decision for the drags that commit (FR36-FR40). Touch motion is
themeable through use-named roles, except motion in step with the on-screen
keyboard. The current records it amends point to it.

Retries #8409, whose review rounds were spent, carrying its last revision
with one change: FR36 no longer lists the row swipe, which keeps
spec:AST-057's own release rule (AST-057 is not amended).

Co-authored-by: vjeux <197597+vjeux@users.noreply.github.com>
@vercel

vercel Bot commented Oct 25, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Building Building Preview Oct 25, 2026 4:49pm UTC

Request Review

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

astracat-bot Bot commented Oct 25, 2026

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🔄 In progress (for maintainers only) Oct 25, 2026, 4:49 PM UTC

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 25, 2026
@cixzhang cixzhang closed this Oct 25, 2026
@cixzhang
cixzhang deleted the spec/ast-094-touch-native-default-r5 branch October 25, 2026 16:50

This branch was successfully deployed

1 active deployment
Preview — 7ec50dc8 Deployed Oct 25, 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:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant