Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Storysource with Source #30430

Open
4 tasks
shilman opened this issue Jan 31, 2025 · 1 comment
Open
4 tasks

Replace Storysource with Source #30430

shilman opened this issue Jan 31, 2025 · 1 comment

Comments

@shilman
Copy link
Member

shilman commented Jan 31, 2025

Storysource is a legacy addon with a lot of issues. Its functionality is superceded by the Source block.

In 8.5, we made it possible to view the code snippet as an addon panel.

We should:

  • Consider repackaging the docs changes into a standalone addon, or into core itself, similar to how @storybook/addon-controls complements the Controls doc block.
  • Deprecate storysource and remove it from the monorepo (along with source-loader that is only used by storysource)
  • Create an automigration to move existing storysource users over to the Source solution
  • Update the documentation
Copy link
Contributor

greptile-apps bot commented Jan 31, 2025

** Disclaimer** This information might be inaccurate, due to it being generated automatically
Implementation steps: 1. Move panel functionality from PR #29253 to either: - New addon package @storybook/addon-source-panel - Or into @storybook/addon-docs core 2. Add deprecation warning to @storybook/addon-storysource: js // addon-storysource/src/index.ts console.warn('[@storybook/addon-storysource] is deprecated. Use @storybook/addon-docs Source block or Source panel instead.'); 3. Create automigration in code/lib/cli/src/automigrate: - Remove @storybook/addon-storysource from package.json - Remove storysource from .storybook/main.js addons array - Add Source block to MDX/docs if not present - Add Source panel configuration if user had storysource panel enabled 4. Remove packages: - @storybook/addon-storysource - @storybook/source-loader 5. Update docs: - Remove storysource addon references - Add migration guide pointing to Source block/panel alternatives

About Greptile

This response provides a starting point for your research, not a precise solution.

Help us improve! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

Edit Issue Bot Settings · Greptile

@shilman shilman added this to the 9.0 milestone Jan 31, 2025
@shilman shilman changed the title Deprecate Storysource Replace Storysource with Source Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant