Skip to content

fix(core): spring roles register themselves when they load - #10138

Merged
cixzhang merged 3 commits into
meta:mainfrom
vjeux:uikit/f1-spring-roles-register
Nov 6, 2026
Merged

cixzhang merged 3 commits into
meta:mainfrom
vjeux:uikit/f1-spring-roles-register

Conversation

@vjeux

@vjeux vjeux commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Specs decision, Nov 5 2026: follows 67A (springs follow tempo) and AST-094 FR45; #8257's line amended to: "A page that plays no spring ships no springs registry; each spring role registers itself when the module that plays it loads (one idempotent in-memory write, no DOM)."

Each spring role, and the navigation, paging and picker motion tables, register themselves when their module loads, so a spring role plays at the theme's tempo wherever it plays, with no register call.

Maintainer impact

A spring role (springs.settle and its siblings) scales with the theme's tempo only once its table is registered. Today each piece of touch code that plays a role has to call registerSpringsTable() first. Code that forgets plays the role at tempo 1 whatever the theme, and the same page scales it once another component, such as a Slider, has run. Every new spring player has to remember the call.

Intended invariant

  • spec:AST-108 FR3: a motion role plays at the tempo of the theme it plays in.
  • A page that plays no spring ships no springs registry. Registering is one idempotent in-memory write with no DOM, so importing the tables stays safe on a server.
  • architecture:component-style-authoring INV6: a spring tuning table ships to a component only the rows that component uses. springRows.test.ts holds it, unchanged. This is why the springs register per row rather than as one table: a table registered when its module loads would carry every role row into any component that imports one spring.

Change

  • motion/roles.ts gains registerSpringRole(id, spring), which registers one spring leaf under its table path (springs.settle) and returns it.
  • In motion/uikit/springs.ts, each of the 18 role rows is defined through /* @__PURE__ */ springRole(name, …). A row registers itself when a module that uses it loads; a row no module uses drops out of the bundle, call included.
  • The constants table's provenance check (uikit.test.ts) reads a springRole(…) row as a row, so each role row's @source is still checked where it is declared.
  • navigation.ts, paging.ts and picker.ts each call their own register function at module top level. Each exports one table object, so INV6 is unaffected.
  • registerSpringsTable() stays exported as a documented no-op: the role rows have registered themselves by the time it runs. The calls already in place do nothing more, and motion/README's sample no longer makes one.
  • No product behavior changes on main: every component that plays a role on main already registers its table. The change matters to the spring players still in review, such as Lightbox's zoom.

Evidence

  • Failure before the change, on a not-for-landing arm that adds this pull request's two proofs to its base (vjeux@7f6cd11564): uikit/selfRegistration.test.ts imports one row or table at a time in a fresh module graph, with no register call. SETTLE_SPRING resolves unscaled at tempo 1.5 (settle time 0.7348 s, expected 0.5511 s), the picker's tap spin stays 300 ms where 450 ms is expected, and SETTLE_SPRING has no role.
  • In the browser: a page that imports only the springs and the motion engine, with no register call, plays springs.settle inside tempo 0.75 and 1.5 scopes. Without the change the scoped box sits 25.1 px from where it should be at the scaled time. With it, both scopes draw at 0.75 × t and 1.5 × t what the unscoped box draws at t. This page stands in for "a Lightbox-only page": Lightbox's springs are not on main yet.
  • Product/runtime behavior verified unchanged: the existing tempo tests, which register explicitly, the units of every component that registers today, and springRows.test.ts (INV6): a bundle that imports one spring row still carries no other, and calling registerSpringsTable() still carries only the role rows.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  • pnpm build, pnpm storybook:build, pnpm typecheck and CI=true pnpm lint on the changed files.
  • pnpm test:ui: 21,210 tests passed, springRows.test.ts and selfRegistration.test.ts included.
  • pnpm check:motion-roles: the generated table still lists the 35 registered roles.
  • themeTempo.interaction.browser.spec.ts in Chromium and WebKit: 6 of 6 each, the new no-register page included.

A spring role played at the theme's tempo only after some module had
called registerSpringsTable(). A page whose only motion was such a role
played it at tempo 1, and the same page scaled it once a Slider had
run. Each spring role row now registers itself when the module that
plays it loads: one idempotent in-memory write, no DOM. Its call is
marked pure, so a bundle that does not use a row drops it, and a
component still carries only the spring rows it uses. The navigation,
paging and picker tables register themselves at import.
registerSpringsTable stays exported, and the calls already in place do
nothing more.
@vercel

vercel Bot commented Nov 5, 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 Nov 5, 2026 11:10pm UTC

Request Review

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

astracat-bot Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 5, 2026, 11:15 PM UTC

@github-actions

github-actions Bot commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 1c1ca09

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Slider 96.5 kB (+215 B) · 8.3 kB CSS (0) — — · — · —
PowerSearch 263.0 kB (+188 B) · 22.8 kB CSS (0) — — · — · —
TreeList 41.4 kB (+187 B) · 5.4 kB CSS (0) — — · — · —
112 more components
Component Size LoC Visual · A11y · RTL
SideNav 80.6 kB (+181 B) · 10.2 kB CSS (0) — — · — · —
AppShell 80.6 kB (+173 B) · 12.3 kB CSS (0) — — · — · —
DateTimeInput 188.7 kB (+162 B) · 17.3 kB CSS (0) — — · — · —
Collapsible 25.1 kB (+138 B) · 4.5 kB CSS (0) — — · — · —
SegmentedControl 88.3 kB (+137 B) · 6.8 kB CSS (0) — ✓ · ✓ · ✓
DateInput · Storybook 165.9 kB (+22 B) · 15.6 kB CSS (0) 5,613 (0) ✓ · ✓ · ✓
TimeInput 142.9 kB (+7 B) · 14.6 kB CSS (0) — — · — · —
Carousel 57.5 kB (+3 B) · 9.5 kB CSS (0) — — · — · —
Field 46.6 kB (+2 B) · 6.7 kB CSS (0) — — · — · —
Link 48.1 kB (+2 B) · 6.9 kB CSS (0) — — · — · —
Pagination 98.3 kB (+2 B) · 16.8 kB CSS (0) — — · — · —
Popover 59.9 kB (+2 B) · 12.9 kB CSS (0) — — · — · —
RadioList 48.0 kB (+2 B) · 6.8 kB CSS (0) — — · — · —
ChatDictationButton 51.2 kB (+1 B) · 8.8 kB CSS (0) — — · — · —
ChatLayout 53.9 kB (+1 B) · 9.3 kB CSS (0) — — · — · —
CommandPalette 58.7 kB (+1 B) · 12.4 kB CSS (0) — — · — · —
ComplexSelector 61.5 kB (+1 B) · 10.5 kB CSS (0) — — · — · —
ContextMenu 88.5 kB (+1 B) · 16.4 kB CSS (0) — — · — · —
ContextMenuItem 26.5 kB (+1 B) · 6.1 kB CSS (0) — — · — · —
DateRangeInput 80.5 kB (+1 B) · 11.3 kB CSS (0) — — · — · —
IconButton 50.7 kB (+1 B) · 8.7 kB CSS (0) — — · — · —
MobileNavToggle 51.0 kB (+1 B) · 8.7 kB CSS (0) — — · — · —
Outline 23.5 kB (+1 B) · 4.1 kB CSS (0) — — · — · —
RadioListItem 61.0 kB (+1 B) · 9.7 kB CSS (0) — — · — · —
Timestamp 22.9 kB (+1 B) · 8.9 kB CSS (0) — — · — · —
ToggleButton 51.6 kB (+1 B) · 8.8 kB CSS (0) — — · — · —
Typeahead 69.0 kB (+1 B) · 11.3 kB CSS (0) — — · — · —
AlertDialog 94.5 kB (0) · 13.2 kB CSS (0) — — · — · —
AvatarGroupOverflow 44.1 kB (0) · 5.5 kB CSS (0) — — · — · —
BottomSheet 56.9 kB (0) · 7.5 kB CSS (0) — — · — · —
Button 50.7 kB (0) · 8.7 kB CSS (0) — — · — · —
ButtonGroup 39.7 kB (0) · 3.7 kB CSS (0) — — · — · —
Calendar 61.5 kB (0) · 9.3 kB CSS (0) — — · — · —
ChatComposer 67.2 kB (0) · 10.6 kB CSS (0) — — · — · —
ChatComposerInput 65.2 kB (0) · 10.1 kB CSS (0) — — · — · —
ChatComposerTokenElement 65.2 kB (0) · 10.1 kB CSS (0) — — · — · —
ChatSendButton 51.1 kB (0) · 8.7 kB CSS (0) — — · — · —
CheckboxInput 57.9 kB (0) · 9.0 kB CSS (0) — — · — · —
CheckboxList 49.8 kB (0) · 7.5 kB CSS (0) — — · — · —
CheckboxListItem 64.1 kB (0) · 10.8 kB CSS (0) — — · — · —
ClickableCard 16.5 kB (0) · 6.9 kB CSS (0) — — · — · —
CodeBlock 65.1 kB (0) · 10.0 kB CSS (0) — — · — · —
CommandPaletteItem 11.7 kB (0) · 3.6 kB CSS (0) — — · — · —
DialogHeader 53.5 kB (0) · 10.3 kB CSS (0) — — · — · —
DrawerHeader 53.7 kB (0) · 11.7 kB CSS (0) — — · — · —
DropdownMenuCheckboxItem 21.1 kB (0) · 6.4 kB CSS (0) — — · — · —
DropdownMenuItem 20.4 kB (0) · 6.0 kB CSS (0) — — · — · —
DropdownMenuRadioItem 21.2 kB (0) · 6.4 kB CSS (0) — — · — · —
DropdownMenuSubMenu 63.6 kB (0) · 9.4 kB CSS (0) — — · — · —
FieldLabel 42.7 kB (0) · 5.2 kB CSS (0) — — · — · —
FileInput 59.4 kB (0) · 9.7 kB CSS (0) — — · — · —
InputGroup 48.3 kB (0) · 7.3 kB CSS (0) — — · — · —
Item 15.9 kB (0) · 5.3 kB CSS (0) — — · — · —
NumberInput 61.9 kB (0) · 10.2 kB CSS (0) — — · — · —
Overlay 21.6 kB (0) · 3.9 kB CSS (0) — — · — · —
ProgressBar 11.5 kB (0) · 6.2 kB CSS (0) — — · — · —
SegmentedControlItem 12.1 kB (0) · 4.0 kB CSS (0) — ✓ · ✓ · ✓
SelectableCard 16.7 kB (0) · 7.2 kB CSS (0) — — · — · —
Selector 88.3 kB (0) · 16.4 kB CSS (0) — — · — · —
SelectorOption 19.3 kB (0) · 5.8 kB CSS (0) — — · — · —
Step 29.6 kB (0) · 5.6 kB CSS (0) — — · — · —
Stepper 52.3 kB (0) · 8.9 kB CSS (0) — — · — · —
Switch 93.9 kB (0) · 9.5 kB CSS (0) — — · — · —
Tab 13.1 kB (0) · 4.2 kB CSS (0) — — · — · —
TableCell 89.7 kB (0) · 16.8 kB CSS (0) — — · — · —
TableSelectionToolbar 60.2 kB (0) · 11.9 kB CSS (0) — — · — · —
TextArea 53.4 kB (0) · 8.9 kB CSS (0) — — · — · —
TextInput 58.5 kB (0) · 10.0 kB CSS (0) — — · — · —
Thumbnail 55.1 kB (0) · 10.3 kB CSS (0) — — · — · —
Toast 64.6 kB (0) · 9.1 kB CSS (0) — — · — · —
Token 27.2 kB (0) · 4.7 kB CSS (0) — — · — · —
TopNavItem 12.5 kB (0) · 4.0 kB CSS (0) — — · — · —
TopNavMegaMenuItem 12.5 kB (0) · 4.2 kB CSS (0) — — · — · —
TopNavMenu 64.9 kB (0) · 10.0 kB CSS (0) — — · — · —
Banner 52.7 kB (−1 B) · 9.3 kB CSS (0) — — · — · —
BaseTypeahead 61.0 kB (−1 B) · 9.7 kB CSS (0) — — · — · —
BreadcrumbItem 75.3 kB (−1 B) · 11.4 kB CSS (0) — — · — · —
ChatLayoutScrollButton 51.2 kB (−1 B) · 8.9 kB CSS (0) — — · — · —
Lightbox 58.8 kB (−1 B) · 9.2 kB CSS (0) — — · — · —
MobileNav 60.5 kB (−1 B) · 9.4 kB CSS (0) — — · — · —
SideNavCollapseButton 51.5 kB (−1 B) · 8.8 kB CSS (0) — — · — · —
SideNavItem 60.7 kB (−1 B) · 9.9 kB CSS (0) — — · — · —
TopNav 62.1 kB (−1 B) · 9.7 kB CSS (0) — — · — · —
TopNavHeading 65.1 kB (−1 B) · 9.9 kB CSS (0) — — · — · —
TopNavMegaMenu 60.0 kB (−1 B) · 10.6 kB CSS (0) — — · — · —
MultiSelector 85.8 kB (−2 B) · 15.7 kB CSS (0) — — · — · —
SideNavHeading 65.7 kB (−2 B) · 10.0 kB CSS (0) — — · — · —
Tokenizer 79.4 kB (−2 B) · 17.2 kB CSS (0) — — · — · —
DropdownMenu 85.1 kB (−3 B) · 16.5 kB CSS (0) — — · — · —
ListItem 63.1 kB (−3 B) · 10.8 kB CSS (0) — — · — · —
Markdown 159.7 kB (−3 B) · 19.3 kB CSS (0) — — · — · —
Table 97.9 kB (−3 B) · 17.1 kB CSS (0) — — · — · —
TableHeaderCell 89.3 kB (−3 B) · 16.6 kB CSS (0) — — · — · —
TabMenu 62.1 kB (−3 B) · 9.9 kB CSS (0) — — · — · —
MoreMenu 85.4 kB (−4 B) · 16.5 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 73.7 kB (new) · 773 B CSS (new) — — · — · —
lab/ChatReactionBar 74.2 kB (new) · 1.1 kB CSS (new) — — · — · —
lab/CommentComposer 114.4 kB (new) · 1.9 kB CSS (new) — — · — · —
lab/CommentPin 52.3 kB (new) · 1.2 kB CSS (new) — — · — · —
lab/Comments 280.0 kB (new) · 2.5 kB CSS (new) — — · — · —
lab/CommentThread 274.2 kB (new) · 2.4 kB CSS (new) — — · — · —
lab/DiffViewer 77.0 kB (new) · 2.1 kB CSS (new) — — · — · —
lab/EmojiPicker 76.4 kB (new) · 722 B CSS (new) — — · — · —
lab/ListInput 90.1 kB (new) · 1.6 kB CSS (new) — — · — · —
lab/Schedule 97.6 kB (new) · 3.9 kB CSS (new) — — · — · —
lab/SelectableCardGroup 55.7 kB (new) · 162 B CSS (new) — — · — · —
lab/TourStep 66.0 kB (new) · 590 B CSS (new) — — · — · —
lab/TransferList 84.8 kB (new) · 1.7 kB CSS (new) — — · — · —
lab/TransferListSelector 92.0 kB (new) · 1.9 kB CSS (new) — — · — · —
richtext/RichTextEditor 288.1 kB (new) · 2.6 kB CSS (new) — — · — · —
richtext/RichTextEditorToolbar 238.8 kB (new) · 454 B CSS (new) — — · — · —
richtext/RichTextView 268.5 kB (new) · 2.3 kB CSS (new) — — · — · —

