Make the selected Fact tab and its content one folder-shaped outline (like the MSN weather tabs)
Back to our planProblem
In plain words: the Fact tabs now look pressable, but the selected tab and its content are still two separate boxes with a gap between them and a small arrow bridging the gap. It still reads as disconnected, and the arrow sticks out of the rounded shapes. On a phone the tabs are a 2 by 2 grid, so a tab in the top row is separated from its content by the bottom row.
Summary of the owner's request (Amine, 2026-11-05 evening, Claude in Chrome side panel, text, with the MSN weather hourly tabs as the model): drop the arrow that sticks out of the rounded boxes; let the outline curve from the content into the selected tab, around the tab and back down, like ordinary folder tabs; when the selected tab changes, the highlight should travel the same way, so the tab and its content never look disconnected; on a phone, reduce text or space so it still works. He approved the plan below the same evening (text).
Proposed fix
In the shared Tabs component (src/platform/ui/Tabs.client.tsx), so every tabs use gets it:
- Folder tab,
smand up: the selected tab and its panel are one shape. No gap and no line between them. The panel's outline runs along its top edge, curves up into the tab with a concave flare, goes over the tab's rounded top corners, down the other side and curves back out into the panel's top edge. The unselected tabs stay separate raised cards. The notch is removed. - Panel corners: the panel's top-left corner is square when the first tab is selected, and its top-right corner is square when the last tab is selected, so the outline flows straight up into the tab.
- Phone: one row of four compact tabs (icon and figure; the label is already the panel's heading), so the same folder shape works at every width. Checked at 320 and 430 px; a figure too wide for its tab wraps onto two lines.
- Theme tokens only, light and dark; the frame edge stays full strength for 3:1 (WCAG 1.4.11); works with scripting off.
- Follow-up, not this issue: the sliding animation, where the connection travels from the old tab to the new one.
Findings (native first): Radix Tabs already gives roles and keyboard use; CSS pseudo-elements with radial gradients draw the concave flares, so no new package and no inline SVG.
Acceptance criteria
- Not done: The selected tab and its panel read as one outlined shape on
smand up: no gap, no line between them, curves flare into the panel's top edge on both sides. - Not done: No arrow or notch remains.
- Not done: The panel's top corner under the first or last tab is square when that tab is selected; rounded otherwise.
- Not done: On a phone the tabs are one row and the same folder shape applies; nothing overflows at 320 px.
- Not done: Unselected tabs still look pressable (raised, hover) and the selected tab keeps the glassy green; text 4.5:1 and edges 3:1 in light and dark.
- Not done: With scripting off, panels still read stacked under their headings.
- Not done: Tests first; axe passes;
docs/ui/component-set.mdupdated; thee2e/alignment.spec.tschecks still pass. - Not done: Screenshots of the budget post at the six widths, light and dark, on the PR.
Files likely touched
src/platform/ui/Tabs.client.tsx, src/platform/ui/Tabs.client.test.tsx, src/platform/richtext/editorial/FactCard.tsx (compact tab on a phone), src/platform/richtext/editorial/FactTabs.tsx, src/platform/richtext/editorial/FactTabs.test.tsx, src/app/(frontend)/dev/gallery/TabsGallery.tsx, docs/ui/component-set.md, e2e/alignment.spec.ts.
Must not touch
Theme tokens (src/themes/, src/platform/theme/), content data, Payload config and migrations.
Generated by Claude Code, opens in a new tab