Onboarding: Merge addon into core#33042
Conversation
| }); | ||
|
|
||
| export default [ | ||
| onboardingManager, |
There was a problem hiding this comment.
Maybe we need to make this optional?
If that's indeed needed, we can go about it in a few ways.
Considering the UI code is already all lazy-loaded, maybe we can do it at runtime, or maybe we don't inject here, based on a global we inject via the common-preset?
|
View your CI Pipeline Execution ↗ for commit 1f59bf5
☁️ Nx Cloud last updated this comment at |
| available: ({ index }) => | ||
| !!index && | ||
| 'example-button--primary' in index && | ||
| addons.experimental_getRegisteredAddons().includes('@storybook/addon-onboarding'), |
There was a problem hiding this comment.
I just removed the condition checking if onboarding is installed/added.
On a side-note, can we please not use this broken API?
If you need to detect an addon presence at runtime, add a global variable or something, this API will hold us back from properly refactoring the addon system.
| * Testing tools (e.g. [Jest](https://jestjs.io/), [Vitest](https://vitest.dev/), [Playwright](https://playwright.dev/)). | ||
| * Package manager information (e.g., `npm`, `yarn`). | ||
| * Monorepo information (e.g., [NX](https://nx.dev/), [Turborepo](https://turborepo.org/)). | ||
| * In-app events (e.g., [Storybook guided tour](https://github.com/storybookjs/addon-onboarding), [UI test run](../writing-tests/integrations/vitest-addon.mdx#storybook-ui)). |
There was a problem hiding this comment.
The link no-longer makes any sense, as it's not an addon, there's no readme.
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 39 | 39 | 0 |
| Self size | 19.64 MB | 19.91 MB | 🚨 +265 KB 🚨 |
| Dependency size | 16.40 MB | 16.40 MB | 🎉 -14 B 🎉 |
| Bundle Size Analyzer | Link | Link |
@storybook/cli
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 173 | 173 | 0 |
| Self size | 773 KB | 773 KB | 🎉 -35 B 🎉 |
| Dependency size | 66.61 MB | 66.87 MB | 🚨 +265 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
@storybook/codemod
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 166 | 166 | 0 |
| Self size | 30 KB | 30 KB | 🎉 -14 B 🎉 |
| Dependency size | 65.18 MB | 65.44 MB | 🚨 +265 KB 🚨 |
| Bundle Size Analyzer | Link | Link |
create-storybook
| Before | After | Difference | |
|---|---|---|---|
| Dependency count | 40 | 40 | 0 |
| Self size | 999 KB | 999 KB | 🎉 -144 B 🎉 |
| Dependency size | 36.04 MB | 36.31 MB | 🚨 +265 KB 🚨 |
| Bundle Size Analyzer | node | node |
… AddonService tests and implementation.
See #32644
Telescopes on #32799
What I did
@storybook/addon-onboardinginto thestorybookpackage.common-preset.common-manager(where the other built-in addons are also added)initcommand no longer adds it to projects.After this merge, users should un-install addon-onboarding.
We should likely do a follow-up PR, with an auto-migration, removing it.
This is the easy first step, long term we'd want to incorporate the addon further into the manager-ui (
core/src/manager) directly; we want to do that with all built-in addons.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
This should make the installation of addon-onboarding no longer needed, in fact, we should ensure it's no longer installed.
The CLI should never install addon-onboarding, would be a change worth manually verifying.
There should be no regressions/changes in how onboarding functions.
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal,ci:mergedorci:dailyGH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found incode/lib/cli-storybook/src/sandbox-templates.tsMake 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/coreteam 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>