Package size: measured; main has no measurement of the merge base to compare yet.

API changes: cli +14 · ~5 · −0 (against the merge base's committed report)

Committed API report behind this build: cli 19 rows, core 23 rows; run pnpm api:report.

19 API changes (advisory)
Package Where Signature Usage
+ cli ./api · Types · type SearchResultEntry deprecated?: ComponentDeprecation | undefined import type {SearchResultEntry} from '@astryxdesign/cli/api'; const x: SearchResultEntry = {deprecated: …}
+ cli ./authoring · Types · interface ComponentDeprecation interface ComponentDeprecation import type {ComponentDeprecation} from '@astryxdesign/cli/authoring'
+ cli ./authoring · Types · interface ComponentIconSlotDoc interface ComponentIconSlotDoc import type {ComponentIconSlotDoc} from '@astryxdesign/cli/authoring'
+ cli ./authoring · Types · interface ComponentIconSlotStateDoc interface ComponentIconSlotStateDoc import type {ComponentIconSlotStateDoc} from '@astryxdesign/cli/authoring'
+ cli ./authoring · Types · interface MultiComponentDoc deprecated?: ComponentDeprecation import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {deprecated: …}
+ cli ./authoring · Types · interface SingleComponentDoc deprecated?: ComponentDeprecation import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {deprecated: …}
+ cli ./doc · Types · interface ComponentBaseDoc deprecated?: ComponentDeprecation import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {deprecated: …}
+ cli ./doc · Types · interface SubComponentDoc deprecated?: ComponentDeprecation import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {deprecated: …}
+ cli ./doc · Also exported from an earlier entry point · ComponentDeprecation ComponentDeprecation (./authoring) import {ComponentDeprecation} from '@astryxdesign/cli/doc'
+ cli ./doc · Also exported from an earlier entry point · ComponentIconSlotDoc ComponentIconSlotDoc (./authoring) import {ComponentIconSlotDoc} from '@astryxdesign/cli/doc'
+ cli ./doc · Also exported from an earlier entry point · ComponentIconSlotStateDoc ComponentIconSlotStateDoc (./authoring) import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/doc'
+ cli ./template · Also exported from an earlier entry point · ComponentDeprecation ComponentDeprecation (./authoring) import {ComponentDeprecation} from '@astryxdesign/cli/template'
+ cli ./template · Also exported from an earlier entry point · ComponentIconSlotDoc ComponentIconSlotDoc (./authoring) import {ComponentIconSlotDoc} from '@astryxdesign/cli/template'
+ cli ./template · Also exported from an earlier entry point · ComponentIconSlotStateDoc ComponentIconSlotStateDoc (./authoring) import {ComponentIconSlotStateDoc} from '@astryxdesign/cli/template'
~ cli ./api · Functions · function search function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "hook" | "theme" | "doc" | undefined; limit?: number | undefined }) => Promise<SearchResponse> → function search: (query: string, options?: { cwd?: string | undefined; type?: "template" | "component" | "doc" | "theme" | "hook" | undefined; limit?: number | undefined }) => Promise<SearchResponse> import {search} from '@astryxdesign/cli/api'; search(…)
~ cli ./authoring · Types · interface MultiComponentDoc theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } import type {MultiComponentDoc} from '@astryxdesign/cli/authoring'; const x: MultiComponentDoc = {theming: …}
~ cli ./authoring · Types · interface SingleComponentDoc theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } import type {SingleComponentDoc} from '@astryxdesign/cli/authoring'; const x: SingleComponentDoc = {theming: …}
~ cli ./doc · Types · interface ComponentBaseDoc theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } import type {ComponentBaseDoc} from '@astryxdesign/cli/doc'; const x: ComponentBaseDoc = {theming: …}
~ cli ./doc · Types · interface SubComponentDoc theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[] } → theming?: { container?: boolean; targets: ComponentThemingTarget[]; vars?: ComponentThemingVar[]; derived?: ComponentThemingDerivedVar[]; componentIcons?: ComponentIconSlotDoc[] } import type {SubComponentDoc} from '@astryxdesign/cli/doc'; const x: SubComponentDoc = {theming: …}

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@cixzhang

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/approve-spec fde5aca

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

