diff --git a/docs/src/_data/config_options.yml b/docs/src/_data/config_options.yml index f394dcae0..c85349afe 100644 --- a/docs/src/_data/config_options.yml +++ b/docs/src/_data/config_options.yml @@ -50,6 +50,12 @@ previews: example: config.lookbook.preview_inspector.drawer_panels = [:notes, :params] description: List of panels to display in the preview inspector + - name: preview_inspector.sidebar_panels + types: Array + default: '[:previews, :pages]' + example: config.lookbook.preview_inspector.sidebar_panels = [:pages, :previews] + description: Controls the order and availability of the sidebar navigation panels. + - name: preview_embeds.enabled types: Boolean default: "true" diff --git a/docs/src/_guide/ui/other.md b/docs/src/_guide/ui/navigation.md similarity index 80% rename from docs/src/_guide/ui/other.md rename to docs/src/_guide/ui/navigation.md index 495ff1df2..546c2c9f1 100644 --- a/docs/src/_guide/ui/other.md +++ b/docs/src/_guide/ui/navigation.md @@ -29,6 +29,16 @@ title: Navigation ``` <% end %> +<%= render section("Sections order", id: "sections-order") do |s| %> + + To change the order of the navigation sections in the sidebar, use the `preview_inspector.sidebar_panels` config option: + + ```ruby + # Display pages before previews in the sidebar + config.lookbook.preview_inspector.sidebar_panels = [:pages, :previews] + ``` +<% end %> + <%= render section("Scenario order", id: "scenario-order") do |s| %> By default scenarios are listed in the navigation in the order in which they are defined in the preview class.