Skip to content

feat(storybook): add overlay primitive stories#18122

Merged
pettinarip merged 9 commits into
devfrom
feat/storybook-overlay-primitives
May 13, 2026
Merged

feat(storybook): add overlay primitive stories#18122
pettinarip merged 9 commits into
devfrom
feat/storybook-overlay-primitives

Conversation

@myelinated-wackerow
Copy link
Copy Markdown
Collaborator

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

Summary

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

  • Dialog — vanilla shadcn primitive (UI / Primitives / Dialog)
  • Modal — expanded existing story to cover all sizes/variants/actionButton (UI / Modal)
  • Sheet — sides, hideOverlay, header/footer composition (UI / Primitives / Sheet)
  • Popover — alignment variations, rich content, explicit close (UI / Primitives / Popover)
  • DropdownMenu — submenus, checkbox/radio items, separators (UI / Primitives / DropdownMenu)
  • Select — placeholder, groups, disabled, error, disabled item (UI / Primitives / Select)
  • PersistentPanel — sides, lazy-mount + persistence probe (UI / PersistentPanel)
  • Command — default, groups, separators, shortcuts, disabled item, empty state, kbd-shortcut input, custom icon, CommandDialog (UI / Primitives / Command)

All new files live in src/components/ui/__stories__/ to match Modal.stories.tsx, Button.stories.tsx, etc. Title hierarchy is UI / [Name] for canonical app components and UI / Primitives / [Name] for shadcn-regenerable primitives.

Notes for review

  • Vanilla Dialog doesn't expose hideOverlay or size props (only Sheet and Modal do); the Dialog story shows width via className override and points designers at Modal for canonical app sizing.
  • Select has no built-in hasError variant — the error story applies border-error directly and flags this as a candidate for a future cleanup PR (would mirror Input/Textarea).
  • card.stories.tsx location/expansion is out of scope here; separate concern.

Test plan

  • Eyeball each new story in Storybook (light + dark, locale toggle)
  • a11y addon passes for each story

Refs: #18121

myelinated-wackerow and others added 7 commits May 4, 2026 18:40
Vanilla shadcn Dialog with stories for default usage, header+footer composition, width override via className, and long-form scrollable content. Title hierarchy `UI / Primitives / Dialog` per #18121.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Add stories for `size: md|lg|xl`, `variant: simulator|unstyled`, and the no-`actionButton` variant. Retitle to `UI / Modal` 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 `side: top|bottom|left|right`, `hideOverlay`, and a header+body+footer composition. Title hierarchy `UI / Primitives / Sheet` 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 the three `align` options (`start|center|end`) side-by-side, plus default, rich-content, and explicit-close compositions. Title hierarchy `UI / Primitives / Popover` 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 simple menu, submenus, checkbox items, radio items, and separator/label/shortcut composition. Title hierarchy `UI / Primitives / DropdownMenu` 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 placeholder, default-value, grouped items with labels and separators, disabled state (with and without value), error state via className override, and disabled-item composition. Title hierarchy `UI / Primitives / Select` per #18121.

Note: `Select` has no built-in `hasError` variant; the error story applies `border-error` directly. A future cleanup PR could add the variant to match `Input`/`Textarea`.

Refs: #18121

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Cover default usage, all four sides, and a render-count probe demonstrating that children persist across open/close cycles. Title hierarchy `UI / PersistentPanel` per #18121.

Stories use a controlled wrapper since `PersistentPanel` is controlled-only (no `defaultOpen`). Component description contrasts with `Sheet`'s mount-on-open behavior so designers can see the difference at a glance.

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 c973027
🔍 Latest deploy log https://app.netlify.com/projects/ethereumorg/deploys/6a046fd1db59de000856eba5
😎 Deploy Preview https://deploy-preview-18122.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.

myelinated-wackerow and others added 2 commits May 5, 2026 15:26
Cover Default, WithGroups, WithSeparators, WithShortcuts, WithDisabledItem, Empty (preset filter triggering CommandEmpty), InputWithKbdShortcut (kbd hint instead of search icon), InputWithCustomIcon, and AsDialog (`CommandDialog` modal palette). Title hierarchy `UI / Primitives / Command` per #18121.

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 existing 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 9eb4d45 into dev May 13, 2026
15 checks passed
@pettinarip pettinarip deleted the feat/storybook-overlay-primitives branch May 13, 2026 15:42
@pettinarip pettinarip mentioned this pull request May 15, 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