Repository navigation
fix(CircularProgress): the indeterminate ring turns with Spinner's rotor - #8256
Conversation
|
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 | Visual · A11y · RTL |
|---|---|---|---|
| ChatMessageList | 22.9 kB (+94 B) · 6.9 kB CSS (0) | — | — · — · — |
| DropdownMenuSubMenu | 58.6 kB (+91 B) · 9.3 kB CSS (0) | — | — · — · — |
| SideNav | 74.2 kB (+90 B) · 10.1 kB CSS (0) | — | — · — · — |
84 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Spinner · Storybook | 18.6 kB (+90 B) · 5.7 kB CSS (0) | 327 (+5) | — · — · — |
| lab/Schedule | 61.3 kB (+90 B) · 3.9 kB CSS (0) | — | — · — · — |
| CommandPaletteInput | 27.0 kB (+87 B) · 7.4 kB CSS (0) | — | — · — · — |
| ChatToolCalls | 26.0 kB (+84 B) · 8.2 kB CSS (0) | — | — · — · — |
| ChatSendButton | 46.4 kB (+83 B) · 8.7 kB CSS (0) | — | — · — · — |
| CheckboxInput | 49.3 kB (+83 B) · 8.7 kB CSS (0) | — | — · — · — |
| TopNavMenu | 59.8 kB (+83 B) · 9.9 kB CSS (0) | — | — · — · — |
| Typeahead | 63.9 kB (+82 B) · 11.2 kB CSS (0) | — | — · — · — |
| SideNavItem | 55.5 kB (+81 B) · 9.8 kB CSS (0) | — | — · — · — |
| CodeBlock | 59.8 kB (+79 B) · 10.0 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 84.0 kB (+79 B) · 1.9 kB CSS (0) | — | — · — · — |
| DropdownMenu | 74.8 kB (+78 B) · 16.0 kB CSS (0) | — | — · — · — |
| TopNavMegaMenu | 55.0 kB (+78 B) · 10.6 kB CSS (0) | — | — · — · — |
| ChatComposer | 62.1 kB (+77 B) · 10.6 kB CSS (0) | — | — · — · — |
| ChatComposerInput | 60.1 kB (+77 B) · 10.0 kB CSS (0) | — | — · — · — |
| ChatComposerTokenElement | 60.1 kB (+77 B) · 10.0 kB CSS (0) | — | — · — · — |
| ChatDictationButton | 46.5 kB (+77 B) · 8.8 kB CSS (0) | — | — · — · — |
| Stepper | 47.5 kB (+77 B) · 8.9 kB CSS (0) | — | — · — · — |
| ToggleButton | 46.8 kB (+77 B) · 8.8 kB CSS (0) | — | — · — · — |
| Carousel | 50.3 kB (+76 B) · 9.5 kB CSS (0) | — | — · — · — |
| TopNavHeading | 59.8 kB (+76 B) · 9.8 kB CSS (0) | — | — · — · — |
| lab/CommentComposer | 105.5 kB (+76 B) · 1.9 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 71.4 kB (+76 B) · 722 B CSS (0) | — | — · — · — |
| AppShell | 73.9 kB (+75 B) · 12.2 kB CSS (0) | — | — · — · — |
| DialogHeader | 48.7 kB (+75 B) · 10.2 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 76.8 kB (+75 B) · 16.1 kB CSS (0) | — | — · — · — |
| ContextMenu | 76.1 kB (+74 B) · 15.9 kB CSS (0) | — | — · — · — |
| SideNavCollapseButton | 46.8 kB (+74 B) · 8.8 kB CSS (0) | — | — · — · — |
| SideNavHeading | 60.4 kB (+74 B) · 10.0 kB CSS (0) | — | — · — · — |
| MobileNavToggle | 46.3 kB (+73 B) · 8.7 kB CSS (0) | — | — · — · — |
| IconButton | 46.0 kB (+72 B) · 8.7 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 55.5 kB (+72 B) · 11.8 kB CSS (0) | — | — · — · — |
| CommandPalette | 54.0 kB (+71 B) · 12.3 kB CSS (0) | — | — · — · — |
| Selector | 79.8 kB (+71 B) · 16.2 kB CSS (0) | — | — · — · — |
| lab/TourStep | 58.6 kB (+71 B) · 590 B CSS (0) | — | — · — · — |
| ChatLayoutScrollButton | 46.4 kB (+70 B) · 8.9 kB CSS (0) | — | — · — · — |
| Markdown | 146.8 kB (+70 B) · 18.8 kB CSS (0) | — | — · — · — |
| Tokenizer | 70.7 kB (+70 B) · 17.2 kB CSS (0) | — | — · — · — |
| Banner | 47.9 kB (+69 B) · 9.2 kB CSS (0) | — | — · — · — |
| Button | 45.9 kB (+69 B) · 8.7 kB CSS (0) | — | — · — · — |
| Calendar | 55.1 kB (+68 B) · 9.3 kB CSS (0) | — | — · — · — |
| ChatLayout | 49.1 kB (+68 B) · 9.3 kB CSS (0) | — | — · — · — |
| LayerProvider | 64.0 kB (+68 B) · 9.4 kB CSS (0) | — | — · — · — |
| TextArea | 48.3 kB (+68 B) · 8.8 kB CSS (0) | — | — · — · — |
| TopNav | 56.5 kB (+68 B) · 9.7 kB CSS (0) | — | — · — · — |
| BreadcrumbItem | 70.0 kB (+67 B) · 11.3 kB CSS (0) | — | — · — · — |
| lab/ChatEmojiPicker | 66.5 kB (+67 B) · 773 B CSS (0) | — | — · — · — |
| lab/DiffViewer | 72.0 kB (+67 B) · 2.1 kB CSS (0) | — | — · — · — |
| Popover | 52.7 kB (+66 B) · 12.8 kB CSS (0) | — | — · — · — |
| TableCell | 77.3 kB (+66 B) · 16.4 kB CSS (0) | — | — · — · — |
| TextInput | 53.6 kB (+66 B) · 9.9 kB CSS (0) | — | — · — · — |
| Toast | 60.2 kB (+66 B) · 9.0 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 67.0 kB (+65 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/TransferList | 76.4 kB (+65 B) · 1.7 kB CSS (0) | — | — · — · — |
| Lightbox | 53.2 kB (+64 B) · 9.1 kB CSS (0) | — | — · — · — |
| MobileNav | 55.0 kB (+64 B) · 9.3 kB CSS (0) | — | — · — · — |
| MoreMenu | 75.0 kB (+64 B) · 16.0 kB CSS (0) | — | — · — · — |
| DrawerHeader | 48.9 kB (+63 B) · 11.6 kB CSS (0) | — | — · — · — |
| lab/Comments | 265.7 kB (+62 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/ListInput | 82.5 kB (+62 B) · 1.6 kB CSS (0) | — | — · — · — |
| Pagination | 88.6 kB (+60 B) · 16.5 kB CSS (0) | — | — · — · — |
| Table | 85.4 kB (+60 B) · 16.6 kB CSS (0) | — | — · — · — |
| BaseTypeahead | 56.0 kB (+59 B) · 9.7 kB CSS (0) | — | — · — · — |
| MultiSelector | 73.7 kB (+58 B) · 15.4 kB CSS (0) | — | — · — · — |
| NumberInput | 55.7 kB (+58 B) · 10.2 kB CSS (0) | — | — · — · — |
| PowerSearch | 245.3 kB (+58 B) · 22.2 kB CSS (0) | — | — · — · — |
| AlertDialog | 87.1 kB (+56 B) · 13.1 kB CSS (0) | — | — · — · — |
| ComplexSelector | 56.3 kB (+56 B) · 10.5 kB CSS (0) | — | — · — · — |
| DateRangeInput | 71.8 kB (+56 B) · 11.2 kB CSS (0) | — | — · — · — |
| DateInput | 152.3 kB (+55 B) · 15.5 kB CSS (0) | — | — · — · — |
| TimeInput | 138.5 kB (+54 B) · 14.5 kB CSS (0) | — | — · — · — |
| FileInput | 54.4 kB (+52 B) · 9.7 kB CSS (0) | — | — · — · — |
| TabMenu | 57.1 kB (+52 B) · 9.9 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 260.4 kB (+51 B) · 2.4 kB CSS (0) | — | — · — · — |
| Switch | 89.0 kB (+49 B) · 9.5 kB CSS (0) | — | — · — · — |
| DateTimeInput | 174.4 kB (+48 B) · 17.2 kB CSS (0) | — | — · — · — |
| CheckboxListItem | 54.8 kB (+47 B) · 10.4 kB CSS (0) | — | — · — · — |
| ListItem | 54.0 kB (+45 B) · 10.4 kB CSS (0) | — | — · — · — |
| Thumbnail | 50.2 kB (+39 B) · 10.3 kB CSS (0) | — | — · — · — |
| Timestamp | 21.3 kB (+1 B) · 8.9 kB CSS (0) | — | — · — · — |
| lab/CircularProgress · Storybook | 8.6 kB (+175 B) · 881 B CSS (−258 B) | 574 (−23) | — · — · — |
| richtext/RichTextEditor | 278.9 kB (new) · 2.6 kB CSS (new) | — | — · — · — |
| richtext/RichTextEditorToolbar | 229.3 kB (new) · 454 B CSS (new) | — | — · — · — |
| richtext/RichTextView | 259.4 kB (new) · 2.3 kB CSS (new) | — | — · — · — |
Package size: measured; main has no measurement of the merge base to compare yet.
API changes: cli +8 · ~0 · −0 (against the merge base's committed report)
Committed API report behind this build: cli 8 rows, core 4 rows; run pnpm api:report.
8 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 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 |
./template · Also exported from an earlier entry point · ComponentDeprecation |
ComponentDeprecation (./authoring) |
import {ComponentDeprecation} from '@astryxdesign/cli/template' |
Wide change (shared styles: packages/core/src/theme/themeMotion.test.ts): 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.
The compositor layers do keep the indeterminate arc breathing through main-thread work in Chromium, but this can't be approved yet. The normalized geometry (a 209° peak at every size and exactly one turn per cycle) has no governing spec, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please rebase onto main and the dependency's current head, and address these:
- Drive the spin and the breathing with
stylex.keyframeson the same layers instead of Effect-started Web Animations, so the ring moves without script and follows a reduced-motion change (component-style-authoring INV2). - An interrupted value change restarts from the linear time fraction instead of the eased position, jumping back about 109° in the Storybook theme (
CircularProgress.tsx:647). - A lighter seam crosses the indeterminate arc where its two half-rings meet whenever the arc exceeds half a turn.
- The value-change effect should release its animations in its own cleanup (react-component-runtime INV3).
[Automated review]
| first != null && first.playState !== 'finished' | ||
| ? Number(timing?.progress ?? 1) | ||
| : 1; | ||
| from = running.from + (running.to - running.from) * progress; |
There was a problem hiding this comment.
progress is the running change's linear time fraction, but the arc is drawn on the theme's easing, so an interrupted change restarts from the wrong place: with the Storybook theme a 20% → 80% change interrupted at 30% of its time is drawn at about 246°, and the next change starts at 137°. Starting from running.ease(progress) fixes it; the dependency's branch already has that change.
| // the arc's start in another. Without script it rests as a quarter turn. | ||
| const spinRef = useRef<HTMLSpanElement | null>(null); | ||
| const tailRef = useRef<HTMLSpanElement | null>(null); | ||
| useLayoutEffect(() => { |
There was a problem hiding this comment.
These loops are fixed, size-independent animations that CSS can run (main used stylex.keyframes for both), so starting them from an Effect crosses component-style-authoring INV2: without script the ring is a still quarter arc, and a reduced-motion change while it is shown keeps the 1.5 s / 2 s clocks. stylex.keyframes on these same layers keeps them on the compositor.
| transitionTimingFunction: easeVars['--ease-standard'], | ||
| }, | ||
| fillIndeterminate: { | ||
| fillHalf: { |
There was a problem hiding this comment.
In the indeterminate ring these clip boxes sit inside the rotating spin and tail layers, so where the arc passes its own 6 o'clock both halves end in antialiased clip edges and a lighter hairline shows for about a quarter of each cycle. An unclipped patch across that junction, shown with the left half, would cover it as the caps cover the ends.
| const startRef = useRef<SVGPathElement | null>(null); | ||
| const shown = useRef(percentage); | ||
| const motion = useRef<FillMotion | null>(null); | ||
| useLayoutEffect(() => { |
There was a problem hiding this comment.
This effect starts four animations but returns no cleanup (react-component-runtime INV3), so a change running when the ring turns indeterminate is never cancelled. Cancelling in the cleanup after recording the eased drawn share would also make the separate unmount effect unnecessary.
There was a problem hiding this comment.
The compositor layers keep the indeterminate arc breathing through main-thread work in Chromium, and the seam and the restart jump are fixed, but this can’t be approved yet. The normalized geometry (a 209° peak at every size and exactly one turn per cycle) has no governing spec, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please address these:
- Drive the spin and the breathing with
stylex.keyframeson the same layers instead of Effect-started Web Animations, so the ring moves before hydration and follows a reduced-motion change (component-style-authoring INV2). - Release the value-change animations in that effect’s own cleanup (react-component-runtime INV3).
- Land #8232 first and rebase, so this diff carries only its own change instead of 2,252 lines.
[Automated review]
|
Posted by Cindy's agent on her behalf. Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:
This is about where the behavior lives, not about the PR's intent. |
|
Agreed: one implementation.
|
There was a problem hiding this comment.
The compositor layers keep the indeterminate arc breathing through main-thread work in Chromium, and a reduced-motion change now restarts the loops, but this can't be approved yet. The normalized geometry (a 209° peak at every size and exactly one turn per cycle) has no governing spec, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please address these:
- Drive the spin and the breathing with
stylex.keyframeson the same layers instead of Effect-started Web Animations, so the ring moves before hydration (component-style-authoring INV2). - Release the value-change animations in that effect's own cleanup (react-component-runtime INV3).
- Land #8232 first and rebase, so this diff carries only its own change instead of 2,455 lines.
- Finish the agreed move of reduced-motion handling onto the shared core queries from #8076.
[Automated review]
|
Done in f09677d, with 76eb58a from #8232 for the fill: the indeterminate clocks' and the fill's reduced-motion keys are the two shared queries, and the restart listens to the reduced-motion preference both queries share. This PR stays on main, so the queries are written out rather than imported; the keys stay literal, pinned to the resolver's constants by test, because the StyleX build gives imported at-rule keys a different priority. The value-change animations are now released in their effect's own cleanup (abd8005, from #8232). |
There was a problem hiding this comment.
The compositor layers keep the indeterminate arc breathing through main-thread work in Chromium, and the value-change animations are now released in their effect's own cleanup, but this can't be approved yet. Two behaviors have no governing spec: the normalized geometry (a 209° peak at every size and exactly one turn per cycle) and a determinate value change that lands at once under reduced motion on every pointer, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please address these:
- Drive the spin and the breathing with
stylex.keyframeson the same layers instead of Effect-started Web Animations, so the ring moves before hydration (component-style-authoring INV2). - Land #8232 first and rebase, so this diff carries only its own change instead of 2,537 lines.
[Automated review]
There was a problem hiding this comment.
The CSS keyframes keep the indeterminate arc breathing through main-thread work in Chromium, and it now turns before hydration, but this can't be approved yet. Two behaviors have no governing spec: the normalized indeterminate geometry (a 209° peak at every size and exactly one turn per cycle) and a determinate value change that lands at once under reduced motion on every pointer, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please land #8232 first and rebase, so this diff carries only its own change instead of 2,673 lines.
[Automated review]
There was a problem hiding this comment.
The CSS keyframes keep the indeterminate arc breathing through main-thread work in Chromium, and the new browser spec passes on this head, but this can't be approved yet. Two behaviors have no governing spec: the normalized indeterminate geometry (a 209° peak at every size and exactly one turn per cycle) and a determinate value change that lands at once under reduced motion on every pointer, so an engineering owner needs to record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please land #8232 first and rebase, so this diff carries only its own change instead of 2,644 lines, and point the ring-geometry exclusion in CircularProgress.a11y.states.ts at the test that replaced the removed dash-offset test.
[Automated review]
| }); | ||
|
|
||
| it('computes stroke-dashoffset from value', () => { | ||
| it("turns the fill's halves and leading cap from the value", () => { |
There was a problem hiding this comment.
CircularProgress.a11y.states.ts (the ring-geometry exclusion, lines 100–105) still names "CircularProgress.test.tsx size and dash-offset tests" as the owner of the ring geometry. With computes stroke-dashoffset from value removed, this test is the owner now; pointing the exclusion here, and describing the geometry as the half-rings' turns, keeps the accessibility binding's routing accurate.
|
Approval here waits on one owner decision: the indeterminate arc's geometry at each size, which no current record states. On main the dash's lengths are percentages of the ring's box, so the arc's peak and its turn per cycle vary with size: 221° and 382° at sm, 219° and 378° at md, 218° and 375° at lg. This branch measures the same keyframes in 302nds of a turn instead, so every size peaks at 209° and each cycle closes at exactly one turn. Should the record take the normalized geometry, or keep main's size-dependent one? On the stack order: this branch sits on #8232 on purpose, and the description's compare link shows only its own change (3 files). It rebases onto main when #8232 lands. The determinate change under reduced motion is #8232's, and its question is on #8232. |
There was a problem hiding this comment.
The CSS keyframes keep the indeterminate arc breathing through main-thread work in Chromium, and the new browser spec passes on this head, but this can't be approved yet. Two behaviors have no governing spec, the normalized indeterminate geometry (a 209° peak at every size and exactly one turn per cycle) and a determinate value change that lands at once under reduced motion on every pointer, so an engineering owner needs to provide or identify the spec that settles them and record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please address these:
- A value set after an indeterminate phase sweeps back from the old one (80%, then indeterminate, then 30% shows 80% running back to 30%), where main shows the new value at once (
CircularProgress.tsx:667-670). - Add the base-against-head element counts that
component-style-authoringINV7 asks for: each ring grows from 3 elements to 16 determinate and 18 indeterminate. - Land #8232 first and rebase, so this diff carries only its own change instead of 2,648 lines.
[Automated review]
| const drawn = useRef(percentage); | ||
| useLayoutEffect(() => { | ||
| const from = drawn.current; | ||
| if (isIndeterminate || from === percentage) { |
There was a problem hiding this comment.
While the ring is indeterminate this records the value it holds but never draws, so the first value after it animates from there: 80%, then indeterminate, then 30% paints 80% and sweeps back to 30% over the theme's duration, where main shows 30% at once. Returning without animating when the previous render was indeterminate (for example, drawn.current = null while indeterminate) keeps main's behavior.
| const angle = (frame: Keyframe) => | ||
| Number(/rotate\(([-\d.]+)deg\)/.exec(String(frame.transform))?.[1]); | ||
| // From 80% at rest (288deg), not from the stopped change's 40%. | ||
| expect(angle(cap[0])).toBeCloseTo(288, 5); |
There was a problem hiding this comment.
This pins the backward sweep after indeterminate: the next value starts at 80% (288°) and runs back to 30%. Main draws 30% at once; expecting no animation here would match it.
There was a problem hiding this comment.
This test now expects no animation after the indeterminate phase (it fails against the old effect), then a change starting from the 30% now drawn, at 108°.
|
The element counts are in the description now, measured from a render. On main a ring is 3 elements: the svg and its two circles. This branch's indeterminate ring is 18; #8232's determinate ring is 16, and its description says so. Each added element is one layer the compositor turns, one per role: per half, a clip and the half-ring it turns; the two round caps; and here, the spinning layer and the arc's start. |
There was a problem hiding this comment.
The CSS keyframes keep the indeterminate arc breathing through main-thread work in Chromium, but this can't be approved yet. Two behaviors have no governing spec, the normalized indeterminate geometry (a 209° peak at every size, exactly one turn per cycle and a quarter-arc rest) and a determinate value change that lands at once under reduced motion on every pointer, so an engineering owner needs to provide or identify the spec that settles them and record that decision by commenting /approve-spec followed by the full head commit SHA; as an engineering owner, the author may do so. Independently of that decision, please land #8232 first and rebase, so this diff carries only its own change instead of 2,658 lines.
[Automated review]
There was a problem hiding this comment.
Recommending approval: the indeterminate CircularProgress now turns on Spinner's shared rotor, an engineering owner has accepted that appearance on this head, and the earlier Lab typecheck break and stall wording are fixed. Spinner renders and times identically before and after the move, Core and Lab typecheck and build, and the Spinner and CircularProgress suites pass. One optional comment cleanup is suggested inline.
[Automated review]
| // Spinner's arc: the same fraction of the ring, starting at 12 | ||
| // o'clock. |
There was a problem hiding this comment.
Non-blocking: the first half restates SPINNER_ARC_FRACTION. Keeping only the reason for the turn is enough:
// The arc starts at 12 o'clock, as Spinner's does.Lab's indeterminate CircularProgress drew its own ring, with a rotation, a dash animation and timings of its own. It now turns with Spinner's rotor. The rotor moves into one Core module, Spinner/spinnerRotor.ts, and Lab reaches it through the internal entry @astryxdesign/core/internal/spinner-rotor. Both rings turn the same way on the compositor, with the same arc. The shared rotor keeps Spinner's iteration fix: one iteration holds 100 turns, and both durations, the reduced-motion one included, are 100 periods. spinnerRotor.test.tsx pins the keyframe and both durations.
6a027ab to
2f62d1e
Compare
|
/approve-spec 2f62d1e |
There was a problem hiding this comment.
Recommending approval, pending CI: CI has not run on this head yet, and it starts once the pull request is marked ready for review.
Lab's indeterminate CircularProgress now turns on Spinner's shared rotor (a fixed 135° arc at Spinner's speed and Reduce Motion rate, phase-locked with every Spinner), and an engineering owner has accepted that appearance on this head. Spinner renders identically before and after, and the new @astryxdesign/core/internal/spinner-rotor entry stays within Core's reserved internal subpaths.
[Automated review]
There was a problem hiding this comment.
This can't be approved yet: an engineering owner needs to accept the new indeterminate CircularProgress at this head.
- Lab's indeterminate CircularProgress now turns on Spinner's shared rotor (a fixed 135° arc at Spinner's speed and Reduce Motion rate, phase-locked with every Spinner); no current spec covers CircularProgress, and the pull request also changes Core, so the Lab exemption doesn't apply.
- An engineering owner accepted this ring on the previous head, and the latest commit only merges
mainwith the change itself identical, but an approval counts only for the exact head it names: an engineering owner records the decision by commenting/approve-specfollowed by the full head commit SHA, and the author may do so as an engineering owner.
Spinner renders identically before and after, CI passes on this head, and nothing else blocks. Optional: the comment at CircularProgress.tsx:685-686 can keep only the reason for the turn, // The arc starts at 12 o'clock, as Spinner's does.
[Automated review]
|
/approve-spec b7499a9 |
There was a problem hiding this comment.
Recommending approval: Lab's indeterminate CircularProgress now turns on Spinner's shared rotor (a fixed 135° arc at Spinner's speed and Reduce Motion rate, phase-locked with every Spinner), and an engineering owner has accepted that ring on this head.
Spinner renders and times identically before and after the move, the changed tests pass, Core and Lab build and typecheck, and CI passes on this head. Optional: the comment at CircularProgress.tsx:685-686 can keep only the reason for the turn, // The arc starts at 12 o'clock, as Spinner's does.
[Automated review]
Resolves the conflicts with meta#8177, meta#9936 and meta#8256 (Spinner's rotor, wake-once-per-100-turns and CircularProgress) and the adopters test's PowerSearch and InfoTip changes. The Spinner record takes main's FR3, system_specs and verification rows, with this branch's approved "indicator" wording, AST-017/AST-020 additions and announcement notes applied onto them.
…t channel (#7910) * fix(Spinner): share rendered-text announcements Use the shared rendered-text announcement path for Spinner while keeping composed indicators silent. Let Lab loading owners announce busy starts, including the Comments history dialog through its shared modal channel. Fixes #7855 Co-authored-by: Cindy Zhang <[email protected]> * Merge main to resolve PR #7910 conflicts Preserve Spinner's rendered-text fallback alongside owner-provided announcers, keep direct module imports, and retain Comments' persistent error region together with its busy-start announcement. * refactor(lab): reuse status announcements for busy loaders * Merge main to resolve PR #7910 conflicts Carry the approved Spinner contract to docs/specs/components while preserving the existing announcement changes and upstream Typeahead and Tokenizer updates. * Merge main into korkt-kim/fix-issue-7855 Resolves the conflicts with #8177, #9936 and #8256 (Spinner's rotor, wake-once-per-100-turns and CircularProgress) and the adopters test's PowerSearch and InfoTip changes. The Spinner record takes main's FR3, system_specs and verification rows, with this branch's approved "indicator" wording, AST-017/AST-020 additions and announcement notes applied onto them. * chore: comments give their reasons without record citations The comments this branch added cite knowledge records (spec IDs and FR numbers), which strict lint's no-comment-provenance rule rejects. Each now keeps only the reason it gives; the records still hold the requirements. Comments only: no code changes. * chore(lab): remove the old useStatusAnnouncement left by the merge This branch moved packages/lab/src/Comments/useStatusAnnouncement.ts to packages/lab/src/useStatusAnnouncement.ts; the merge of main brought the old copy back. Nothing imports it.
User impact
Part of making Astryx match iOS, whose progress indicators keep moving while an app is busy. An indeterminate CircularProgress turned on the compositor, but its arc grew and shrank through a dash animation that the main thread repaints every frame, so on a busy page the arc stopped growing and shrinking. Now it is exactly Spinner's ring: a fixed 135° arc on the same compositor turn, phase-locked with Spinner.
The owner's direction, mapped to the code
Both on the owner's motion-feel review page, card 20 (this pull request), 3 November: the first at 07:46 PT, the second at 07:49 PT.
packages/core/src/Spinner/spinnerRotor.ts: therotatekeyframe, its timing as main's Spinner runs it (100 turns per iteration over 100 periods of the slow-min token, 3 s per turn under Reduce Motion), and the timeline-origin pin (syncRotationPhase).Spinner.tsximports it; Spinner's behavior does not change.CircularProgress.tsx(Lab) imports the same module through the internal entry@astryxdesign/core/internal/spinner-rotor: the indeterminate ring takesspinnerRotorStyles.turnandsyncRotationPhase, and draws Spinner's arc fraction (SPINNER_ARC_FRACTION, 135°) on its own diameter, stroke and track.Authority
Lab: CircularProgress merges in Lab, and its design is reviewed when it is promoted to Core. Open until promotion: how the indeterminate ring relates to Spinner in a CircularProgress record, and Reduce Motion against
design:reduced-motion's scope.Changes
packages/core/src/Spinner/spinnerRotor.ts(new) andSpinner.tsx: the move. A Spinner test pins its arc toSPINNER_ARC_FRACTION(StyleX needs the literal inSpinner.tsx).spinnerRotor.test.tsx(new) pins the shared rotor: a 100-turn keyframe and both durations at 100 periods, Reduce Motion included.themeMotion.test.tsreads the pre-tempo duration where it now lives.packages/core/src/internal/spinner-rotor.ts(new internal entry, Core and Lab only) andpackage.jsonexports.packages/lab/src/CircularProgress/CircularProgress.tsx: the indeterminate ring.[chore] Internal:for Core. Spinner does not change.Testing
Rebased onto
main(67ad509) as one commit, carrying the 100-turn iteration into the shared rotor.packages/labbuild and typecheck.spinnerRotor.ts; none is for landing.pnpm review:pre: no findings. Strict ESLint, Prettier,sync-exports --checkand INV29 are clean.Phone check: the Storybook story
lab-circularprogress--indeterminateon this head's preview, against main.