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

Add script to append appropriate package version tags in snippets #215

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

kylegach
Copy link
Collaborator

@kylegach kylegach commented Jul 19, 2024

Warning

This PR contains a commit to update docs-versions for QA purposes that must be removed prior to merging.

Before

npx storybook init

After (latest)

npx storybook@latest init

After (pre-release)

npx storybook@next init

@kylegach kylegach self-assigned this Jul 19, 2024
Copy link

vercel bot commented Jul 19, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 3:55pm
web-addon-catalog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jul 19, 2024 3:55pm

@kylegach
Copy link
Collaborator Author

@jonniebigodes — Could you QA this please?

Here's example links:

Latest:

Pre-release:

Temporarily enabled, just to QA this PR

If you're curious, you can see which pages & snippets I explicitly disallow from manipulation here:
https://github.com/storybookjs/web/blob/kylegach/sb-1283-docs-issue-with-prereleases-and-snippet-package-labels/apps/frontpage/scripts/append-package-tags-in-snippets.ts#L10-L17

@jonniebigodes
Copy link
Contributor

jonniebigodes commented Jul 19, 2024

@kylegach will do. So far I noticed that the builders/webpack page includes the next tag in both @storybook/addon-webpack5-compiler-babel and @storybook/addon-webpack5-compiler-swc addons, despite it being on the disallowed list here. And this has a compound effect on other pages as well where the snippet is used, namely in some of the framework pages (e.g., React & Webpack, addon migration guide)

@jonniebigodes
Copy link
Contributor

jonniebigodes commented Jul 22, 2024

Following up on the QA process, I've also noticed that in the Addons/Install page, specifically here the addon snippet is incorrect.
What should be shown would be npx | pnpm dlx | yarn dlx storybook@next add @storybook/addon-a11y as already documented in the remove section.
The upgrade documentation references next, while the rest of the documentation refers to latest. A similar situation is happening in the migration guide where we're referencing latest in a code example that is being documented on a pre-release version and this should not be the case as it will introduce a misconception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants