-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
CLI: Add "features" question & auto-install test addon & improve test-addon compatibility #30202
Conversation
View your CI Pipeline Execution ↗ for commit 865a0c0.
☁️ Nx Cloud last updated this comment at |
Package BenchmarksCommit: The following packages have significant changes to their size or dependencies:
|
Before | After | Difference | |
---|---|---|---|
Dependency count | 52 | 52 | 0 |
Self size | 19.26 MB | 19.18 MB | 🎉 -75 KB 🎉 |
Dependency size | 14.19 MB | 14.19 MB | 0 B |
Bundle Size Analyzer | Link | Link |
storybook
Before | After | Difference | |
---|---|---|---|
Dependency count | 53 | 53 | 0 |
Self size | 23 KB | 24 KB | 🚨 +1 KB 🚨 |
Dependency size | 33.45 MB | 33.38 MB | 🎉 -75 KB 🎉 |
Bundle Size Analyzer | Link | Link |
sb
Before | After | Difference | |
---|---|---|---|
Dependency count | 54 | 54 | 0 |
Self size | 1 KB | 1 KB | 0 B |
Dependency size | 33.47 MB | 33.40 MB | 🎉 -74 KB 🎉 |
Bundle Size Analyzer | Link | Link |
@storybook/cli
Before | After | Difference | |
---|---|---|---|
Dependency count | 387 | 358 | 🎉 -29 🎉 |
Self size | 503 KB | 261 KB | 🎉 -242 KB 🎉 |
Dependency size | 75.44 MB | 83.84 MB | 🚨 +8.40 MB 🚨 |
Bundle Size Analyzer | Link | Link |
@storybook/codemod
Before | After | Difference | |
---|---|---|---|
Dependency count | 276 | 276 | 0 |
Self size | 617 KB | 617 KB | 🎉 -157 B 🎉 |
Dependency size | 65.51 MB | 65.44 MB | 🎉 -75 KB 🎉 |
Bundle Size Analyzer | Link | Link |
create-storybook
Before | After | Difference | |
---|---|---|---|
Dependency count | 111 | 7 | 🎉 -104 🎉 |
Self size | 1.11 MB | 10.20 MB | 🚨 +9.09 MB 🚨 |
Dependency size | 42.63 MB | 2.24 MB | 🎉 -40.39 MB 🎉 |
Bundle Size Analyzer | Link | Link |
…t reproduce locally
…/storybook into norbert/cli-with-ink
…/storybook into norbert/cli-with-ink
directory: '.', | ||
}; | ||
|
||
// TODO @ghengeveld, I am in the process of removing the context |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ghengeveld We should remove the context IMHO and module-mock instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, go for it.
9f2a163
to
2abf798
Compare
… autodocs isn't explicitly enabled
Closes #30196
What I did
ink
, however we ran out of time, and decided to only do the following:intents
question at the start ofcreate-storybook
. The usefulness of this question will be expanded upon in the future. for now the only answer that has any effect is:yes
to thetesting
intent, we automatically check for compatibility and add theexperimental-addon-test
to the user's project.vitest
config file compatibility. We now are able to modify an existing workspace config file (most of the time) as well as deal with more variations.We spoke about placing the storybook specific workspace config inside of the
.storybook
folder, but ended up not doing that.Checklist for Contributors
Testing
The changes in this PR are covered in the following automated tests:
Manual testing
When running the
create-storybook
CLI (you can use the canary) you should be prompted a question at the start for what you intent to use storybook for.All 3 options should be auto-checked by default.
If you enable / leave enabled the
testing
intent, you should expect theexperimental-addon-test
to be added, as well as vitest config to be setup automatically.This can be skipped if the framework or config was deemed incompatible.
Documentation
MIGRATION.MD
Checklist for Maintainers
When this PR is ready for testing, make sure to add
ci:normal
,ci:merged
orci:daily
GH 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.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 pull request has been released as version
0.0.0-pr-30202-sha-f7878745
. Try it out in a new sandbox by runningnpx [email protected] sandbox
or in an existing project withnpx [email protected] upgrade
.More information
0.0.0-pr-30202-sha-f7878745
norbert/cli-with-ink
f7878745
1738703332
)To request a new release of this pull request, mention the
@storybookjs/core
team.core team members can create a new canary release here or locally with
gh workflow run --repo storybookjs/storybook canary-release-pr.yml --field pr=30202
Greptile Summary
This PR significantly enhances the Storybook CLI with new features for test addon integration and improved framework compatibility checks.
code/lib/create-storybook/src/initiate.ts
code/lib/create-storybook/src/ink/steps/checks/frameworkTest.tsx
code/lib/create-storybook/src/ink/steps/checks/vitestConfigFiles.tsx
code/lib/create-storybook/src/bin/modernInputs.ts
The changes look comprehensive but the commented-out render functions in several new files suggest some UI components may not be fully implemented yet.