Changes requested. The self-registration works as described: the new test fails on main and passes here. One sentence in the changeset still has to match what the change delivers.

  • The changeset says "a component still carries only the spring rows it uses", but sliderTouchController.ts, useSegmentedSelectionMotion.ts, createAnimator.ts and animatedLayout.ts still call registerSpringsTable(), so each of their bundles carries all 18 role rows; narrow the sentence to modules that do not call it, or delete those four calls, which now do nothing.

Optional cleanups: a few comments still say nothing registers on import (createAnimator.ts:215, useSegmentedSelectionMotion.ts:496-497, PickerWheel.tsx:162, animator.ts:157). The new JSDoc on springRole and registerSpringsTable could state the pure-annotation constraint and the bundle cost instead.

[Automated review]

'@astryxdesign/core': patch
---

[chore] Internal: each spring role, and the navigation, paging and picker motion tables, register themselves when their module loads, so a spring role plays at the theme's `tempo` wherever it plays, with no register call. A page that plays no spring ships no springs registry, and a component still carries only the spring rows it uses. Not exported from the package entry point.

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.

"a component still carries only the spring rows it uses" does not hold for the four modules that still call registerSpringsTable() (sliderTouchController.ts:275, useSegmentedSelectionMotion.ts:498, createAnimator.ts:216, animatedLayout.ts:146): that call walks SPRING_ROLES, so each of their bundles carries all 18 role rows. Narrow it, for example "a module that plays a role without calling registerSpringsTable() carries only the spring rows it uses", or delete those calls, which now do nothing.

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.

