ladle icon indicating copy to clipboard operation
ladle copied to clipboard

Story sorting

Open joe-bell opened this issue 3 years ago • 1 comments

Is your feature request related to a problem? Please describe.

We've just migrated our internal Storybook to Ladle and we're super happy with the results, but one thing we miss dearly is the ability to sort stories

Storybook offers the storySort option for this, and we used this previously to bring more-important stories/READMEs to the top of the navigation

Describe the solution you'd like

Something like a sort parameter in Ladle's config.js:

export default {
  sort: {
    order: ['Intro', 'Pages', ['Home', 'Login', 'Admin'], 'Components', '*', 'WIP']
  }
};

Which by default would be set as:

export default {
  sort: {
    method: "Alphabetical"
  }
};

Describe alternatives you've considered

N/A

Additional context

N/A

joe-bell avatar Jun 28 '22 14:06 joe-bell

Yea, this would be a nice feature to have.

tajo avatar Jun 28 '22 17:06 tajo