Page MenuHomePhabricator

Components Storybook: Consider removing the extra nesting level below component stories
Closed, InvalidPublic

Description

At the time of writing this, we only have a single story for all our component stories, but each of our component stories list a separate sub page. The storybook navigation shows Button/normal instead of just Button, Icon/all instead of just Icon, and so on. This looks redundant!

We're using Storybook's Component Story Format which requires named exports for sub-stories of the component story, so getting rid of the extra nesting doesn't seem easily possible. There may be a way to do it with mdx stories.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

This ticket is suggesting an optimization of how we lay out the navigation with stories in the shape in which we currently organize them - a single story per component showing all variants of the component.

An alternative to altering how storybook functions could be to use storybook in the way it seems to be, at least in my interpretation, intended by its authors - creating a dedicated story per component variant.

This is also touched on in T264733#6541820.

If this is desired, there seems to be native support for it with Storybook 6.1: UI: Single story hoisting in sidebar #13039

Sarai-WMDE subscribed.

This ticket is no longer relevant because we're deprecating our legacy design system, WiKit (See T327532).