Skip to content

Init: Install framework stories instead of renderer stories #31160

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

Merged
merged 14 commits into from
Apr 22, 2025

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Apr 17, 2025

Closes #

What I did

When initializing Storybook in an empty directory, the bootstrapped stories contained @storybook/react references instead of @storybook/react-vite.

I have:

  • added template stories for all frameworks, since the renderer isn't installed per default anymore and in projects with strict package managers, the templates cannot be accessed from the renderer package if not explicitly installed
  • extended the logic to bootstrap framework specific stories from frameworks which supports this
  • changed stories folders from ts-4-9 to ts and renamed supported language TYPESCRIPT_4_9 to TYPESCRIPT

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 pull request has been released as version 0.0.0-pr-31160-sha-1cdd9ea9. Try it out in a new sandbox by running npx storybook@0.0.0-pr-31160-sha-1cdd9ea9 sandbox or in an existing project with npx storybook@0.0.0-pr-31160-sha-1cdd9ea9 upgrade.

More information
Published version 0.0.0-pr-31160-sha-1cdd9ea9
Triggered by @valentinpalkovic
Repository storybookjs/storybook
Branch valentin/dont-install-renderer-package
Commit 1cdd9ea9
Datetime Tue Apr 22 08:15:49 UTC 2025 (1745309749)
Workflow run 14590030046

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=31160

Greptile Summary

Simplified Storybook initialization by removing automatic renderer package installation during setup, streamlining the framework configuration process.

  • Modified code/lib/create-storybook/src/generators/baseGenerator.ts to exclude rendererPackage from the packages array in getFrameworkDetails function
  • Framework-specific renderers will no longer be automatically installed during initialization
  • Change reduces installation complexity and package dependencies

Note: This is a significant architectural change that affects how Storybook handles framework initialization, though the implementation is straightforward.

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
Contributor

github-actions bot commented Apr 17, 2025

Fails
🚫 PR is marked with "BREAKING CHANGE" label.

Generated by 🚫 dangerJS against e0ed630

Copy link

nx-cloud bot commented Apr 17, 2025

View your CI Pipeline Execution ↗ for commit e0ed630.

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

☁️ Nx Cloud last updated this comment at 2025-04-22 10:47:24 UTC

@valentinpalkovic valentinpalkovic added ci:daily Run the CI jobs that normally run in the daily job. and removed ci:normal labels Apr 17, 2025
@valentinpalkovic valentinpalkovic changed the title Init: Don't install renderer package Init: Install framework stories instead of renderer stories Apr 17, 2025
@valentinpalkovic valentinpalkovic force-pushed the valentin/dont-install-renderer-package branch 2 times, most recently from 503ce4a to 5601dd8 Compare April 17, 2025 19:41
Update framework template support in baseGenerator

Add template stories for react-webpack5

Move renderer templates into frameworks

Add support for additional frameworks in baseGenerator

Refactor baseGenerator to improve framework handling and package installation logic

Fix imports

Readd templates to renderers
@valentinpalkovic valentinpalkovic force-pushed the valentin/dont-install-renderer-package branch from 5601dd8 to 891ad90 Compare April 17, 2025 19:43
@valentinpalkovic valentinpalkovic force-pushed the valentin/dont-install-renderer-package branch from 48d31fc to b9c6eb4 Compare April 22, 2025 06:48
@valentinpalkovic valentinpalkovic added ci:daily Run the CI jobs that normally run in the daily job. and removed ci:daily Run the CI jobs that normally run in the daily job. labels Apr 22, 2025
@valentinpalkovic valentinpalkovic merged commit 16f8d5b into next Apr 22, 2025
30 of 36 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/dont-install-renderer-package branch April 22, 2025 11:24
@github-actions github-actions bot mentioned this pull request Apr 22, 2025
28 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BREAKING CHANGE ci:daily Run the CI jobs that normally run in the daily job.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy