Skip to content

Commit 4cd7aff

Browse files
juanmaguitarclaude
andcommitted
Storybook: List every top-level folder in the sidebar order, design system first
SECTION_ORDER covered 8 of the 18 top-level folders, still started with "Docs" (not a root since #76671) and placed "Components" ahead of "Design System". The other 10 folders fell to the end in load order. List all 18 explicitly, grouped by affinity, with the design system right after the introduction. No file moves, no URL changes. Part of #82402 (proposal 1). Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1 parent 28d799a commit 4cd7aff

1 file changed

Lines changed: 19 additions & 5 deletions

File tree

‎storybook/preview.jsx‎

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,12 +109,20 @@ export const parameters = {
109109
},
110110
options: {
111111
storySort: ( a, b ) => {
112+
// Top-level folders in sidebar order. Every root is listed so the
113+
// order is deliberate; a nested array orders the folder before it.
112114
const SECTION_ORDER = [
113-
'Docs',
114-
'Playground',
115-
'BlockEditor',
115+
'Introduction',
116+
'Design System',
117+
[ 'Introduction', 'Tokens', 'Theme', 'Patterns', 'Components' ],
118+
'Foundations',
119+
'DataViews',
120+
'Fields',
121+
'Admin UI',
122+
'Icons',
116123
'Components',
117124
[
125+
'Introduction',
118126
'Actions',
119127
'Containers',
120128
'Feedback',
@@ -126,12 +134,18 @@ export const parameters = {
126134
'Utilities',
127135
'Deprecated',
128136
],
129-
'Icons',
130-
'Design System',
137+
'Tokens',
138+
'BlockEditor',
139+
'GlobalStylesUI',
140+
'ImageCropper',
141+
'MediaEditor',
142+
'Editor',
131143
'Widget Primitives',
132144
[ 'Introduction', 'Anatomy', 'System Architecture' ],
133145
'Widget Dashboard',
134146
[ 'Introduction', 'Anatomy', 'Widget Chrome', 'Playground' ],
147+
'Grid',
148+
'Playground',
135149
];
136150
const PRIORITIZED_MDX_DOCS = [ 'Introduction', 'Overview' ];
137151

0 commit comments

Comments
 (0)