storybookjs/storybook

Add toolbar to --docs mode

Open

#13,025 opened on 2020年11月5日

GitHub で見る
 (6 comments) (4 reactions) (0 assignees)TypeScript (89,909 stars) (10,058 forks)batch import
addon: docsfeature requesthelp wantedtriage:reviewedui

説明

Is your feature request related to a problem? Please describe I want to be able to write docs that use controls. But this adds a lot of sub-menus to components in the sidebar navigation in storybook.

Describe the solution you'd like A way to write docs pages where ArgsTable can use controls. But without adding an extra story to the sidebar.

Describe alternatives you've considered Running the storybook with the "--docs" flag was the closest thing I could find for this use case. But that hides the "Notes" tab.

Are you able to assist to bring the feature to reality? no

Additional context Another workaround is setting canvas to hidden in preview.js. That hides the unnecessary "Canvas" tab which is pointless if you only want to read Docs. But the sidebar sub-menus for component variants still remain visible in this method which is a bit annoying. I really don't want a separate expanded sidebar entry for any component variant.

Live example I either want to

  • Add controls to the ArgsTable in this page written with .mdx without adding an extra story to the sidebar nav [Source] or
  • Hide the sub-menu items for component variants from the side navigation in this page written in .tsx but without hiding the "Notes" tab [Source]

The second option is preferred because in the first option we're actually removing stories that we'd usually want Chromatic to analyze for UI changes.

Possibly related: #9209

コントリビューターガイド

Add toolbar to --docs mode · storybookjs/storybook#13025 | Good First Issue