Skip to content

docs(design): a hover-summoned layer enters as local feedback (motion DEC-2, draft) - #7367

Closed
vjeux wants to merge 4 commits into
meta:mainfrom
vjeux:spec-motion-hover-entrance
Closed

vjeux wants to merge 4 commits into
meta:mainfrom
vjeux:spec-motion-hover-entrance

Conversation

@vjeux

@vjeux vjeux commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Why: People who open a menu or card by resting the pointer on it wait out the hover delay, then a 230ms entrance. Sweeping across triggers replays it each time.

What led to it: One product we're moving onto Astryx opens a picker on hover. It cuts that entrance to 100ms by overriding a shared duration variable on that one layer.

Should a hover open skip the full entrance while a press or key keeps it?

Existing authority searched

Decision

Options and tradeoffs:

  • The opening input decides (proposed): a hover open appears at once or with a short, non-travelling entrance. Fast after a dwell, for one more rule.
  • One entrance for every input: consistent, but each hover reveal pays the dwell plus the full entrance.
  • A duration prop per surface: flexible, but it restates a timing at every call site (spec:AST-002 FR3).
  • No entrance for any input: fastest, but a click or key loses the cue for where the layer came from.

Why this choice: a person who hovered has already waited; a click has not.

Proposed; pending owner review by ernestt and cixzhang (design:motion DEC-2).

Rejected alternatives

The other three options above; the record keeps the first two as one Rejected: line in DEC-2.

Claim scope and non-goals

No durations, easing, tokens or APIs. The dwell itself, exits, reduced motion, touch and keyboard openings are unchanged.

Evidence and implementation relationship

How to check it: once built, rest the pointer on a trigger whose menu opens on hover: the menu appears at once or with a brief fade. Click the same trigger: it plays its usual entrance.

Evidence: the shared entrance runs for every opening input, 230ms by default. No implementation yet.

Writing rubric results

  • R1 narration: none.
  • R2 research: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives: two, one line in DEC-2.
  • R5 PR or issue references: none.
  • R6 ruled open questions: none; OQ1–OQ3 untouched.

Scope

  • Records only; no mechanism named.
  • Public text and artifacts contain no internal Meta context.

Validation

pnpm check:knowledge, Prettier and git diff --check pass.

… DEC-2, draft)

design:motion (draft) gains a proposed input-specific rule: a layer that a hover-capable pointer summons enters no longer than local feedback and without travel, while a press or a key keeps the standard entrance. Decision pending owner review.
@vercel

vercel Bot commented Oct 12, 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 12, 2026 10:51am UTC

Request Review

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

astracat-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 4, 2026, 2:16 PM UTC

@github-actions github-actions Bot added the spec-auto-merge Auto-merge was enabled by the spec owner gate label Oct 12, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a design:motion owner or maintainer: this adds normative motion rules to the draft motion record that no current spec states yet, so a maintainer needs to approve DEC-2 as the governing spec (or identify another record that governs it), settling the short, non-travelling entrance for hover openings, the standard entrance for press and key openings, the opening input rather than a per-surface setting deciding, and reduced motion showing every layer at once whatever opened it. Two small text fixes are needed either way:

  • Drop (proposed) from the DEC-2 heading and keep the pending status on the Decider line, because the repository's claim parser does not register DEC-2 while the label sits in the heading.
  • Use one comparator in the rule and its verification (for example "the lightest hover or press response"), since current hover and press responses do not share one duration.

[Automated review]

Comment thread docs/design/motion.md Outdated
- The same layer opened by a press or a key keeps the standard entrance.
- The entrance follows the input that opened the layer, not a per-surface
setting.
- Reduced motion shows the layer at once, whatever opened it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: this bullet also covers press-, key- and touch-opened layers, which the description treats as unchanged. It is also stricter than DR5's "immediate or minimally moving form": a non-travelling fade would no longer conform. The shared layer entrance already drops its animation under reduced motion, so this matches shipped behavior, but it is worth confirming that it belongs in DEC-2's scope.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Removed in 6df4637. Reduced motion stays with DR5, so DEC-2 covers only the entrance after a hover dwell, and press-, key- and touch-opened layers are untouched.

Comment thread docs/design/motion.md Outdated
Comment on lines +77 to +78
opens by hover and by a press. It fails when the hover open's entrance travels
or runs longer than the system's hover and press responses.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This failure condition compares the entrance with "the system's hover and press responses", while the rule above bounds it by the lightest of them. Current hover and press responses differ (Item's hover highlight uses the 130ms token default, Button's press uses 175ms), so an entrance between the two can pass this check while breaking the rule. Suggest one comparator in both places, for example "runs longer than the lightest hover or press response".

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6df4637. The rule, its verification and DEC-2 all use one comparator now: "the lightest hover or press response".

Comment thread docs/design/motion.md Outdated
intent from the public Design Conventions wiki without copying duration values,
CSS properties, or audit mechanics.

### DEC-2 (proposed) — A hover-summoned layer enters as local feedback

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The (proposed) label sits between the id and the dash, so the repository's claim-heading pattern (### <ID> — <title> in scripts/check-knowledge.mjs) does not register DEC-2 for this record, and the design:motion/DEC-2 reference below does not resolve. The draft iconography record keeps pending status on the Decider line instead:

### DEC-2 — A hover-summoned layer enters as local feedback

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 6df4637. The heading reads ### DEC-2 — A hover-summoned layer enters as local feedback, and the pending status stays on the Decider line and in the section's first sentence.

…or for the rule and its check, reduced motion left to DR5

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a design:motion owner or maintainer: DEC-2 adds normative motion rules that no current spec states, so a maintainer needs to approve it as the governing spec (or identify another record that governs it), settling the short, non-travelling entrance for hover openings, the standard entrance for press and key openings, and the opening input rather than a per-surface setting deciding. The earlier text fixes are in, and nothing else needs to change before that decision. When deciding, note that "the lightest hover or press response" is zero as written, because some hover paints change with no transition, so hover-summoned layers would have to appear at once.

[Automated review]

Comment thread docs/design/motion.md Outdated
Comment on lines +69 to +70
- A hover-summoned layer's entrance is no longer than the lightest hover or
press response, and it does not travel. Appearing at once conforms.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: read literally, this bound is zero today. Some hover paints change with no transition (CommandPalette items paint the shared hover overlay and declare no transition), so "no longer than the lightest hover or press response" would require hover-summoned layers to appear at once. If a short non-travelling entrance is meant to conform, the comparator needs to say which response it is measured against.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 3829f5f. The rule now reads "appears at once, or with an entrance that does not travel and runs no longer than the shortest timed hover or press response". An untimed hover paint no longer sets the bound to zero, and a short fade still conforms.

Comment thread docs/design/motion.md Outdated
Comment on lines +75 to +77
Verification is a real-browser measurement of the entrance when the same layer
opens by hover and by a press. It fails when the hover open's entrance travels
or runs longer than the lightest hover or press response.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: this failure condition covers only the hover open. A change that also removed the entrance from press- or key-opened layers, which the second bullet forbids, would still pass; if that bullet stays, the check could also fail when the press open does not keep the standard entrance.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 3829f5f. The check now also fails when the press open of the same layer loses the standard entrance, so it covers the second bullet.

…test timed hover or press response and checks that a press keeps the standard entrance

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a design:motion owner or maintainer: DEC-2 adds motion rules that no current spec states, so a maintainer needs to approve it as the governing spec (or identify another record that governs it), settling the short, non-travelling entrance for hover openings, the standard entrance for press and key openings, and the opening input rather than a per-surface setting deciding. The comparator and check fixes are in, and no text change is required before that decision; two points are worth settling with it:

  • "The standard entrance" is not one entrance today: many layers share one entrance, but the hover-opened TopNav mega menu enters with its own longer fade and travel.
  • The check compares a hover open with a press open only, so a key-opened layer that lost its entrance would still pass.

[Automated review]

Comment thread docs/design/motion.md Outdated

- A hover-summoned layer appears at once, or with an entrance that does not
travel and runs no longer than the shortest timed hover or press response.
- The same layer opened by a press or a key keeps the standard entrance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: "the standard entrance" is not one entrance in source. Tooltip, HoverCard, Popover, the dropdown menus, Selector and ContextMenu share one 230ms fade with travel and scale, but TopNavMegaMenu, which also opens on hover, enters with its own fade and 4px travel over --duration-medium-min (310ms by default). Saying whether a press or key open keeps each layer's current entrance or one system entrance would settle which behavior this bullet protects.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in bdaf467. The second bullet now reads "keeps its own entrance", so a press or key open keeps whatever entrance that layer has (TopNavMegaMenu's own fade and travel included), and the rejected alternative reads "the same entrance for every input".

Comment thread docs/design/motion.md Outdated
Comment on lines +75 to +78
Verification is a real-browser measurement of the entrance when the same layer
opens by hover and by a press. It fails when the hover open's entrance travels
or runs longer than the shortest timed hover or press response, or when the
press open loses the standard entrance.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: the check compares a hover open with a press open, so a key-opened layer that lost its entrance, which the second bullet forbids, would still pass. If key openings matter, the check could also open the same layer by a key.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in bdaf467. The check now opens the same layer by hover, by a press and by a key, and it fails when the press or key open loses the layer's own entrance.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approval waits on a design:motion owner or maintainer: DEC-2 adds motion rules that no current spec states, so a maintainer needs to approve it as the governing spec (or identify another record that governs it), settling the short, non-travelling entrance for hover openings, each layer's own entrance for press and key openings, and the opening input rather than a per-surface setting deciding. The latest wording and check changes are in, and no text change is required before that decision. When deciding, note that the rule does not say which hover and press responses set its bound, and that #6865 would leave only the "appears at once" branch.

