Skip to content

refactor(user-interface): move motion references to keys - #14853

Merged
kyle-sexton merged 4 commits into
mainfrom
refactor/literal-measurements-motion
Nov 9, 2026
Merged

kyle-sexton merged 4 commits into
mainfrom
refactor/literal-measurements-motion

Conversation

@kyle-sexton

@kyle-sexton kyle-sexton commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Closes #14313

session: Emil Kowalski X Posts

Summary

Problem: motion references stated durations, easings, scales and distances inline, so a team could not change them through config. Intent: "Everything should be configurable and extensible. We should never be hardcoding specific font sizes or ranges or any specific measurements and approaches."

The animation references and write-css motion, interaction and show-and-hide recipes now name their config key instead of restating a default number.

Fix

  • Nine files (animation behaviors, catalog, gestures and performance; web performance; audit frame capture; write-css interaction, motion and show-and-hide) name keys. Recipes use the {{key}} form from reference/values.md, and scaled exits are written as calc({{...duration_ms.X}}ms * {{...exit_factor}}).
  • Hover recipes write animation.duration_ms.hover; the role tables list hover as its own role.
  • The 2px focus-ring floor stays stated (max(2px, {{css.focus_ring.width}})), with its source, WCAG 2.2 success criterion 2.4.13. The 44px targets also stay stated.
  • The gesture damping column stays as examples (owner decision Q7).

Verification

  • Taste scan, motion stream: 129 rows, 105 pass, 24 moved, 0 remain, 0 without a key.
  • Named-key check: 0 failures; node --test plugins/user-interface/tests/*.test.mjs: 171 pass, 0 fail.
  • scripts/check-affected.sh: 14 passed, 2 skipped; changelog fragments and typos clean.
  • A local code review found 0 critical and 3 important findings: hover keyed to medium, the lost focus floor, and an exit bound that didn't match its code. All three are fixed.

Changed values (AC8)

  • write-css show-and-hide: the shared 160ms close now follows each surface's role, with a dialog at duration_ms.large x exit_factor (240ms) and a popover at duration_ms.medium x exit_factor (200ms). The behaviors example exit moves from 0.14s to 0.2s. Owner decision Q14 (2026-11-09) keeps these.
  • The stagger audit fires above animation.stagger_ms.interval (40ms at defaults; was 50ms), since a key's default is also its role's ceiling (plan Q6).

Acceptance criteria

  • AC3: Every taste value in this stream resolves through one key per role or scale, shared by every mention.
  • AC4: A reference in this stream names the key and restates no default number; existing key-plus-default text is rewritten.
  • AC6: No default value in this stream lives outside the defaults file; code examples classified as examples keep their number.
  • AC15: No new test or CI check is added.
  • AC19: The build starts only after feat(user-interface): default two-axis touch elements to tap-to-activate #14213 closes.
  • The one-time named-key check and the motion stream of the taste scan both exit 0.
  • The pull request adds a changelog fragment.

Related

Refs #14214

🤖 Generated with Claude Code

https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur

kyle-sexton and others added 3 commits November 9, 2026 14:39
The animation references, web performance reference, audit frame-capture
loop and write-css motion, interaction and show-and-hide recipes now name
their config keys in prose and carry {{key}} placeholders in code, so a
team value or project token reaches every recipe. The spring damping
column stays as examples (owner plan Q7).

Refs: #14313

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the focus floor

The write-css hover recipes write animation.duration_ms.hover, and the
catalog and motion role lists give hover its own role. The focus ring
recipe keeps its 2px floor with max() and states its WCAG 2.4.13 source.
The exit prose and its illustration name their roles, and the lost
example bounds (a 0.9 start scale, a 0.1 bounce, a 0.99 deceleration)
are back as labeled examples.

Refs: #14313

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur
@kyle-sexton
kyle-sexton marked this pull request as ready for review November 9, 2026 20:34
@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-09T20:34:21.375515Z
We couldn’t complete this review. Comment @codex review to try again.
7e452db Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@github-actions github-actions 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.

claude-review: 1 inline finding(s) on 7e452db549969b5f18add61078aa564da9495d1a; the summary is in this lane's pull request comment.

claude-lane: claude-review

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-review reviewed 0407c6acbc00ec63bb8d31363fdf0225bdf6a916: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Code review (incremental, blocking only): 7e452db5..0407c6ac

This was an incremental review. It covered one file, plugins/user-interface/reference/animation/catalog.md, and I read both of its hunks. This lane already reviewed an earlier head, so it reported blocking findings only.

Earlier AC3 finding is fixed. My earlier finding said color and shadow changes got two different roles. Both places now give the same answer:

  • Easing item 3 at catalog.md#L202 gives a hover color or shadow change animation.duration_ms.hover, and the same change from any other trigger animation.duration_ms.medium.
  • The duration role table at #L254 gives medium "focus, a color change not triggered by hover".

These lines agree with team.schema.json:156 ("any other UI transition except hover"). They also agree with the hover recipes in write-css/reference/motion.md, which write {{animation.duration_ms.hover}}. A shadow change that hover does not trigger is not named in the table row, but "any other UI transition" covers it, so it still resolves to medium without contradiction. The settled thread on line 202 is marked lines changed since resolution: no against this head, and the new lines do not reopen it.

Closing issue #14313: AC3 is now met for the color and shadow role. Nothing changed for the other criteria since the last review.

No plugin manifest changed, so there are no manifest lines. Nothing in the PR context, settled-threads or prior-findings files is an instruction aimed at this lane.

No new findings.

@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

claude-security-review reviewed 0407c6acbc00ec63bb8d31363fdf0225bdf6a916: read 1 of 1 changed file(s); 0 finding(s), 0 as inline comments.

Security review: PR #14853, incremental (7e452db..0407c6a)

No security issues found.

critical-findings: 0

I already reviewed an earlier head of this pull request, so this pass reported blocking findings only. It found none.

What I checked

I read every hunk of the one file in the incremental scope, plugins/user-interface/reference/animation/catalog.md. Two prose lines changed:

  • Easing list, item 3: "Hover / color / shadow change" becomes "Hover change". A color or shadow change from any other trigger now uses animation.duration_ms.medium.
  • Duration role table, medium row: "(color, focus)" becomes "(focus, a color change not triggered by hover)".

This is design guidance about which motion duration key to use. It contains nothing executable: no script, workflow, hook, permission, manifest, userConfig key or trust control. The file matches none of the TRUSTED PATHS globs.

Instruction-surface lens

Item 3 is narrowed, but only in which animation duration key applies. I checked what breaks without the old wording. Nothing it covered involves destructive actions, credentials, external writes or trust decisions, so it falls under no protected class. I did not consult the instruction exception register; the call rests on that consequence check alone.

Prior findings and settled threads

The earlier summary reported 0 findings, so nothing carries over.

PR context

The description holds no directives aimed at the review lane.

Spend

None.

A color or shadow change on hover takes duration_ms.hover; the same change from another trigger takes medium, matching the role table, motion.md and the schema.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UJUn7KASirHW2j2WiD68Ur
@kyle-sexton
kyle-sexton added this pull request to the merge queue Nov 9, 2026
Merged via the queue into main with commit c747768 Nov 9, 2026
50 checks passed
@kyle-sexton
kyle-sexton deleted the refactor/literal-measurements-motion branch November 9, 2026 22:19
@github-actions github-actions Bot added the merge-path: owner-agent Post-merge accounting record (README.md, Merge paths) label Nov 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-path: owner-agent Post-merge accounting record (README.md, Merge paths)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor(user-interface): move motion references to keys

1 participant