Skip to content

chore(react): reorder & rename Storybook top-level navigation#4723

Merged
desiree-np merged 2 commits into
mainfrom
chore/f0-storybook-reorder
Jul 20, 2026
Merged

chore(react): reorder & rename Storybook top-level navigation#4723
desiree-np merged 2 commits into
mainfrom
chore/f0-storybook-reorder

Conversation

@desiree-np

Copy link
Copy Markdown
Collaborator

What & why

Reorders and renames the Storybook sidebar so it matches popular design-system conventions (Polaris / Carbon / Primer) and aligns with the F0 component lifecycle (#4253).

The previous nav mixed four different concepts at the top level — category (Components/Patterns/Kits), maturity (Experimental/Deprecated), ownership (SDS) and technical (Layouts/Library/Internal) — which made it hard to consume.

What changed (top-level only)

  • Ownership/altitude-driven sections: Components · Patterns · Kits · Domain specific (was "SDS") · Resources (was "Library") + docs.
  • Experimental dissolved as a top-level bucket → its stories fold into Components/Patterns, and maturity now shows as a sidebar badge driven by the story tag (manager.ts), matching the lifecycle's "the story tag is the source of truth".
  • LayoutsPatterns/App shell; lib + hooksResources.
  • Maturity badges: emoji → text (Experimental / Deprecated).
  • Fixes ~12 story titles that hard-coded a bucket prefix (e.g. "Components/…", "SDS/…") and created phantom sidebar nodes; moves the Toast API to Components.

Scope

PR 1 of a series — top-level structure only. Follow-up PRs (separate): dissolve Internal & Deprecated into badges, Patterns cleanup (casing, Tabs→Components, DateNavigator→Filters…), then functional subgroups.

Test plan

Ran storybook dev and verified the built sidebar via /index.json:

  • Roots: Components · Patterns · Kits · Domain specific · Resources + docs. No stale Experimental / SDS / Layouts / Library roots.
  • 0 title collisions across 346 stories; no phantom bucket nodes.
  • No broken story-ID references (no linkTo / storyId pointing at old ids).

Related: #4253 (component lifecycle).

🤖 Generated with Claude Code

Reorganizes the Storybook sidebar to match popular design-system conventions
and align with the F0 component lifecycle (PR #4253).

- Top-level sections now follow ownership/altitude: Components, Patterns,
  Kits, Domain specific (was 'SDS'), Resources (was 'Library'), plus docs.
- Experimental is no longer a top-level bucket: its stories fold into
  Components/Patterns and maturity shows as a sidebar badge from the story
  tag (manager.ts), matching the lifecycle's 'tag is source of truth'.
- Layouts folded into Patterns/App shell; lib+hooks -> Resources.
- Maturity badges switched from emoji to text (Experimental / Deprecated).
- Fixes ~12 story titles that hard-coded a bucket prefix and created
  phantom sidebar nodes; moves the Toast API to Components.

Scope: PR 1 of a series (top-level only). Group reshuffles (dissolve
Internal/Deprecated into badges, Patterns cleanup) and functional
subgroups follow in later PRs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added chore react Changes affect packages/react labels Jul 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

✅ No New Circular Dependencies

No new circular dependencies detected. Current count: 0

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

📦 Alpha Package Version Published

Use pnpm i github:factorialco/f0#npm/alpha-pr-4723 to install the package

Use pnpm i github:factorialco/f0#e9707ed86dad1a106b85679a71b182a5d7dda790 to install this specific commit

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

🔍 Visual review for your branch is published 🔍

Here are the links to:

@github-actions

Copy link
Copy Markdown
Contributor

✅ No breaking public API changes

No public exports were removed, renamed, or had existing props/types changed in a breaking way compared to main.

Comparing f0, experimental and ai against main. Adding components, types, or optional props is safe. This check is non-blocking.

⚠️ Could not analyze component-status (no-base) — a build may have failed; results may be incomplete.

@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for packages/react

Status Category Percentage Covered / Total
🔵 Lines 59.29% 20747 / 34991
🔵 Statements 58.33% 21753 / 37289
🔵 Functions 51.42% 4815 / 9363
🔵 Branches 52% 14972 / 28788
File CoverageNo changed files found.
Generated in workflow #15728 for commit 90d98c2 by the Vitest Coverage Report Action

@desiree-np
desiree-np marked this pull request as ready for review July 16, 2026 16:50
@desiree-np
desiree-np requested review from a team as code owners July 16, 2026 16:50

@eliseo-juan eliseo-juan left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know why, but in this PR a new "Documentation" appears, that contains documentation about widgets

Image

Some folders routed to their own Storybook directory entry had a root
index.mdx with no explicit <Meta title>, so Storybook auto-titled them to the
bare section prefix — showing up as a stray 'Documentation' node (e.g. the
Widgets docs appearing directly under 'Components'). Reported by review on #4723.

- experimental/Widgets/index.mdx  -> <Meta title="Widgets">
- ui/OneRestrictComponent/index.mdx -> <Meta title="OneRestrictComponent">
- ui/IconBadge: renamed index.mdx -> Badge.mdx (uses a custom <OneMeta> that
  can't take a Meta title; the filename now drives the autotitle to match its
  stories).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
desiree-np added a commit that referenced this pull request Jul 17, 2026
…rs groups

- Normalize 'Data collection' -> 'Data Collection' (inconsistent casing was
  splitting OneDataCollection into two sidebar nodes; 24 vs 6 stories/docs).
- Group ApplicationFrame under Patterns/App shell (alongside the layouts).
- Group FilterPicker, FilterPickerContent and DateNavigator under
  Patterns/Filters (DateNavigator is a temporal filter).

Title-only changes; verified in Storybook: single 'Data Collection' node,
new 'App shell' and 'Filters' groups, 0 title collisions.

Scope: PR 2 of the Storybook reorg series. Stacked on #4723 (base branch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@desiree-np

desiree-np commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator Author

I don't know why, but in this PR a new "Documentation" appears, that contains documentation about widgets

@eliseo-juan fixed 👍 It was a root index.mdx (the Widgets docs) with no explicit <Meta title>, so Storybook auto-titled it to the bare section prefix and it showed up as a stray "Documentation" under Components. Added an explicit title — turned out there were 2 more of the same case, fixed those too. It's in the stack now, could you re-approve when you get a sec? 🙏

@desiree-np
desiree-np requested a review from eliseo-juan July 17, 2026 09:53
@desiree-np
desiree-np merged commit a6f2031 into main Jul 20, 2026
24 of 28 checks passed
@desiree-np
desiree-np deleted the chore/f0-storybook-reorder branch July 20, 2026 11:57
desiree-np added a commit that referenced this pull request Jul 20, 2026
…rs groups

- Normalize 'Data collection' -> 'Data Collection' (inconsistent casing was
  splitting OneDataCollection into two sidebar nodes; 24 vs 6 stories/docs).
- Group ApplicationFrame under Patterns/App shell (alongside the layouts).
- Group FilterPicker, FilterPickerContent and DateNavigator under
  Patterns/Filters (DateNavigator is a temporal filter).

Title-only changes; verified in Storybook: single 'Data Collection' node,
new 'App shell' and 'Filters' groups, 0 title collisions.

Scope: PR 2 of the Storybook reorg series. Stacked on #4723 (base branch).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore react Changes affect packages/react

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants