Storybook: Allow stories to exist at the same level as nested folders

Created on 18 Sep 2017  路  2Comments  路  Source: storybookjs/storybook

Picking up on a request made by @psimyn in https://github.com/storybooks/storybook/issues/151#issuecomment-314322511

Initially this was one of the first patterns I attempted upon picking up Storybook, and it until I found @psimyn's comment it wasn't very clear why the below pattern didn't work as expected:

storiesOf('Grid', module)
    ...

storiesOf('Grid/Examples', module)
    ...

Expected: A single Grid folder containing some stories for my components, and then a nested Examples folder containing some usage examples.

Result: Two seperate Grid folders.

Depending whether we think this is worth supporting ... Even though the example in the docs doesn't at all present the above setup, I think potentially it'd be good to make it clearer in the docs that it can't be done currently. I think it's a pattern that's likely to be commonly assumed by developers when talking about nesting folders; what does everyone think?

View the relevant nesting documentation

Most helpful comment

It's already implemented and will be released with 3.3 馃槈

All 2 comments

It's already implemented and will be released with 3.3 馃槈

I'm closing this issue, 3.3.0-alpha.0 is on npm and can be tested. So if you want to try this now.

Was this page helpful?
0 / 5 - 0 ratings