feat(storybook): expand existing /ui/ stories#18126
Open
myelinated-wackerow wants to merge 16 commits into
Open
feat(storybook): expand existing /ui/ stories#18126myelinated-wackerow wants to merge 16 commits into
myelinated-wackerow wants to merge 16 commits into
Conversation
Move from `src/components/ui/card.stories.tsx` to `src/components/ui/__stories__/Card.stories.tsx` to match convention. Retitle to `UI / Card`. Add Default, BannerSizes (`full|thumbnail`), TitleWeights (`semibold|bold|black`), ParagraphVariants, HeroCard composite, and LinkCard composite (showing hover-group propagation). Existing BannerBackgrounds and BannerFit stories carried over. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Tag`. Replace status/variant/size matrices with focused per-axis stories: Statuses (all 12), Variants (all 4), Sizes (small/medium). Add StatusVariantMatrix grid for spotting regressions, Buttons story (`TagButton`), and InlineText story (`TagsInlineText` with delimiter/max/variant variants). Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Table`. Replace combined-render kitchen-sink with one focused story per variant: Simple, Minimal, SimpleStriped, MinimalStriped, Product, HighlightFirstColumn (the two new variants per #18121). MockDocContent retained for realistic markdown-table composition. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Alert`. Add Default (single variant), WithIcon (`AlertIcon` + lucide), WithEmoji (`AlertEmoji`), and SizeFull (banner) stories. Existing Variants and WithCloseButton stories updated to include all five variants in focused renders. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Button`. Add Default, Sizes (`lg|md|sm`), SizeVariantMatrix grid, IsSecondary (showing no-op on solid/link), and AsChild (anchor wrapping). Existing Variants (renamed from StyleVariants), IconVariants, and MultiLineText stories preserved. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / ButtonLink`. Add Default, Variants, Sizes, IsSecondary, and three auto-detection stories (ExternalLink, FileDownload, HashLink) covering BaseLink's automatic behaviors. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / ButtonTwoLines`. Add Default, Variants (`solid|outline`), Sizes (`md|sm`), VariantSizeMatrix, IconAlignmentEnd, ReverseTextOrder, and VariousIcons stories. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / ButtonLinkTwoLines`. Add Default, Variants, Sizes, VariantSizeMatrix, ExternalLink, FileDownload, and ReverseTextOrder stories. Mirrors the ButtonTwoLines coverage with link auto-detection behaviors layered on top. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Link`. Add focused stories for the three exports: InlineLink (in-prose, with visited), BaseLink (no visited), LinkWithArrow (RTL-flipping arrow). Add ExternalDetection, MailtoDetection, FileExtensionDetection, HashLink stories covering BaseLink's auto-detect behaviors. LinkList composition retained. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Rename `accordion.stories.tsx` to `Accordion.stories.tsx` to match the PascalCase convention used by every other file in `__stories__/`. Retitle to `UI / Accordion`. Add SingleCollapsible, Multiple, HideIcon, CustomTrigger, and RtlChevron stories. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / EdgeScrollContainer`. Rename `Basic` -> `Default`. Replace `AsChildExample`'s raw anchor with a `<button>` (no `@next/next/no-html-link-for-pages` lint hit). Add CustomSpacing and FewItems stories. Component description documents the CSS-variable props. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Retitle to `UI / Avatar`. Reorganize existing stories (Sizes, WithLabel, Group, BrokenImageFallback) and add focused sub-component stories: BasePrimitives (`AvatarBase` + `AvatarImage` + `AvatarFallback` for custom compositions) and FallbackOnly (`AvatarFallback` without image source). Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
❌ Deploy Preview for ethereumorg failed.
|
Retitle to `UI / TerminalTypewriter`. Add StaticMessages, SingleMessage (loops on a single string), LongMessage (wrap behavior), and Empty (no-render safety check). Existing translated-messages Default retained. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Component is being removed in a separate cleanup; story shouldn't ship. Replaces the expansion in 6d14f79 and the original story file that lived on dev. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
Component is being removed in a separate cleanup; story shouldn't ship. Replaces the expansion in b3d293e and the original story file that lived on dev. Refs: #18121 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Co-Authored-By: wackerow <54227730+wackerow@users.noreply.github.com>
This was referenced May 6, 2026
For the expand-existing-stories PR, preserve regression coverage on stories whose names match what existed on dev (Alert/Variants, Avatar/BrokenImageFallback, Button/IconVariants, etc.) and disable snapshots only on truly new exports. Files where every export is renamed/new (Accordion, Card, ButtonLink, Tag) get a meta-level disable. 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
reviewed
May 18, 2026
Member
pettinarip
left a comment
There was a problem hiding this comment.
@myelinated-wackerow looks fine overall. Just some duplicated paramters entries on some stories.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Expands the existing Storybook stories for
src/components/ui/primitives to meet the "see every variant" standard. This is PR 5 of 5 for #18121, scoped to existing stories that needed broader coverage. One commit per checkbox in the issue.src/components/ui/card.stories.tsxtosrc/components/ui/__stories__/Card.stories.tsx. Added Default, BannerSizes, TitleWeights, ParagraphVariants, HeroCard, LinkCard. Existing BannerBackgrounds + BannerFit retained.TagButton), and InlineText (TagsInlineText) stories.AlertIcon), WithEmoji (AlertEmoji), and SizeFull stories. Existing variant + close-button stories rationalized.accordion.stories.tsx->Accordion.stories.tsxto match PascalCase convention. Added SingleCollapsible, Multiple, HideIcon, CustomTrigger, RtlChevron.<button>to avoid@next/next/no-html-link-for-pageslint), CustomSpacing, FewItems.AvatarBase+AvatarImage+AvatarFallback) and FallbackOnly stories. Existing Sizes, WithLabel, Group, BrokenImageFallback rationalized.UI / TerminalTypewriter. Added StaticMessages, SingleMessage (loop behavior), LongMessage (wrap behavior), Empty (no-render safety check). Existing translated-messages Default retained.All 11 stories retitled to
UI / [Name]to match the hierarchy established in #18122 / #18123 / #18124 / #18125.Removed
Skipped from the issue
Notes for review
git mvso history follows the file. The diff shows as a delete + add because the contents grew substantially; rename detection should still hold up togit log --follow.TagStatusVariantMatrixis a wide grid. Useful for spotting compound-variant regressions; designers may prefer the focused per-axis stories above it for everyday browsing.Avatarmeta sets default args (name,src,href) so render-only stories satisfy the required props without per-story duplication.AccordionusesStoryObj(no generic) because the Radix Root type is a discriminated union that resolves toneverwhen generic overMeta<typeof Accordion>.Selectlacks ahasErrorvariant (called out in feat(storybook): expand form input stories #18123). Out of scope for this PR.Test plan
AccordionRtlChevronstory flips the chevron when locale is set to RTL (Arabic, Urdu)CardLinkCardpropagates hover-group classes (banner image scales, title underlines)Refs: #18121