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

Docs: Adds commands to the documentation #25589

Merged
merged 12 commits into from
Jan 22, 2024
Merged

Docs: Adds commands to the documentation #25589

merged 12 commits into from
Jan 22, 2024

Conversation

jonniebigodes
Copy link
Contributor

Partially addresses #21752 and follows up on #25538 and #22236

What I did

With this pull request the documentation was updated to feature some of the common commands used with Storybook (e.g., add, doctor).

What was done:

  • Updated the CLI options documentation to feature some of the common commands
  • Updated the upgrade documentation to factor in the doctor command
  • Updated the addon installation to start mentioning the add command as the way users should install Storybook addons.

@shilman and @yannbf, when both of you have a moment, can you take a look and follow up with me with the feedback you may have so that we can address it and get this merged in? One small item to put on your radar; if both of you are ok with it, I will push a pull request updating the remainder of the documentation to have the addons follow along with the add command approach to help streamline the overall workflow and maintenance. We can talk a bit more about this async.

Checklist for Contributors

Testing

  1. Follow the steps in the contributing instructions for this branch, docs_adds_doctor.
  2. Open the relevant documentation and verify the feature changes.

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/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>

@jonniebigodes jonniebigodes added documentation ci:docs Run the CI jobs for documentation checks only. labels Jan 12, 2024
@jonniebigodes jonniebigodes self-assigned this Jan 12, 2024
docs/addons/install-addons.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved

With the exception of preset addons, all addons have the same installation process: install and register.
Storybook includes a [`storybook add`](../api/cli-options.md#add) command to automate the setup of addons. Several community-led addons can be added using this command, except for preset addons. We encourage you to read the addon's documentation to learn more about its installation process.
Copy link
Contributor

Choose a reason for hiding this comment

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

This is more of a feature comment/question than a documentation one.

except for preset addons

I didn't realize the add command had this limitation. How do we expect users to know the difference? Is this a short-term limitation?

Copy link
Contributor

Choose a reason for hiding this comment

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

@shilman ☝️

Copy link
Member

Choose a reason for hiding this comment

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

Why can’t it handle preset style addons?

Copy link
Member

Choose a reason for hiding this comment

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

If there are any addons where add fails, we should figure out what’s going on and fix the issue

Copy link
Contributor

Choose a reason for hiding this comment

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

Why can’t it handle preset style addons?

I was just going on what was documented here. If that limitation isn't factual, that's great!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So that we're all on the same page here, this isn't on us. Our presets are working; what I've encountered during my rounds collecting community addons is basically this, I've run into situations where preset addons failed to register. I cannot know for sure what's causing it, could be an outdated version or something of that nature. Hence why I left it as such so that we don't run into any situations where a user faces a similar question, reach out to us raising an issue/ discussion when the situation is out of our control.

Copy link
Member

Choose a reason for hiding this comment

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

Could you please share a scenario where you had this failure? Thanks!

docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
Copy link
Contributor

@JReinhold JReinhold left a comment

Choose a reason for hiding this comment

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

Looks good overall but some information is slightly incorrect.

docs/api/cli-options.md Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved
docs/api/cli-options.md Outdated Show resolved Hide resolved

### `info`

Reports useful debugging information about your environment. Helpful in providing information when opening an issue or a discussion.
Copy link
Member

Choose a reason for hiding this comment

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

would it make sense to mention Github here? or even a link to the repo?


<Callout variant="info">

The `framework-filter` argument is optional and can filter the list of available frameworks. For example, `storybook sandbox react` will only show React-based sandboxes.
Copy link
Member

@yannbf yannbf Jan 22, 2024

Choose a reason for hiding this comment

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

Suggested change
The `framework-filter` argument is optional and can filter the list of available frameworks. For example, `storybook sandbox react` will only show React-based sandboxes.
The `framework-filter` argument is optional and can filter the list of available frameworks. For example, `storybook sandbox` will prompt you with a list of all available sandboxes, where `storybook sandbox react` will only show React-based sandboxes.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is just a placeholder, as the CLI options need to be accounted for the CLI versioning.

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 is looking great! Thank you so much for all this <3

@jonniebigodes jonniebigodes merged commit 4833849 into next Jan 22, 2024
18 checks passed
@jonniebigodes jonniebigodes deleted the docs_adds_doctor branch January 22, 2024 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci:docs Run the CI jobs for documentation checks only. documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants