'Is it possible to use storySort for story variants?

I've got a storybook instance set up with some custom sorting added in order to ensure that the docs section appears at the top and is ordered correctly. However, it is now alphabetising all of the stories and their variations. This is annoying and I can't seem to change it using storySort, is this not possible or am I doing something wrong?

Here's an example of what it currently looks like: Screenshot of sidebar

All of this is fine until you reach the Button story, as you can see, each variant has been added in alphabetical order instead of the order they are in on the page. Here is my storySort object, have I done something wrong here?

storySort: {
      method: 'configure',
      includeName: true,
      order: [
        'Docs',
        [
          'Introduction',
          'Coding Guidelines',
          ['General'],
          '*',
          'Architectural Decisions',
          ['Introduction']
        ],
        'Atoms',
        'Molecules',
        'Organisms',
        'Pages'
      ]
    }

I've also tried it without adding method and includeName but that doesn't seem to make a difference. I've also tried adding ['*', ['Default', 'Primary', 'Secondary', 'Tertiary', 'Alternate']], underneath each Atoms, Molecules and Organisms entries but that didn't seem to make a difference.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source