[Automated review]

Comment thread docs/design/motion.md
Comment on lines +69 to +70
- A hover-summoned layer appears at once, or with an entrance that does not
travel and runs no longer than the shortest timed hover or press response.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For the owners: this bound does not say which hover and press responses count. Among core components the shortest timed one is 130ms under default tokens (Item's hover highlight, for example), but the CLI's kanban-board page template paints a 120ms hover shadow, and because the bound is a minimum, any faster timed response added anywhere lowers it for every hover-summoned layer. Naming the responses that set it would make the check below reproducible.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Leaving this one for the owners on purpose. The bound stays relative because design:motion defines intent and no durations or tokens (its content boundary), so it means the lightest timed feedback Astryx components give for hover and press: 130ms under default tokens today. Page templates and app styles do not set it. Pinning it to one named response or token is the call DEC-2 asks the owners to make, and if #6865's rewrite lands, only the "appears at once" branch remains, which still conforms.

cixzhang added a commit that referenced this pull request Oct 24, 2026
…ers change at once (#8272)

## Exact decision needed

What a person who prefers reduced motion sees when a core component animates a change, on touch and on other pointers, and whether a component may keep its motion.

## Existing authority searched

- `design:motion` DR5 (draft): every animated transition has an immediate or minimally moving form. Draft, so not authority.
- `spec:AST-013` FR13: reduced-motion behavior is unchanged by server-rendered entrances; it defines none.
- `spec:AST-012` FR2: `motion: reduce` and `pointer: coarse/fine` are the adaptation conditions.
- No current web record defines component behavior under reduced motion.
- Search terms: reduced motion, prefers-reduced-motion, cross-fade, Reduce Motion, motion DR5, spring, travel. Overlapping open pull requests: #7367 (draft `design:motion` DEC-2, hover entrances; no reduced-motion rule), #8214 (layer fade under a finger with Reduce Motion; conforms once its fade is 200 ms or less), #8052 (AST-094 FR8 carries the matching touch rule), #8211, #8239, #8253 (touch indicator and placeholder work; continuous indicators are outside this record).

## Decision

New current record `design:reduced-motion`, matching iOS Reduce Motion with Prefer Cross-Fade:

- DR1: under `prefers-reduced-motion: reduce`, a core component's entrances, exits, presentation switches, and state changes never move, scale, resize, or spring.
- DR2: on a coarse pointer, they cross-fade: opacity only, 200 ms or less.
- DR3: on any other pointer, they complete at once.
- DR4: no core component, prop, or theme value keeps motion under reduced motion.

`spec:AST-057` FR5 names that a swiped row's slide out, spring back, and hold-out follow DR2 under reduced motion. The draft `design:motion` keeps its other rules unapproved; its DR5 points to the new record. A separate record keeps the promotion to this one rule, as `docs/design/README.md` advises for a different approval lifecycle.

## Rejected alternatives

- A per-component setting that keeps full motion under reduced motion.

## Claim scope and non-goals

Only transitions under reduced motion. Motion without the preference, durations and easing, tokens, continuous indicators such as a spinner, and content the person drags with their own finger are outside this record.

## Evidence and implementation relationship

Layers that open under a finger with Reduce Motion appear in one frame today, where iOS cross-fades. The open fix #8214 makes them fade under a coarse pointer and stay immediate under a mouse, which conforms to DR2 and DR3 once its fade is 200 ms or less. The open draft #7367 (`design:motion` DEC-2, hover-summoned layers) does not touch reduced motion. The AST-094 revision in #8052 carries the matching touch rule. No implementation is included.

## Writing rubric results

- R1 narration: none.
- R2 research in the record: none.
- R3 evidence naming a change: none; verification names browser states.
- R4 rejected alternatives over one line or outside a decision: one, inside DEC-1, one line.
- R5 pull request or issue references remaining: none.
- R6 ruled open questions still listing options: none.

## Scope

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

## Validation

- `pnpm check:knowledge` (CI lint)
- Prettier
- `git diff --check`
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:45
@vjeux
vjeux marked this pull request as ready for review October 30, 2026 00:00
@vjeux
vjeux marked this pull request as draft October 30, 2026 03:37
@vjeux vjeux closed this Nov 4, 2026
@cixzhang cixzhang reopened this Nov 4, 2026
@vjeux vjeux closed this Nov 4, 2026
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. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants