Skip to content

docs(core): the role test's header and the motion README's files name the internal roles - #8502

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/f1-8257-docs-followup
Oct 31, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/f1-8257-docs-followup

Conversation

@vjeux

@vjeux vjeux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

One commit on main: vjeux@9667b538b5.

Why

Someone reading the motion code to learn which values are motion roles gets a wrong answer from two files: the roles test's header says every spring, duration and curve of a registered table is a role, and the motion README's file table leaves out the two files that hold the roles.

What led to it

This comes from the work to make Astryx's touch components behave as native iOS ones do (sheets, menus, gestures and their motion). #8257 made only the values spec:AST-094 FR4 names into roles (registerMotionTable(id, table, {roles})), kept in roles.ts with their CSS form in roleValue.ts. Its review's item 3 asked for these two descriptions to follow.

Options and tradeoffs

  • Correct the wording where it is, or copy the role list into the README and point the test at it. A copy would be one more list to keep in step with roles.ts.

Why this choice

The code already holds the list. The header and the README only need to say what it is and where it lives.

How to check it

  1. Open packages/core/src/motion/roles.test.ts: its header says the registered roles are exactly the ones FR4 names, each by its table path, and that a component's own measured spring is no role.
  2. Open packages/core/src/motion/README.md: the files table lists roles.ts and roleValue.ts.
  3. Run pnpm exec vitest run packages/core/src/motion/roles.test.ts: it passes as before; only comments and the README changed.

Evidence

  • Local gates at 9667b53: build, type check, pnpm test:ui (17,016), the node suites, lint, the knowledge check, and the changeset checks; Prettier reports every changed file clean.
  • A [chore] changeset keeps the release coverage check green.

Scope

  • This PR changes documentation only, or names every necessary generated artifact (a test file's header comment, the README, and a [chore] changeset for the coverage check).
  • Runtime, API, visual, and policy changes were removed or split.
  • Public text and artifacts contain no internal Meta context.

@vercel

vercel Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 31, 2026 8:12am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Oct 31, 2026, 8:14 AM UTC

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

No new or modified components detected.

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 36.0KB 36.0KB 0B

Accessibility Audit

Status: The accessibility audit did not run on this pull request. It runs after merges to main and before each release; pull requests that touch components run it with the ci:heavy-lanes label.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Changes are needed for one line: the corrected roles.test.ts header and the new roles.ts row match spec:AST-094 FR4 and the code, but the new roleValue.ts row in packages/core/src/motion/README.md says that file reads a role's CSS form back, while roleValue.ts has no parser (its header says “no registry and no parsing”) and parseMotionRoleValue lives in roles.ts. Moving “read back” to the roles.ts row would make the Files table accurate. Optionally, while the header is open: its @input line still says the shared tables are “registered on import”, though each table's register function now says nothing registers on import, which the approving review on #8257 also pointed out.

[Automated review]

Comment thread packages/core/src/motion/README.md Outdated
Comment on lines +22 to +23
| `roles.ts` | The internal motion roles: the springs, durations and curves `spec:AST-094` FR4 names, registered by the shared tables. |
| `roleValue.ts` | A role's CSS form, written and read back: a spring's duration and bounce, a duration in ms, a curve's `cubic-bezier()`. |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

roleValue.ts only writes a role's CSS form: its header says “no registry and no parsing”, and the read-back is parseMotionRoleValue in roles.ts. Suggest moving “read back” to the roles.ts row, for example roles.ts: “The internal motion roles: the springs, durations and curves spec:AST-094 FR4 names, registered by the shared tables; reads a role's CSS value back.” and roleValue.ts: “A role's id, CSS variable and CSS form: a spring's duration and bounce, a duration in ms, a curve's cubic-bezier().”

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

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: the corrected roles.test.ts header and the two new rows in the motion README's Files table match the 17 roles spec:AST-094 FR4 names and the code they describe, and the [chore] changeset covers the README the core package ships. The earlier requested fix is in, with the read-back now described in the roles.ts row. Nothing further is needed from you.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: the corrected roles.test.ts header and the two new rows in the motion README's Files table match the 17 roles spec:AST-094 FR4 names and the code they describe, and the [chore] changeset covers the README the core package ships. The merge from main kept its README rows intact, and nothing further is needed from you.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: the corrected roles.test.ts header and the two new rows in the motion README's Files table match the 17 roles spec:AST-094 FR4 names and the code they describe, and the [chore] changeset covers the README the core package ships. The latest merge from main kept main's README rows intact. Optionally, refresh the description's Correction bullet, which still says roleValue.ts reads a role's CSS form back; the README itself rightly puts that read-back on roles.ts.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge: the corrected roles.test.ts header and the two new rows in the motion README's Files table match the 17 roles spec:AST-094 FR4 names and the code they describe, and the [chore] changeset covers the README the core package ships. Optionally, refresh the description's Correction bullet, which still says roleValue.ts reads a role's CSS form back; the README rightly puts that read-back on roles.ts. Two notes from the #8257 review this follows remain for a later change: the comment at roles.test.ts lines 33-34 still says the tables are registered "the way the generator does", though no generator exists yet, and the springs.ts header still says it takes no input ("Nothing; data only") although the file now imports registerMotionTable.

[Automated review]

@vjeux
vjeux marked this pull request as draft October 29, 2026 22:36
… the internal roles

roles.test.ts's header says what it proves now: the registered roles are
exactly the ones spec:AST-094 FR4 names, every other table value is no
role, and a role's CSS value reads back as the same motion, with the
tables registered by the test. The motion README's files table describes
roles.ts that way and adds roleValue.ts. Docs and a test header only.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks ready to merge once it leaves draft: the corrected roles.test.ts header and the motion README's roles.ts and roleValue.ts rows match the 17 roles spec:AST-094 FR4 lists and the code they describe, and the [chore] changeset covers the README the core package publishes. Nothing further is needed from you. Optionally, a later change could refresh two older notes outside this diff: the "the way the generator does" comment at roles.test.ts lines 33-34, and the "Nothing; data only" @input in the uikit/springs.ts and uikit/timing.ts headers.

[Automated review]

@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Oct 31, 2026
@cixzhang
cixzhang marked this pull request as ready for review October 31, 2026 08:23
@cixzhang
cixzhang merged commit 9d7cffe into meta:main Oct 31, 2026
91 checks passed
@vjeux
vjeux deleted the uikit/f1-8257-docs-followup branch October 31, 2026 09:16

This branch was successfully deployed

1 active deployment
Preview — 9667b538 Deployed Oct 31, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants