Repository navigation
fix(core): the calls from rest that one frame commits start at one time - #10584
Conversation
Each animator dated a call from rest in its own frame callback, with its own read of the clock, so calls one frame committed started apart by as long as the callbacks between them ran. The first callback in a frame now reads the time, and every animator's callback in that frame takes that read.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC |
|---|---|---|
| Lightbox | 111.1 kB (+121 B) · 10.3 kB CSS (0) | — |
| BottomSheet | 65.2 kB (+92 B) · 7.5 kB CSS (0) | — |
| SegmentedControl | 92.4 kB (+92 B) · 6.8 kB CSS (0) | — |
30 more components
| Component | Size | LoC |
|---|---|---|
| Slider | 106.0 kB (+92 B) · 8.7 kB CSS (0) | — |
| Switch | 100.6 kB (+92 B) · 9.9 kB CSS (0) | — |
| DateInput | 182.4 kB (+82 B) · 16.7 kB CSS (0) | — |
| Popover | 87.7 kB (+82 B) · 13.9 kB CSS (0) | — |
| PowerSearch | 281.3 kB (+81 B) · 23.5 kB CSS (0) | — |
| DateTimeInput | 204.0 kB (+78 B) · 18.4 kB CSS (0) | — |
| TimeInput | 158.3 kB (+72 B) · 15.7 kB CSS (0) | — |
| DropdownMenu | 95.6 kB (+1 B) · 17.1 kB CSS (0) | — |
| ContextMenu | 106.2 kB (0) · 17.0 kB CSS (0) | — |
| Markdown | 179.4 kB (0) · 20.0 kB CSS (0) | — |
| MoreMenu | 95.9 kB (0) · 17.1 kB CSS (0) | — |
| MultiSelector | 93.6 kB (0) · 16.6 kB CSS (0) | — |
| Pagination | 108.2 kB (0) · 17.5 kB CSS (0) | — |
| Selector | 98.2 kB (0) · 17.1 kB CSS (0) | — |
| Table | 116.3 kB (0) · 17.7 kB CSS (0) | — |
| TableHeaderCell | 107.0 kB (0) · 17.2 kB CSS (0) | — |
| Tokenizer | 90.2 kB (0) · 18.3 kB CSS (0) | — |
| TableCell | 107.4 kB (−1 B) · 17.4 kB CSS (0) | — |
| lab/ChatEmojiPicker | 102.2 kB (new) · 773 B CSS (new) | — |
| lab/ChatReactionBar | 103.3 kB (new) · 1.1 kB CSS (new) | — |
| lab/CommentComposer | 144.2 kB (new) · 1.9 kB CSS (new) | — |
| lab/Comments | 324.7 kB (new) · 2.5 kB CSS (new) | — |
| lab/CommentThread | 319.6 kB (new) · 2.4 kB CSS (new) | — |
| lab/NavigationScreen | 79.5 kB (new) · 1.5 kB CSS (new) | — |
| lab/NavigationStack | 79.5 kB (new) · 1.5 kB CSS (new) | — |
| lab/PageControl | 72.7 kB (new) · 709 B CSS (new) | — |
| lab/TabBar | 74.0 kB (new) · 1.8 kB CSS (new) | — |
| lab/TabBarItem | 3.8 kB (new) · 1.8 kB CSS (new) | — |
| lab/TourStep | 94.0 kB (new) · 590 B CSS (new) | — |
| richtext/RichTextEditorToolbar | 250.1 kB (new) · 454 B CSS (new) | — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +14 · ~7 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 21 rows, core 33 rows; run pnpm api:report.
21 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 |
./api · Types · type SwizzleCopyResponse |
data: { component: string; package: string; outputDir: string; filesCopied: number; files: string[]; usesStyleX: boolean; feedback?: SwizzleFeedback | undefined } → data: { component: string; package: string; outputDir: string; filesCopied: number; files: string[]; usesStyleX: boolean; dependencies: Record<string, string>; feedback?: SwizzleFeedback | undefined } |
import type {SwizzleCopyResponse} from '@astryxdesign/cli/api'; const x: SwizzleCopyResponse = {data: …} |
| ~ | 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 |
./authoring · Types · type TemplateCategory |
type TemplateCategory = | 'Dashboard - Analytics' | 'Dashboard - Comparison' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Sco … #e7c18378 → type TemplateCategory = | 'Dashboard - Analytics' | 'Dashboard - Comparison' | 'Dashboard - KPI Summary' | 'Dashboard - Monitoring' | 'Dashboard - Executive Summary' | 'Dashboard - Sco … #a8be998f |
import type {TemplateCategory} from '@astryxdesign/cli/authoring' |
| ~ | 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: …} |
Not run on this PR: add ci:run-visual, ci:run-a11y or ci:run-rtl to run them.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Requesting changes for one wording fix. The fix itself checks out: the new unit and Chromium tests fail on main and pass here. Two calls from rest that one frame commits now share one start (3.1–3.4 ms apart before, 0 after), as spec:AST-108 FR4a requires.
- The changeset (
.changeset/motion-one-frame-one-start.md) and the title say every motion that starts in the same frame now starts at one time. A call on an element that is already moving still starts at its own clock read: in Chromium, two moving boxes retargeted by two frame callbacks around a 3 ms callback start about 4 ms apart. Please scope both to calls from rest, for example "elements that start moving from rest in the same frame now start at one time".
CI has not run on this head yet: it is a draft from a fork, and a maintainer adds the ci:run label so CI runs.
[Automated review]
A call on a moving element keeps its own clock, so the changeset, the frame read's comment and the two test titles now say calls from rest.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. A maintainer adds the ci:run label so CI runs.
The wording fix is in: the changeset and the title now scope the change to calls from rest, which matches what the code does. The fix itself checks out: the new unit and Chromium tests fail with main's animator, where two calls from rest start 3.1–3.3 ms apart for the whole motion, and pass here with one shared start, as spec:AST-108 FR4a requires.
One optional wording suggestion for the frameTime comment is inline.
[Automated review]
| * before them does not move their start. A call on a moving element keeps | ||
| * its own clock. The read ends with the frame's task, so a frame |
There was a problem hiding this comment.
Optional: this sentence holds for the default start only. A call on a moving element with start: 'commit' skips the at-rest check (for (const channel of start === 'commit' ? [] : channels)), gets a start group, and its first-frame callback takes this shared read too. No production caller passes 'commit' today, so nothing breaks; suggested wording:
A call on a moving element keeps its own clock, unless it asks for start: 'commit'.
Stack: #10584 → #10568
User impact
Elements that start moving from rest in the same frame, such as a carousel's pages as they settle, could start at different times. Each animator read the clock in its own frame callback to date its start. A callback between two of them delayed the later one. In Chromium, a 3 ms callback between two calls kept their animations 3.1 to 3.3 ms apart for the whole motion.
Problem and solution fit
Expected behavior and authority
spec:AST-108FR4a: animations that run together "start and land together". The animator's contract: one motion's parts made as separate calls start together (TaskMark). A browser commits a frame's pending animations at one time.Smallest restoration
frameTime(frame): one read per frame timestamp, where the first-frame callback dates a call and its channels' interim reads. The read clears at the next task, so a source that repeats a timestamp still reads each frame anew.requestFramepasses the frame's timestamp on; a frame source without one reads the clock, as before.spec:AST-094FR6); a later frame reads anew. No API, curve or timing value changes.Evidence
Scope
Testing
uiproject (22,482 tests).