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

CLI: Don't initially select Documentation and Testing features #30599

Merged
merged 1 commit into from
Feb 20, 2025

Conversation

ghengeveld
Copy link
Member

@ghengeveld ghengeveld commented Feb 20, 2025

What I did

Changed the initial selected state for features from Documentation and Testing to none. This means users will have to explicitly opt-in to install these features, giving us better signal on whether they are desired.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

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 canary-release-pr.yml --field pr=<PR_NUMBER>

name before after diff z %
createSize 0 B 0 B 0 B - -
generateSize 80.5 MB 80.5 MB 0 B -0.94 0%
initSize 80.5 MB 80.5 MB 0 B -0.94 0%
diffSize 97 B 97 B 0 B - 0%
buildSize 7.31 MB 7.31 MB 0 B 2.49 0%
buildSbAddonsSize 1.9 MB 1.9 MB 0 B -1.16 0%
buildSbCommonSize 195 kB 195 kB 0 B - 0%
buildSbManagerSize 1.88 MB 1.88 MB 0 B 1.73 0%
buildSbPreviewSize 0 B 0 B 0 B - -
buildStaticSize 0 B 0 B 0 B - -
buildPrebuildSize 3.97 MB 3.97 MB 0 B 2.18 0%
buildPreviewSize 3.34 MB 3.34 MB 0 B 1.58 0%
testBuildSize 0 B 0 B 0 B - -
testBuildSbAddonsSize 0 B 0 B 0 B - -
testBuildSbCommonSize 0 B 0 B 0 B - -
testBuildSbManagerSize 0 B 0 B 0 B - -
testBuildSbPreviewSize 0 B 0 B 0 B - -
testBuildStaticSize 0 B 0 B 0 B - -
testBuildPrebuildSize 0 B 0 B 0 B - -
testBuildPreviewSize 0 B 0 B 0 B - -
name before after diff z %
createTime 7.3s 6.9s -445ms -0.77 -6.4%
generateTime 19s 17.9s -1s -180ms -1.07 -6.6%
initTime 4.4s 4.2s -245ms -1.09 -5.8%
buildTime 8.9s 8.2s -698ms -1.21 -8.4%
testBuildTime 0ms 0ms 0ms - -
devPreviewResponsive 4.6s 5.4s 869ms -0.05 15.8%
devManagerResponsive 4.4s 5.2s 820ms 1.57 🔺15.6%
devManagerHeaderVisible 685ms 787ms 102ms -0.2 13%
devManagerIndexVisible 692ms 802ms 110ms -0.24 13.7%
devStoryVisibleUncached 1.8s 2.1s 228ms -1.47 🔺10.8%
devStoryVisible 715ms 822ms 107ms -0.35 13%
devAutodocsVisible 661ms 691ms 30ms -1.07 4.3%
devMDXVisible 643ms 689ms 46ms -1.08 6.7%
buildManagerHeaderVisible 664ms 928ms 264ms 1.25 🔺28.4%
buildManagerIndexVisible 675ms 1s 338ms 1.51 🔺33.4%
buildStoryVisible 650ms 912ms 262ms 1.43 🔺28.7%
buildAutodocsVisible 587ms 705ms 118ms 0.37 16.7%
buildMDXVisible 524ms 646ms 122ms 0.13 18.9%

Greptile Summary

This PR modifies Storybook's initialization behavior to make Documentation and Testing features opt-in rather than enabled by default.

  • Modified feature selection in code/lib/create-storybook/src/initiate.ts to remove auto-selection of docs and test features
  • Features must now be explicitly selected in interactive mode rather than pre-selected
  • Maintains existing behavior of auto-adding docs in CI and both docs/test with --yes flag
  • Aims to gather better signal on feature adoption by requiring explicit opt-in
  • Affects only new Storybook installations, not existing ones

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

LGTM

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

Copy link

nx-cloud bot commented Feb 20, 2025

View your CI Pipeline Execution ↗ for commit 532c6ac.

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

☁️ Nx Cloud last updated this comment at 2025-02-20 12:38:35 UTC

@storybook-pr-benchmarking
Copy link

Package Benchmarks

Commit: 532c6ac, ran on 20 February 2025 at 12:42:02 UTC

The following packages have significant changes to their size or dependencies:

@storybook/vue3-vite

Before After Difference
Dependency count 108 108 0
Self size 17 KB 17 KB 0 B
Dependency size 42.63 MB 42.61 MB 🎉 -18 KB 🎉
Bundle Size Analyzer Link Link

@ghengeveld ghengeveld merged commit a25c582 into next Feb 20, 2025
59 of 64 checks passed
@ghengeveld ghengeveld deleted the features-off-by-default branch February 20, 2025 14:07
@github-actions github-actions bot mentioned this pull request Feb 20, 2025
11 tasks
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