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

Prompt to force initialization when storybook folder is detected #22392

Merged
merged 5 commits into from May 11, 2023

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented May 4, 2023

Closes #22342

What I did

The error message was wrong. Corrected it, because the code block only runs for all project types except Angular

Checklist

  • Make sure your changes are tested (stories and/or unit, integration, or end-to-end tests)
  • Make sure to add/update documentation regarding your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Maintainers

  • If this PR should be tested against many or all sandboxes,
    make sure to add the ci:merged or ci:daily GH label to it.
  • Make sure this PR contains one of the labels below.

["cleanup", "BREAKING CHANGE", "feature request", "bug", "documentation", "maintenance", "dependencies", "other"]

@valentinpalkovic valentinpalkovic self-assigned this May 4, 2023
@valentinpalkovic valentinpalkovic added the maintenance User-facing maintenance tasks label May 4, 2023
code/lib/cli/src/initiate.ts Outdated Show resolved Hide resolved
@yannbf yannbf added the cli label May 8, 2023
@valentinpalkovic valentinpalkovic force-pushed the valentin/angular-already-installed-error branch 2 times, most recently from fb1b95a to 970bc4d Compare May 9, 2023 15:55
@valentinpalkovic
Copy link
Contributor Author

valentinpalkovic commented May 9, 2023

@yannbf Changed also some log paddings.

Before:
Bildschirmfoto 2023-05-09 um 17 53 19

After:
Bildschirmfoto 2023-05-09 um 17 52 19

Unfortunately, it is not really possible to change the padding of the prompt message. Therefore it looks a bit displaced. Unless you have an idea :)

@valentinpalkovic valentinpalkovic changed the title Throw a HandledError when attempting to initiate a project that has already been inited with Storybook Prompt to force initialization when storybook folder is detected May 9, 2023
@valentinpalkovic valentinpalkovic force-pushed the valentin/angular-already-installed-error branch from 970bc4d to 6a3266c Compare May 10, 2023 07:26
Copy link
Member

@yannbf yannbf left a comment

Choose a reason for hiding this comment

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

This looks pretty good ❤️

code/lib/cli/src/initiate.ts Outdated Show resolved Hide resolved
code/lib/cli/src/initiate.ts Outdated Show resolved Hide resolved
code/lib/cli/src/detect.ts Outdated Show resolved Hide resolved
@yannbf yannbf added the patch:yes Bugfix & documentation PR that need to be picked to main branch label May 11, 2023
@valentinpalkovic valentinpalkovic merged commit 142d58b into next May 11, 2023
62 checks passed
@valentinpalkovic valentinpalkovic deleted the valentin/angular-already-installed-error branch May 11, 2023 09:43
@shilman shilman added the patch:done Patch/release PRs already cherry-picked to main/release branch label May 12, 2023
shilman pushed a commit that referenced this pull request May 12, 2023
…nstalled-error

Prompt to force initialization when storybook folder is detected
@shilman shilman mentioned this pull request May 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli maintenance User-facing maintenance tasks patch:done Patch/release PRs already cherry-picked to main/release branch patch:yes Bugfix & documentation PR that need to be picked to main branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

storybook init: Angular project already installed
3 participants