feat: Key facts: icon on the same line as the label
Back to our planProblem
In plain words: the fact cards put a big icon on its own line above the label, which uses space for little. The icon should sit on the same line as the label.
Summary of the owner's feedback (2026-11-03, Claude in Chrome side panel, text) on the first version of the 2027 budget post: the title is too long and the explanation under it is confusing; the amounts are not grouped in consistent categories, and they don't show how much of the total each one makes up or how this year compares with last year; the icons sit above the text, and the subheader could share a line with the icon. Most importantly, there are not enough visual cues for anyone to follow what is going on, so more diagram elements, charts, infographics and other UI elements are needed, with inventive, unconventional thinking, as if written by someone on a small marketing project who knows nothing about taxes. Design spec and numbers: see #645 and the epic #589.
Today (checked 2026-11-03): KeyFacts.tsx (#509) draws a size-6 icon on its own row, then the label and value. The card is about 32px taller than it needs to be, which matters on a phone and for the one-screen rule.
Proposed fix
- Row 1: icon (
size-5) beside the label (text-sm, muted), on one line; row 2: the value. Thedt/ddreading order (label before value) stays. - Pull out
FactCard.tsxand the field group askeyFactFields()(fromkeyFactsBlockConfig.ts) so the Fact tabs block can reuse both (build once, reuse everywhere). - Move
certainty.tstosrc/platform/lib/certainty.ts(re-exported from the editorial folder) because Chart will share it. - Native first: our own component; nothing in Payload or Next applies. Watch out: every post with a Key facts block changes; check the I-94 post and any gallery entry.
Acceptance criteria
- Not done: The icon sits on the label's line at 320, 430, 768 and 1280, light and dark (screenshots in the PR); no overflow with the longest allowed label (60 characters).
- Not done: Existing tests still pass; axe passes; screen-reader order is still label, then value.
- Not done: The I-94 post's facts render correctly.
- Not done: The
component-set.mdrow for Key facts is updated.
Area
frontend, ux
Priority
high
Generated by Claude Code, opens in a new tab