Skip to content

stop the toast loading spinner wobbling by spinning an icon instead of a glyph - #4813

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mt3twctt/agent-e27aaef5
Aug 22, 2026
Merged

stop the toast loading spinner wobbling by spinning an icon instead of a glyph#4813
atomantic merged 1 commit into
mainfrom
cos/task-mt3twctt/agent-e27aaef5

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • The loading toast rotated the character with animate-spin. Rotation is about the center of the span's line box, but a glyph's ink sits off that point (the font's ascent/descent padding is asymmetric), so it visibly wobbled instead of turning in place — obvious on "PortOS is restarting...", which spins for the whole restart.
  • Swapped it for lucide's Loader2 — the spinner the rest of the UI already spins (ConfirmButtonPair, TabPills) — whose arc is centered in a square viewBox.
  • A caller-supplied icon still overrides the spinner; success/error/warning glyphs are untouched (they don't rotate).

Test plan

  • client: npx vitest run src/components/ui/Toast.test.jsx src/a11yConventions.test.js src/components/apps/tabs/UpdateTab.test.jsx — 62 passing, including two new regression tests: the spinning element must be an svg (never a text glyph), and a caller icon must win over the spinner.
  • npx biome lint --error-on-warnings src/components/ui — clean.

…f a glyph

The loading toast rotated the '⟳' character with animate-spin. Rotation is about the center of the span's line box, but a glyph's ink sits off that point (the font's ascent/descent padding is asymmetric), so it visibly wobbled rather than turning in place — obvious on 'PortOS is restarting...', which spins for the whole restart.

Use lucide's Loader2, the spinner the rest of the UI already spins, whose arc is centered in a square viewBox. A caller-supplied icon still overrides it.
@atomantic
atomantic merged commit 5508727 into main Aug 22, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mt3twctt/agent-e27aaef5 branch August 22, 2026 03:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant