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

Have stories on each level of hierarchy #1699

Closed
igor-dv opened this issue Aug 21, 2017 · 8 comments
Closed

Have stories on each level of hierarchy #1699

igor-dv opened this issue Aug 21, 2017 · 8 comments

Comments

@igor-dv
Copy link
Member

igor-dv commented Aug 21, 2017

This is very asked improvement from the beginning of the hierarchy feature.

Today we have this:

storiesOf('Cells/Molecules', module)
  .add('with text', () => <Button>Hello Button</Button>)
  .add('with some emoji', () => <Button>😀 😎 👍 💯</Button>);

storiesOf('Cells/Molecules/Atoms', module)
  .add('with text2', () => <Button>Hello Button</Button>)
  .add('with some emoji2', () => <Button>😀 😎 👍 💯</Button>);

That will be shown as

- Cells
  - Molecules                
    - with text                
    - with some emoji   
  - Molecules               
    - Atoms                   
      - with text 2
      - with some emoji 2

Desired

- Cells
  - Molecules                
    - with text                
    - with some emoji   
    - Atoms                   
      - with text 2
      - with some emoji 2

In this case we should allow stories and groups to be in the same level.

@igor-dv igor-dv changed the title Have stories on each level of Have stories on each level of hierarchy Aug 21, 2017
@igor-dv
Copy link
Member Author

igor-dv commented Aug 21, 2017

I would like us to discuss this. Do we want to implement this ? Do we want to keep it configurable ?

For example the first thing I can think about is to remove the story auto-selection when clicking the storyKind.

@TomiS
Copy link

TomiS commented Aug 25, 2017

Yes! I ran into this problem in less than 10 minutes with Storybook. I'd also consider this as a bug and not a feature improvement. I think Storybook should merge the nested structure independent of how it is exactly defined.

However, I recognise this might not be trivial. E.g. ordering might raise questions.

@ndelangen
Copy link
Member

ndelangen commented Aug 25, 2017

I think the desired output IS clearly what everyone expects and wants us to do.
And I agree 100% that's what we want too.

Who's interesting in making a PR for this?

@igor-dv
Copy link
Member Author

igor-dv commented Aug 25, 2017

I'll take it 😉

@igor-dv
Copy link
Member Author

igor-dv commented Aug 29, 2017

What do you think about always putting stories at the beginning ?

image

@ndelangen
Copy link
Member

@igor-dv I'm pretty sure that's what everyone is expecting ✅

@ndelangen
Copy link
Member

This feature is complete and merged to the 3.3 branch

@stale
Copy link

stale bot commented Nov 2, 2017

Hi everyone! Seems like there hasn't been much going on in this issue lately. If there are still questions, comments, or bugs, please feel free to continue the discussion. We do try to do some housekeeping every once in a while so inactive issues will get closed after 90 days. Thanks!

@stale stale bot added the inactive label Nov 2, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants