Repository navigation
Commit 9d7cffe
authored
docs(core): the role test's header and the motion README's files name the internal roles (#8502)
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
- [x] 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).
- [x] Runtime, API, visual, and policy changes were removed or split.
- [x] Public text and artifacts contain no internal Meta context.1 parent 19ae6fc commit 9d7cffe
3 files changed
Lines changed: 14 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | | - | |
7 | | - | |
8 | | - | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
0 commit comments