Skip to content

feat(storybook): add display primitive stories#18124

Open
myelinated-wackerow wants to merge 10 commits intodevfrom
feat/storybook-display-primitives
Open

feat(storybook): add display primitive stories#18124
myelinated-wackerow wants to merge 10 commits intodevfrom
feat/storybook-display-primitives

Conversation

@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

@myelinated-wackerow myelinated-wackerow commented May 5, 2026

Summary

Adds Storybook stories for the display primitives in src/components/ui/. This is PR 3 of 5 for #18121, scoped to display components. One commit per checkbox in the issue.

  • Tabs — Default, WithDisabledTab, ManyPanels (overflow scroll). Title UI / Primitives / Tabs.
  • Skeleton — Default block, Lines, CardContent, Card, CardGrid sub-components. Title UI / Skeleton.
  • Spinner — Default, Sizes (em-scaled), WithLabel, InsideButton. Title UI / Spinner.
  • Progress — Default, Colors (disabled|primary), Values (0/25/50/75/100), WithLabel. Title UI / Primitives / Progress.
  • Breadcrumb — TwoLevel, ThreeLevel, WithCurrentPage, WithEllipsis. Title UI / Primitives / Breadcrumb.
  • ScrollArea — VerticalScroll, HorizontalScroll (explicit ScrollBar orientation), ShortContent. Title UI / Primitives / ScrollArea.
  • List — Unordered, Ordered, Nested (mixed), PlainList. Title UI / List.
  • Collapsible — Closed, Open (defaultOpen), WithCustomTrigger (data-state icon swap), ListOfDetails. Title UI / Primitives / Collapsible.
  • TruncatedText — Default, OneLine, ThreeLines, FourLines, LineCounts (all 4 side-by-side), ShortText edge case. Title UI / TruncatedText.
  • Chart — BarUsage, LineUsage, AreaUsage (stacked), PieUsage, TooltipIndicators (dot|line|dashed), HiddenLabel. Title UI / Chart.

Title hierarchy follows the convention established in #18122 / #18123: UI / Primitives / [Name] for shadcn-regenerable primitives, UI / [Name] for app-canonical components with custom shapes.

Notes for review

  • Spinner has no built-in size prop; sizing is driven by font-size. Stories demonstrate scaling via Tailwind text-* utilities.
  • TruncatedText uses client-side useTranslation for the Show more / Show less label; Storybook's preview wires next-intl so the toggle works without per-story setup.
  • Collapsible WithCustomTrigger shows the canonical pattern for swapping chevrons via group-data-[state=open].
  • ScrollArea horizontal scrolling requires an explicit ScrollBar orientation='horizontal'; the default ScrollBar is vertical-only.
  • Breadcrumb uses the project's i18n-aware Link; the storybook preview wires next-intl so links render without errors.
  • Chart stories reference colors via var(--color-<key>) CSS variables generated from the config map — designers can recolor a chart by editing the config without touching the Recharts JSX.

Test plan

  • Eyeball each new story in Storybook (light + dark, locale toggle)
  • a11y addon passes for each story
  • Confirm TruncatedText toggle works with both Show more and Show less labels rendering

Refs: #18121

myelinated-wackerow and others added 9 commits May 4, 2026 20:18
Cover Default (3 tabs), WithDisabledTab, and ManyPanels (overflow scroll). Title hierarchy `UI / Primitives / Tabs` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Default block usage, SkeletonLines, SkeletonCardContent, SkeletonCard, and SkeletonCardGrid sub-components. Title hierarchy `UI / Skeleton` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Default, Sizes (em-scaled via text-* utilities), WithLabel, and InsideButton compositions. Title hierarchy `UI / Spinner` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Default, Colors (`disabled|primary`), Values (0/25/50/75/100), and WithLabel composition. Title hierarchy `UI / Primitives / Progress` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover TwoLevel, ThreeLevel, WithCurrentPage (BreadcrumbPage), and WithEllipsis (collapsed deep hierarchy). Title hierarchy `UI / Primitives / Breadcrumb` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover VerticalScroll, HorizontalScroll (explicit `ScrollBar orientation`), and ShortContent (no scrollbar). Title hierarchy `UI / Primitives / ScrollArea` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Unordered, Ordered, Nested (mixed ordered/unordered), and PlainList (no markers). Title hierarchy `UI / List` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Closed, Open (`defaultOpen`), WithCustomTrigger (asChild + data-state icon swap), and ListOfDetails composition. Title hierarchy `UI / Primitives / Collapsible` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover Default (2-line clamp), OneLine, ThreeLines, FourLines, LineCounts (all four side-by-side), and ShortText edge case. Title hierarchy `UI / TruncatedText` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 5, 2026

Deploy Preview for ethereumorg ready!

Name Link
🔨 Latest commit 09a0218
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/69fa6f0ff8b78100082f7897
😎 Deploy Preview https://deploy-preview-18124.ethereum.it
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
7 paths audited
Performance: 65 (no change from production)
Accessibility: 96 (no change from production)
Best Practices: 100 (no change from production)
SEO: 98 (🔴 down 1 from production)
PWA: 59 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Cover BarUsage, LineUsage, AreaUsage (stacked), PieUsage, TooltipIndicators (`dot|line|dashed`), and HiddenLabel. Each story uses `ChartContainer` with a `config` map and references colors via the generated `--color-<key>` CSS variables. Title hierarchy `UI / Chart` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
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