Narrowed in 13cfb6d: a module that imports single spring rows carries only those rows, unless it also reads the whole springs table or calls registerSpringsTable(). The four calls stay, as the existing callers keep them.

Comment on lines +585 to +587
* included, is not a role. Each role row already registers itself when a
* module that uses it loads, so a call adds nothing. It stays for the callers
* that make 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.

Non-blocking: "a call adds nothing" hides the call's cost: it puts all 18 role rows in the caller's bundle. Suggested: "Each role row registers itself when it loads, so a call registers nothing new. A call still puts all 18 role rows in the caller's bundle."

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.

Done in 13cfb6d, with that wording.

Comment on lines +34 to +36
* A spring row that is a motion role. A page that plays no spring ships no
* springs registry. Each spring role registers itself when the module that
* plays it loads (one idempotent in-memory write, no DOM).

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.

Non-blocking (comment wording): the first sentence restates the name, and the constraint that matters lives elsewhere. Suggested: "Registers the row as the role springs.<name> and returns it. Write each call with the pure annotation. A bundle that does not use the row then drops the call."

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.

Done in 13cfb6d, with that wording.

A module that reads the whole springs table, or calls
registerSpringsTable(), still carries every role row, so the changeset
says only modules that import single rows carry only those. The
comments that said nothing registers on import now say which tables
register as they load.
@cixzhang

cixzhang commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 13cfb6d

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

Approved pending CI: CI has not run on this head yet. It runs once the pull request is marked ready for review and a maintainer adds the ci:run label.

The changeset now matches what the change ships, and the new self-registration test fails on main and passes here.

  • Optional: sliderTouchController.ts and animatedLayout.ts no longer need their registerSpringsTable() calls; deleting them drops the role rows those bundles never use (18 to 4, and 18 to 1).

[Automated review]

Comment on lines +215 to +216
// The spring roles registered as their module loaded, so this call
// registers nothing new.

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.

Non-blocking: this comment explains a call that now does nothing. Deleting registerSpringsTable() here, with the comment, says it better; this module reads the whole springs table, so its bundle keeps the same rows either way.

Comment on lines +495 to +497
// The chase plays the shared `springs.fingerTracking` role, which
// registers as its module loads. The slide plays the segmented role, which
// registers here before the first animation. A second call does nothing.

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.

Non-blocking: the first sentence only explains why the registerSpringsTable() call below does nothing. Deleting that call leaves one sentence to keep: "The slide plays the segmented role, which registers here before the first animation."

@vjeux
vjeux marked this pull request as ready for review November 5, 2026 18:49
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 5, 2026
@cixzhang
cixzhang marked this pull request as draft November 5, 2026 19:17
@cixzhang
cixzhang marked this pull request as ready for review November 5, 2026 19:17

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

Approved pending CI: the CI workflow is still running on this head.

The self-registration test still fails on main and passes here, and every spring player keeps its current timing.

  • Optional: sliderTouchController.ts and animatedLayout.ts no longer need their registerSpringsTable() calls; deleting them drops the role rows those bundles never use (18 to 4, and 18 to 1).

[Automated review]

@cixzhang
cixzhang merged commit ab7facf into meta:main Nov 6, 2026
66 checks passed
@vjeux
vjeux deleted the uikit/f1-spring-roles-register branch November 6, 2026 00:17
cixzhang added a commit that referenced this pull request Nov 6, 2026
… the settle spring (#9924)

* test(DateInput): a tap, a key or the program turns the wheel on the settle spring

The wheel's main interaction is a gesture, so all its motion springs
(`spec:AST-094` FR45). A turn that a tap, a key or the program starts
now plays the shared `springs.settle` role from rest, instead of UIKit's
measured tap spin. These cases fail until the next commit. The waits for
a turn's end follow the spring's settle, and FR14's verification row
names the new cases.

* fix(DateInput): the wheel's tap, key and program turns play the settle spring

A turn onto a row that a tap, a key or the program starts plays
`springs.settle` from rest, resolved under the column, through the
wheel's spring curve. The flick's coast and the slow release's snap stay
as they are. The tap spin's curve no longer plays, so its curve function
and its test go; its duration stays the measured reference.

* test(TimeInput): the AM/PM turn proofs read the settle spring

The AM/PM column follows the hour through the wheel's program turn,
which now springs from rest on `springs.settle`. The proofs' oracle is
that spring over one row, and the turn's length is its settle. A finger
100 ms in still lands before the turn's middle. TimeInput FR7's
verification row follows the renamed title.

* docs(DateInput, AST-094): the wheel turn's gap closes in FR14 and FR45

FR14 already says a turn that a tap, a key or the program starts plays
`springs.settle` from rest (`spec:AST-094` FR45). With the turn on that
spring, FR14's implementation gap keeps only the scrolling column's
smooth scroll. FR45's gap and its table of the motion it moves no longer
list DateInput's sheet wheel.

* docs(DateInput): turnCurve's comment no longer restates its call

The JSDoc's last sentence named the role and the column the call below
already shows, so it goes.

* Merge main into the wheel turn for the spring roles' self-registration

Main's spring roles and picker table register themselves at import
(#10138). This change's wheel turns on springs.settle and no longer
reads the picker's tap spin. The merge keeps both. picker.ts registers
at import, and its comment names springs.settle as the wheel's turn.
PickerWheel's comment says the spring rows register as they load and
the scroll table does not.

* Merge branch 'main' into uikit/c21-wheel-turn-tokens

* Merge main into the wheel turn

This merge takes main at 3e8137f. #10314 moved the AM/PM busy proof
in TimeWheels.interaction.browser.spec.ts onto the harness's busy-window
control. This pull request changes only that file's turn oracle, its
titles and its comments, so both stand as written.

* docs(DateInput): split two long proof-header sentences

The headers of wheelPhysics.test.ts and the TimeWheels interaction spec
each ran one sentence past 25 words, 33 and 49. Each now reads as
sentences of one topic each. No test changes.

Co-authored-by: Cindy Zhang <cindyxz@meta.com>

This branch was successfully deployed

1 active deployment
Preview — 1c1ca097 Deployed Nov 5, 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