Skip to content

Conversation

@Sidnioulz
Copy link
Member

@Sidnioulz Sidnioulz commented Oct 13, 2025

TODOS

  • Test guide on several addons
  • Finalise names for -api recos with Jeppe
  • Decide if keyword change is worth mentioning @shilman
  • Adjust addon-kit tsup config URL from esm-only to main once addon-kit PR is merged ; added note on the addon-kit PR

What I did

Updated addon migration guide for SB10.

Checklist for Contributors

Testing

Manual testing

Port an addon with this guide 😉

Documentation

  • Add or update documentation reflecting your changes

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 don'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
    • Updated addon migration guide to target Storybook 10.0 — refreshed titles, sidebar headings, links, and support messaging.
    • Reframed guidance from 9.x to 10.0, replacing legacy terminology and timelines with 10.0-focused recommendations.
    • Added examples and guidance for ESM-only builds, updated exports/package layouts, CSF Next usage, and modern TypeScript/ESM settings.
    • Revised local addon loading, manager/preview entry guidance, and migration examples to match 10.0 conventions.

@Sidnioulz Sidnioulz self-assigned this Oct 13, 2025
@Sidnioulz Sidnioulz requested a review from kylegach as a code owner October 13, 2025 07:55
@Sidnioulz Sidnioulz added the ci:docs Run the CI jobs for documentation checks only. label Oct 13, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 13, 2025

📝 Walkthrough

Walkthrough

Retargets the addon migration guide to Storybook 10.0: updates titles, sidebar labels, links, section names, examples, and guidance; replaces 9.x-specific content with 10.0 conventions (ESM-only builds, CSF Next/4, removal of exportEntries, exports/package.json and tsconfig examples, local addon loading, preset changes).

Changes

Cohort / File(s) Summary of changes
Docs: Addon migration to 10.0
docs/addons/addon-migration-guide.mdx
Retargets the migration guide from Storybook 9.x to 10.0: updates title, sidebar heading, intro, and cross-links; renames sections (e.g., “Replacing dependencies” → “Dependency updates”); converts 9.x-centric guidance to 10.0 (ESM-only builds, CSF Next/4, definePreviewAddon), removes/updates exportEntries and exports/package.json examples, revises tsconfig examples, reworks local addon loading, manager/preview entry handling, preset/loader guidance, and support/migration messaging to reference 10.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch sidnioulz/addon-migration-guide-10

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 44a8e16 and 0f59035.

📒 Files selected for processing (1)
  • docs/addons/addon-migration-guide.mdx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Update documentation under docs/ for significant changes, including migration guides for breaking changes

Files:

  • docs/addons/addon-migration-guide.mdx
🪛 LanguageTool
docs/addons/addon-migration-guide.mdx

[grammar] ~8-~8: Ensure spelling is correct
Context: ...ly appreciate the dedication and effort addon creators put into keeping the Storybook...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~8-~8: Ensure spelling is correct
Context: ...is here to assist you in migrating your addons from 9.x to 10.0. If you need to migrat...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~56-~56: Ensure spelling is correct
Context: ...the changes in version 10.0 that impact addon development. ### ESM-only builds Stor...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~60-~60: Ensure spelling is correct
Context: ...-only builds Storybook 10 requires all addons to be built as ESM-only. This change si...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[style] ~65-~65: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...need to build CJS files * You no longer need to pass globalManagerPackages and `globa...

(REP_NEED_TO_VB)


[style] ~66-~66: You have already used this phrasing in nearby sentences. Consider replacing it to add variety to your writing.
Context: ...lerconfig inpackage.json` no longer needs to be manually typed * We recommend you st...

(REP_NEED_TO_VB)


