Skip to content
SprecherEast
Issue 707

Fact tabs break the alignment baseline on the real post: gap, extra detail line, mid-phrase wrap

Back to our plan
Done
bugfrontendstylinguxpriority: highshared-component

What and why

The Fact tabs on the 2027 City budget post (shipped in #705) break the owner's symmetry and alignment baseline, which is now part of the design guidelines (#679). Seen on the live post on 2026-11-05 (desktop and phone screenshots from the owner):

  1. The inactive tabs float 16px above the open panel. That gap is unexplained and wider than the 8px between the tabs, so the tab row looks detached from the box (baseline items 3 and 13).
  2. Only the third tab shows a detail line ("The City's release says about $7 a month"). Its card is taller than the others, which are left with empty space, so the tabs do not share the same parts (items 6 and 15).
  3. On a phone the figure "+$90 a year" breaks as "+$90 a / year", in the middle of a phrase (items 11 and 15).

Why it shipped: the test post used in review (alignment-check) had no detail line on a tab and no long figure, so the checks passed. Review used that post, not the real one.

Acceptance criteria

  • The space between the tab row and the panel equals the space between tabs, at every width.
  • A fact tab shows the same parts on every tab (label, figure, how sure we are); the detail line is not part of a tab and is shown in that fact's open panel, so nothing is lost.
  • A figure never breaks between "a" and its noun ("+$90" / "a year"), and no tab is taller than its content needs.
  • The test post carries the real shapes (a tab with a detail line, a figure like "+$90 a year"), and e2e/alignment.spec.ts fails on: a gap different from the tab gap, a tab with parts the others lack, and a figure that breaks mid-phrase. Tests are written first and seen failing.
  • Screenshots of the real post at 320, 430, 768, 1024, 1280 and 1920 px, light and dark, show no gap, extra text or uneven card.
  • Folder-tab curves and the one-row phone layout from #704 are unchanged in look.

Files likely touched

  • src/platform/ui/Tabs.client.tsx and its tests
  • src/platform/richtext/editorial/FactCard.tsx, FactTabs.tsx and their tests, factTabsFixtures.ts
  • e2e/alignment.spec.ts, e2e/support/alignmentPage.ts
  • docs/ui/component-set.md, the dev gallery files for Tabs

Must not touch

  • src/payload-types.ts, src/migrations/, anything under src/modules/
  • Process files (AGENTS.md, CLAUDE.md, .agents/, .claude/, .github/, docs/guidelines/, docs/process/)

Notes

Shared component (src/platform/ui, richtext). Follow-up to #704; the sliding animation stays in #706.


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab