Skip to content

feat: add DigitPopIn and StatCard animate="digits"; prepare 0.1.0-alpha.23 - #51

Merged
YEONFEEL96 merged 1 commit into
mainfrom
feat/stat-card-digit-pop-in
Sep 23, 2026
Merged

YEONFEEL96 merged 1 commit into
mainfrom
feat/stat-card-digit-pop-in

Conversation

@YEONFEEL96

Copy link
Copy Markdown
Contributor

Adds DigitPopIn and StatCard's animate="digits", and prepares 0.1.0-alpha.23 so backend.ai-go can take it up. The feature and the release bump are one PR because the change is small; say so if you would rather have them split.

What changes

  • DigitPopIn (new, exported): renders formatted text one character at a time. Each character rises into place from a light blur after the one before it (500ms, 70ms stagger, spring easing), and a new text replays it. Screen readers get a plain copy of the text; the characters are aria-hidden. Under prefers-reduced-motion it renders plain text. The motion values are custom properties on the root.
  • StatCard: animate accepts boolean | "count" | "digits". true is still the count-up, so existing calls are unchanged. "digits" renders the value through DigitPopIn, and the value clips only sideways so the rising characters are not cut off.

Admission

  • Product-neutral: the props are a string and a class name.
  • Consumer: backend.ai-go's Statistics page, in its stat cards and in the latency-percentile and cowork numbers beside them, which are not cards. That second use is why the component is exported rather than kept inside StatCard.
  • Tests travel with it: DigitPopIn.test.tsx (per-character rendering, stagger index, accessible text, replay on change, no replay on same text, reduced motion) and new StatCard cases ("digits", string values, true unchanged).

Validation

  • pnpm run verify: typecheck, lint, format, boundary, 586 tests, build, pack check.
  • Installed as a packed tarball into backend.ai-go and checked in Chrome on the Statistics page, including a frame paused mid-animation. backend.ai-go's full suite passes on it after two consumer-side updates for changes since alpha.7 (DataTable resize handle labels, Drawer Escape timing).

…ha.23

DigitPopIn renders formatted text one character at a time, each rising
into place from a light blur after the one before it, and replays when
the text changes. Screen readers get the plain text; reduced motion gets
the plain text with no animation.

StatCard's animate now also takes "count" and "digits". true keeps the
count-up, so no existing call changes. backend.ai-go's Statistics page is
the consumer, in its stat cards and in the latency and cowork numbers
beside them.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@YEONFEEL96
YEONFEEL96 merged commit f5300fd into main Sep 23, 2026
3 checks passed
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