[grammar] ~252-~252: Ensure spelling is correct
Context: ...; ``` ### Local addon loading Because addons are now ESM-only, you must change how y...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~252-~252: Ensure spelling is correct
Context: ..., you must change how you load your own addon in your development Storybook instance....

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~298-~298: Ensure spelling is correct
Context: ...figuration could cause subtle bugs when addon authors exported code in index.js for...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)


[grammar] ~341-~341: Ensure spelling is correct
Context: ...ges We've updated default keywords for addons in the Storybook addon-kit template. ...

(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Danger JS
  • GitHub Check: Core Unit Tests, windows-latest
🔇 Additional comments (4)
docs/addons/addon-migration-guide.mdx (4)

282-294: Excellent CSF Factories section with proper terminology and linking.

The section correctly uses "CSF Factories" terminology (not "CSF 4"), links to the authoritative ../api/csf/csf-next.mdx guide, and provides clear code examples. This addresses the previous reviewer's feedback.


18-29: Code blocks use proper language identifiers throughout.

All code blocks now specify language identifiers (jsonc, diff, ts, json) with title attributes where appropriate. This follows best practices for syntax highlighting and addresses the previous reviewer's guidance.

Also applies to: 37-47, 201-221, 225-238, 242-248, 257-269, 273-276, 331-337, 343-348


365-365: Support section is clear and accessible.

The support section provides both GitHub discussions and Discord channel links with proper formatting and clear call-to-action. This addresses the previous reviewer's feedback.


60-60: Pending: addon-kit URL branch replacement post-release.

Line 60 links to the transient esm-only feature branch. Per the PR objectives, this URL will be updated to main once the corresponding addon-kit PR is merged. No action needed now, but ensure this is tracked for post-release.

Verify that the URL update to main branch is completed after the addon-kit PR merge, or document this as a known post-release task.


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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e9a2317 and 98096b2.

📒 Files selected for processing (1)
  • docs/addons/addon-migration-guide.mdx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: Danger JS
  • GitHub Check: Core Unit Tests, windows-latest

@nx-cloud
Copy link

nx-cloud bot commented Oct 13, 2025

View your CI Pipeline Execution ↗ for commit 0f59035

Command Status Duration Result
nx run-many -t build --parallel=3 ✅ Succeeded 46s View ↗

☁️ Nx Cloud last updated this comment at 2025-10-20 07:39:34 UTC

@Sidnioulz Sidnioulz force-pushed the sidnioulz/addon-migration-guide-10 branch from 98096b2 to 13a1bea Compare October 13, 2025 13:15
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
docs/addons/addon-migration-guide.mdx (2)

16-16: Fix “toif” typo.

Please change “toif” to “if” so the sentence reads correctly.


60-60: Switch addon-kit link to a stable branch.

This still points at the temporary addon-kit/blob/esm-only/tsup.config.ts, which will 404 after that branch is deleted. Update it to main (or a tag/commit) before shipping so the docs don’t break.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 98096b2 and 13a1bea.

📒 Files selected for processing (1)
  • docs/addons/addon-migration-guide.mdx (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Core Unit Tests, windows-latest

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 5

♻️ Duplicate comments (1)
docs/addons/addon-migration-guide.mdx (1)

60-61: Avoid linking to a transient feature branch; switch to a stable ref.

addon-kit/blob/esm-only/tsup.config.ts will 404 after merge. Point to main (or a tag/commit) before publishing the guide.

Apply:

-.../addon-kit/blob/esm-only/tsup.config.ts
+.../addon-kit/blob/main/tsup.config.ts
🧹 Nitpick comments (1)
docs/addons/addon-migration-guide.mdx (1)

247-248: Consider re-exporting default as well (defensive).

If dist/preset.js ever has a default export, export * won’t re-export it. Optional but future‑proof:

 export * from './dist/preset.js';
+export { default } from './dist/preset.js';
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 13a1bea and 4137965.

📒 Files selected for processing (1)
  • docs/addons/addon-migration-guide.mdx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Update documentation under docs/ for significant changes, including migration guides for breaking changes

Files:

  • docs/addons/addon-migration-guide.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Core Unit Tests, windows-latest

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Resolving this thread as the with syntax is correct for Node 20.19+.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
docs/addons/addon-migration-guide.mdx (2)

60-60: Switch addon-kit link to a stable ref before publishing.

Replace the transient esm-only branch with main (or a tag/commit) to avoid a future 404.


352-352: Verify MIGRATION.md anchor resolves before merge.

Ensure the section exists and the slug matches.

Run this script to confirm the header exists and infer the slug:

#!/bin/bash
set -euo pipefail
# Look for a "From version 9.x to 10.0.0" header in MIGRATION.md on this branch
fd -a MIGRATION.md | xargs -I{} rg -n '^#{1,6}\s*From version 9\.x to 10\.0\.0\b' -n -C1 {} || {
  echo "Header not found in MIGRATION.md on this branch."
  exit 1
}
echo "Header found. GitHub slug should be: from-version-9x-to-1000"
🧹 Nitpick comments (2)
docs/addons/addon-migration-guide.mdx (2)

240-248: Add a note to set package.json to ESM.

Since preset.js becomes ESM, remind users to set "type": "module" in package.json to avoid loader mismatches.


273-276: Confirm addons path resolution with import.meta.resolve.

import.meta.resolve returns a file URL. Verify Storybook’s addons array accepts the URL directly in all environments; otherwise wrap with fileURLToPath for consistency.

Example:

- addons: ["@storybook/addon-docs", import.meta.resolve("./local-preset.ts")],
+ import { fileURLToPath } from "node:url";
+ addons: ["@storybook/addon-docs", fileURLToPath(import.meta.resolve("./local-preset.ts"))],
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 4137965 and 44a8e16.

📒 Files selected for processing (1)
  • docs/addons/addon-migration-guide.mdx (2 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
docs/**

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

Update documentation under docs/ for significant changes, including migration guides for breaking changes

Files:

  • docs/addons/addon-migration-guide.mdx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Core Unit Tests, windows-latest

Copy link
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.

Great work, @Sidnioulz! Left a few requested changes, but I'm approving to unblock.

@Sidnioulz
Copy link
Member Author

Great work, @Sidnioulz! Left a few requested changes, but I'm approving to unblock.

Thanks for the review 🙇

@Sidnioulz Sidnioulz force-pushed the sidnioulz/addon-migration-guide-10 branch from 140b1d6 to 0f59035 Compare October 20, 2025 07:16
@vanessayuenn vanessayuenn merged commit 6d7ff1d into next Oct 20, 2025
11 of 13 checks passed
@vanessayuenn vanessayuenn deleted the sidnioulz/addon-migration-guide-10 branch October 20, 2025 10:12
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants