storybook: Story roots not working as expected with 5.3

Describe the bug I have several stories in the form of Root/Story || Root/Submenu/Story || Root/Submenu/Submenu/Story Before 5.3, this worked fine with the different hierarchy specifiers I could use. Just trying to recreate that in the new setup.

Example Story Names Being Used

  • Introduction/Getting Started
  • Introduction/Framework Integration/React
  • Design System/Components/Button

Below screenshot is how they currently show up. Would expect Design System to also be a root level and not within Others. Can’t share my repo, but will try and share whatever I can.

Screen Shot 2020-01-15 at 9 32 51 PM

Also using the sort function within the preview.js file.

 storySort: ([first], [second]) => {
      const [firstType] = first.split('-');
      const [secondType] = second.split('-');

      if (firstType === 'introduction') return -1;
      if (firstType === secondType) return 0;

      return 1;
    }

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (10 by maintainers)

Most upvoted comments

adding in showRoots worked out. ended up having some stories that I didn’t convert over (still had | instead of /). think that was the main cause for the Others grouping? works great now though

Yay!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.6 containing PR #9504 that references this issue. Upgrade today to try it out!

Closing this issue. Please re-open if you think there’s still more to do.