Storybook: [Suggestion] add bookshelf feature to classify books/stories

Created on 19 Aug 2017  路  2Comments  路  Source: storybookjs/storybook

I have categories for different purposes:

  • Component: display a UI element for reusability
  • Scene: display a whole UI page for a scene
  • App: display the whole app with full functionalities just like react-native start
  • and more... for testing specific functionalities with UI

My current stories are like this:

screen shot 2017-08-19 at 10 09 12

* [API] REST API
* [Scene] AdDialog
* [Comp] BannerButton
* [Comp] BannerView

I want to make stories to be classified in categories

* API
    * REST API
* App
    * new start
    * logged-in user
* Components
    * BannerButton
    * BannerView
    * ...
* Scenes
    * AdDialog
    * ....

using the following code

// original story: accept a string for the story name
storiesOf('[Scene] AdDialog', module)

// with category: accept an array for the category and story names
storiesOf(['Scene', 'AdDialog'], module)
stories question / support

Most helpful comment

Hi @xareelee -- you can use the new Story Heirarchy feature to achieve this I think? https://medium.com/storybookjs/announcing-storybook-3-2-e00918a1764c

Try storiesOf('Scene / AdDialog', module) etc

All 2 comments

Hi @xareelee -- you can use the new Story Heirarchy feature to achieve this I think? https://medium.com/storybookjs/announcing-storybook-3-2-e00918a1764c

Try storiesOf('Scene / AdDialog', module) etc

Thanks for the info. I did not notice this new feature. It works after upgrading to 3.2.

Was this page helpful?
0 / 5 - 0 ratings