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

[Project - Onboarding]: Automate call to storybook dev <url-params> after storybook init #22871

Closed
Tracked by #22558
valentinpalkovic opened this issue Jun 1, 2023 · 4 comments · Fixed by #22928
Closed
Tracked by #22558
Assignees

Comments

@valentinpalkovic
Copy link
Contributor

valentinpalkovic commented Jun 1, 2023

Description

The purpose of this task is to automate the execution of the storybook dev --initial-path /onboarding command immediately after the storybook init command. Still, this enhancement should only apply to React-based frameworks. This adjustment will reduce the steps required to start a Storybook with custom parameters for React projects, making the development process more efficient.

Prerequisite

This enhancement is only applicable to frameworks that use React. Other frameworks should not be affected by this change.

Acceptance Criteria:

  • Upon successful execution of storybook init, storybook dev --initial-path /onboarding should automatically be called, but only if the initialized project uses a React-based framework.
  • The CLI option --initial-path /onboarding should be passed as arguments to the storybook dev command.
  • In case storybook init fails for any reason, storybook dev --initial-path /onboarding should not be called and a meaningful error message should be logged.
  • For non-React frameworks, init should also run dev automatically but without the onboarding flag.
  • All existing functionality of storybook init and storybook dev should remain unaffected for React and non-React projects.
  • Detection of React-based framework: The solution should accurately determine whether the framework of the initialized project is based on React.
@valentinpalkovic valentinpalkovic changed the title [Project - Onboarding]: Call storybook dev <url-params> immediately after storybook init [Project - Onboarding]: Automate call to storybook dev <url-params> after storybook init for React-based Frameworks Only Jun 1, 2023
@valentinpalkovic valentinpalkovic moved this to Ready for work in Core Team Projects Jun 1, 2023
@vanessayuenn
Copy link
Contributor

I reckon we should make all successful inits automatically run dev(without the onboarding) for non-react frameworks as well. @shilman thoughts?

@shilman
Copy link
Member

shilman commented Jun 2, 2023

@vanessayuenn I agree!

@vanessayuenn
Copy link
Contributor

I updated the acceptance criteria for non-react frameworks. Not that it's needed, @yannbf did the work in the PR already. :)

@vanessayuenn vanessayuenn changed the title [Project - Onboarding]: Automate call to storybook dev <url-params> after storybook init for React-based Frameworks Only [Project - Onboarding]: Automate call to storybook dev <url-params> after storybook init Jun 6, 2023
@valentinpalkovic valentinpalkovic moved this from Ready for work to In Progress in Core Team Projects Jun 6, 2023
@shilman
Copy link
Member

shilman commented Jun 8, 2023

Jeepers creepers!! I just released https://github.com/storybookjs/storybook/releases/tag/v7.0.20 containing PR #22964 that references this issue. Upgrade today to the @latest NPM tag to try it out!

npx sb@latest upgrade

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

Successfully merging a pull request may close this issue.

4 participants