Skip to content

chore(storybook): nest story groups under Components and Features - #526

Merged
alukach merged 2 commits into
mainfrom
chore/storybook-group-nesting
Aug 28, 2026
Merged

chore(storybook): nest story groups under Components and Features#526
alukach merged 2 commits into
mainfrom
chore/storybook-group-nesting

Conversation

@alukach

@alukach alukach commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

The ui.source.coop sidebar had grown to a long flat list of top-level groups. This nests them under two: Components and Features.

Storybook treats title as a path of arbitrary depth, so this is a pure retitle — one line per story file, no config change:

Components/Accounts/AccountIdentity     Features/Data connections/ConnectionRow
Components/Forms/Field                  Features/Memberships/MembershipsTable
Components/Layout/SectionHeader         Features/Object browser/DirectoryList
Components/Typography/MonoText          Features/Products/TagList
...                                     Features/Profiles/ProfileAvatar

The split follows the directory each component already lives in — src/components/core vs src/components/features — so it needs no judgement calls and stays correct as components move.

Alphabetical ordering puts Components above Features on its own, so no storySort in preview.tsx.

One exception

Object browser spans both directories: BreadcrumbNav lives in src/components/display, while DirectoryList and ObjectSummary live under features/products/object-browser. The whole group goes under Features rather than splitting a three-story feature surface across both buckets.

Tradeoff

Story IDs derive from the title, so every deep link into ui.source.coop changes (forms-field--defaultcomponents-forms-field--default). Nothing in the repo hardcodes one — I grepped for iframe.html?id= and ?path=/story/ across md/mdx/ts/tsx/json/yml — but any externally bookmarked or Slack-pasted link breaks.

Verification

npm run build-storybook passes on the merged branch. The generated storybook-static/index.json lists 149 stories across 11 groups, all under the two buckets:

12 Components/Accounts        19 Features/Data connections
10 Components/Controls         4 Features/Memberships
 9 Components/Feedback        16 Features/Object browser
38 Components/Forms           16 Features/Products
10 Components/Layout          12 Features/Profiles
 3 Components/Typography

🤖 Generated with Claude Code

The sidebar had grown to nine flat top-level groups. Storybook treats
`title` as a path of arbitrary depth, so prefixing each group with the
directory the component already lives in (src/components/core vs
src/components/features) collapses it to two, with no config change.
Alphabetical order puts Core above Features on its own.

Story IDs change with the titles, so any external deep link into
ui.source.coop breaks. Nothing in the repo hardcodes one.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@vercel

vercel Bot commented Aug 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
source-coop-ui Ready Ready Preview Aug 28, 2026 1:30am
source-cooperative Ready Ready Preview Aug 28, 2026 1:30am

Request Review

Conflicts were both title lines main had renamed. Took main's names
(Settings/MembershipsTable and Accounts/InviteMemberForm both became
Memberships/*) and re-derived the group prefixes on top.

Also renames the Core bucket to Components, and folds main's two new
groups in: Memberships, and Object browser (BreadcrumbNav, DirectoryList,
ObjectSummary).

Object browser is the one exception to the directory rule — BreadcrumbNav
lives in src/components/display while its two siblings live under
features/products/object-browser. The group goes under Features whole
rather than splitting a three-story feature surface across both buckets.

Main's rename also dissolved the Accounts split this branch previously
had: InviteMemberForm moved to Memberships, so Accounts is now entirely
under Components.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@claude

claude Bot commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Claude finished @alukach's task in 1m 8s —— View job


Review of PR #526

❌ Changes requested — see findings below.

  • Diff doesn't match the PR's own description. The PR title/body say components move under Core/... and Features/..., but every story in src/components/core/* is actually retitled to Components/..., not Core/... — e.g. src/components/core/AccountIdentity.stories.tsx:16 sets title: "Components/Accounts/AccountIdentity", and this pattern repeats across all 22 core/ files. If the intent (per the PR body's worked example Core/Accounts/AccountIdentity) was really Core, this is a straightforward find/replace bug:

    -  title: "Components/Accounts/AccountIdentity",
    +  title: "Core/Accounts/AccountIdentity",

    applied to all 22 Components/... titles. If Components was actually the intended top-level label (description just went stale), then the PR description needs to be corrected instead — either way, the two are inconsistent right now and the sidebar won't look like what's advertised. Fix this →

  • Minor, non-blocking: src/components/display/BreadcrumbNav.stories.tsx:16 is grouped under Features/Object browser/BreadcrumbNav, even though the file lives in src/components/display/, not src/components/features/. The PR body claims the split "follows the directory the component already lives in ... so it needs no judgement calls" — this one file is the exception (a reasonable judgment call, since it's part of the object-browser feature), just noting it contradicts the stated rule so it doesn't quietly get "corrected" by someone later assuming a strict directory mapping.

Everything else checks out: it's a pure 41×1-line title rename, no preview.tsx/storySort config changes needed (alphabetical ordering keeps groups in order either way), and the diff contains nothing beyond the title strings.

Simplify (ponytail): none — this is already the minimal possible diff for a retitle.


💰 Estimated review cost: $0.31 · 1m08s · 13 turns

@alukach alukach changed the title chore(storybook): nest story groups under Core and Features chore(storybook): nest story groups under Components and Features Aug 28, 2026
@alukach
alukach marked this pull request as ready for review August 28, 2026 02:09
@alukach
alukach merged commit 707ff2d into main Aug 28, 2026
10 checks passed
@alukach
alukach deleted the chore/storybook-group-nesting branch August 28, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant