storybookjs / storybook

Storybook is the industry standard workshop for building, documenting, and testing UI components in isolation
https://storybook.js.org
MIT License
84.09k stars 9.25k forks source link

CLI argument to open storybook to a specific story #7664

Open elevatebart opened 5 years ago

elevatebart commented 5 years ago

Is your feature request related to a problem? Please describe. I am frustrated when I have to search for the story I am looking for among the 1000 stories my storybook has.

Describe the solution you'd like A CLI argument that would allow the storybook command to open to an existing story.

Describe alternatives you've considered We could instead filter stories that open. We would not have to search

Are you able to assist bring the feature to reality? I can cook up a pull request but it might take time

Additional context What would be even better would be integration with IDEs and code editors (VSCode, Atom, WebStrorm)?

elevatebart commented 5 years ago

@mdvorscak this was your idea, credit is due where credit is due ;)

elevatebart commented 5 years ago

@shilman Do you think there are enough details to start a discussion? To start coding.

shilman commented 5 years ago

This sounds reasonable. How do you expect users to run it? Like this:

yarn storybook --story my-button--basic

Or is it more of a utility for integrating with other tools?

Related #6201 #5065 #5855

elevatebart commented 5 years ago

I was thinking of exactly this, to start with. This would probably allow external tools to interact efficiently with the parameter Because the story names can be lengthy, next step would be to allow to specify only part of the name. Think of it like in jest: instead of

yarn storybook --story my-button--basic

we would be allowed to write

yarn storybook --story button--bas

... typing is hard and I am lazy ;)

github-actions[bot] commented 5 years ago

Automention: Hey @Keraito, you've been tagged! Can you give a hand here?

fabiomartins87 commented 4 years ago

I would like to help on this. I am not familiarized with the codebase...could you just give me a tip on where to start?

cliffpyles commented 4 years ago

@fabiomartins87 Did you decide to take a shot at this one? Or is this one up for grabs?

azinit commented 1 year ago

Still actual! :(

ygkn commented 1 year ago

Hi. I created VS Code extension for opening Storybook from editor. I hope it helps you.

Storybook Opener - Visual Studio Marketplace

GitHub