Skip to content

Docs: Add FAQ about sharing config in monorepos for CSF Next#33696

Merged
kylegach merged 2 commits into
nextfrom
kasper/docs-csf-factories-monorepo
Jan 28, 2026
Merged

Docs: Add FAQ about sharing config in monorepos for CSF Next#33696
kylegach merged 2 commits into
nextfrom
kasper/docs-csf-factories-monorepo

Conversation

@kasperpeulen
Copy link
Copy Markdown
Member

@kasperpeulen kasperpeulen commented Jan 28, 2026

Closes #33616

What I did

Added a note after the automigrate command explaining that in monorepos with multiple Storybook configs, you need to run the command with the -c flag pointing to each config directory.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This is a documentation-only change. Manual testing:

  1. View the rendered MDX in the docs site
  2. Verify the callout appears directly after the automigrate command

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that doesn't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Documentation
    • Added monorepo guidance to CSF Next automigration docs, showing how to run the automigration with a config-directory flag for each config and including dedicated command snippets.
    • Included example command blocks demonstrating automigration across multiple Storybook configs using npm, pnpm, and yarn. Duplicate guidance appears in two relevant sections for discoverability.

✏️ Tip: You can customize this high-level summary in your review settings.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Jan 28, 2026

View your CI Pipeline Execution ↗ for commit 12b492c

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 5m 27s View ↗

☁️ Nx Cloud last updated this comment at 2026-01-28 14:58:43 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jan 28, 2026

📝 Walkthrough

Walkthrough

Adds monorepo guidance and a snippet showing how to run storybook automigrate csf-factories -c <config-dir> for each config directory; guidance and examples were inserted into docs/api/csf/csf-next.mdx (duplicated in two places) and a new snippet file was added. No code or data-structure changes.

Changes

Cohort / File(s) Summary
Documentation - CSF Next
docs/api/csf/csf-next.mdx
Inserted an informational monorepo Callout around the automigrate/upgrade text advising automigrate -c per config directory; the guidance appears in two locations (duplicated).
Snippets - Automigrate examples
docs/_snippets/csf-factories-automigrate-with-config-directory.md
Added shell examples for running storybook automigrate csf-factories -c against two config dirs, with npm/pnpm/yarn variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs


Comment @coderabbitai help to get the list of available commands and usage tips.

@kasperpeulen kasperpeulen added ci:docs Run the CI jobs for documentation checks only. and removed ci:normal labels Jan 28, 2026
Copy link
Copy Markdown
Contributor

@kylegach kylegach left a comment

Choose a reason for hiding this comment

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

Thanks, @kasperpeulen! Looks great!

@kylegach kylegach added the patch:yes Bugfix & documentation PR that need to be picked to main branch label Jan 28, 2026
@kylegach kylegach merged commit 90b7abb into next Jan 28, 2026
22 of 23 checks passed
@kylegach kylegach deleted the kasper/docs-csf-factories-monorepo branch January 28, 2026 20:50
valentinpalkovic pushed a commit that referenced this pull request Jan 30, 2026
…monorepo

Docs: Add FAQ about sharing config in monorepos for CSF Next
(cherry picked from commit 90b7abb)
@github-actions github-actions Bot added the patch:done Patch/release PRs already cherry-picked to main/release branch label Jan 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:docs Run the CI jobs for documentation checks only. documentation patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: CSF factories codemod breaks main.js and preview.js files by replacing the original framework import with "your-framework-here"

2 participants