Skip to content

feat(storybook): add layout & navigation primitive stories#18125

Merged
pettinarip merged 7 commits into
devfrom
feat/storybook-layout-nav-primitives
May 18, 2026
Merged

feat(storybook): add layout & navigation primitive stories#18125
pettinarip merged 7 commits into
devfrom
feat/storybook-layout-nav-primitives

Conversation

@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

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

Summary

Adds Storybook stories for the layout & navigation primitives in src/components/ui/. This is PR 4 of 5 for #18121, scoped to layout and nav components. One commit per checkbox in the issue.

  • Section — Default, ResponsiveFlex, TabNavScrollMargin, TagVariants. Covers SectionBanner, SectionTag (pill|plain), SectionHeader, SectionContent sub-components. Title UI / Section.
  • TabNav — Default, WithIcons, Controlled (state-driven), WithMotion (Framer Motion layoutId), Sticky (wrapped in StickyContainer). Title UI / TabNav.
  • Flex — One story per primitive: FlexBase, CenterBase, StackBase, StackWithSeparator, HStackBase, VStackBase, HStackWithSeparator, VStackWithSeparator. Title UI / Flex.
  • LinkBox — Default whole-card-clickable, WithNestedInteractive (z-index escape hatch), ExternalLink (!static override). Title UI / LinkBox.

Reverted

  • SvgButtonLink story was added in 1badfde and reverted in 36f2f91. Component is being removed in a separate cleanup; the story would be orphaned, so it shouldn't ship.

Notes for review

  • All four live under UI / [Name] (no Primitives / segment) since each is a custom app component, not a vanilla shadcn re-export.
  • TabNav Controlled story uses an inner ControlledTabs component to host React state -- args.onSelect alone won't trigger re-renders without component-local state.
  • LinkBox WithNestedInteractive uses BaseLink for the inner badge to satisfy @next/next/no-html-link-for-pages (raw <a href="/dapps"> would fail lint).

Test plan

  • Eyeball each new story in Storybook (light + dark, locale toggle)
  • a11y addon passes for each story
  • Confirm TabNav WithMotion highlight animates between tab clicks

Refs: #18121

myelinated-wackerow and others added 5 commits May 4, 2026 20:24
Cover Default, ResponsiveFlex (`variant: responsiveFlex`), TabNavScrollMargin (`scrollMargin: tabNav`), and TagVariants (`pill|plain`). Includes SectionBanner, SectionTag, SectionHeader, and SectionContent sub-components. Title hierarchy `UI / Section` 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, WithIcons, Controlled (state-driven via `onSelect`), WithMotion (animated highlight via Framer Motion `layoutId`), and Sticky (wrapped in `StickyContainer`). Title hierarchy `UI / TabNav` 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 FlexBase, CenterBase, StackBase, StackWithSeparator, HStackBase, VStackBase, HStackWithSeparator, and VStackWithSeparator. One story per primitive variant per the issue. Title hierarchy `UI / Flex` 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 (whole-card-clickable), WithNestedInteractive (z-index escape hatch for inner controls), and ExternalLink (`!static` override on `LinkOverlay` so the `before:absolute` overlay still anchors to `LinkBox`). Title hierarchy `UI / LinkBox` 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, VariantRow, VariantCol, VariantsCompared (side-by-side), VariousIcons (Lucide examples), LabelOnly, and ChildrenOnly. Title hierarchy `UI / SvgButtonLink` per #18121.

Lucide icons are adapted via a small `asIcon` cast because the component's `Svg: FC<SVGProps<SVGElement>>` signature is narrower than Lucide's ref-typed components. A future cleanup could widen the prop type to accept Lucide directly.

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 ac0918c
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a0470b73392a00008800bca
😎 Deploy Preview https://deploy-preview-18125.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: 67 (🟢 up 2 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.

Reverts 1badfde. Component is being removed in a separate cleanup; story shouldn't ship.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Per team decision to keep the Chromatic snapshot budget controlled
while these primitives get visual reference in Storybook. Snapshots
can be re-enabled per-story once we assess which views need
regression coverage.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
@pettinarip pettinarip merged commit cdaa069 into dev May 18, 2026
15 checks passed
@pettinarip pettinarip deleted the feat/storybook-layout-nav-primitives branch May 18, 2026 13:36
@claude claude Bot mentioned this pull request May 22, 2026
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.

2 participants