From 0a8577e948af27bfb1f4ec654a4ff5328b608889 Mon Sep 17 00:00:00 2001 From: Anton Nikolaev Date: Tue, 31 May 2022 02:20:39 -0700 Subject: [PATCH] Show all available sections in sidebar Summary: Kevin Strider after reviewing Flipper docs structure suggested to show all sections in sidebar. This will make it easier for users to navigate website as they will be able to find all the content through sidebar menu. Before that only current section items were shown, so e.g. if user clicks "Learn more" on the start page they open "Features" section and it's not clear that there are a lot of other content (Setup, Creating Plugins, Under the Hood) which is only available through the top menu. Reviewed By: antonk52 Differential Revision: D36762008 fbshipit-source-id: a36cfb77e5d2efd4f5d8795d1c68e46d07ed79e1 --- website/sidebars.js | 122 +++++++++++++++++++++++--------------------- 1 file changed, 64 insertions(+), 58 deletions(-) diff --git a/website/sidebars.js b/website/sidebars.js index fa7dd42fd..ddeaefca0 100644 --- a/website/sidebars.js +++ b/website/sidebars.js @@ -10,22 +10,22 @@ const {fbInternalOnly, fbContent} = require('internaldocs-fb-helpers'); module.exports = { - features: { + main: { Features: [ 'features/index', 'features/share-flipper-data', 'features/react-native', + { + Plugins: [ + { + type: 'autogenerated', + dirName: 'features/plugins', + }, + ], + }, ...fbInternalOnly(['fb/plugins']), ], - Plugins: [ - { - type: 'autogenerated', - dirName: 'features/plugins', - }, - ], - }, - setup: { - 'Getting Started': [ + Setup: [ 'getting-started/index', { 'Adding Flipper to your app': [ @@ -60,7 +60,7 @@ module.exports = { ...fbInternalOnly(['getting-started/fb/connecting-to-flipper']), ...fbInternalOnly(['getting-started/fb/flipper-on-demand']), { - 'Troubleshooting': [ + Troubleshooting: [ 'getting-started/troubleshooting/troubleshooting', 'getting-started/troubleshooting/general', 'getting-started/troubleshooting/android', @@ -75,21 +75,23 @@ module.exports = { 'extending/supporting-layout', ], }, - ], - 'Plugin Setup': [ { - type: 'autogenerated', - dirName: 'setup/plugins', + 'Plugin Setup': [ + { + type: 'autogenerated', + dirName: 'setup/plugins', + }, + ], + }, + { + Advanced: [ + 'custom-ports', + 'stetho', + ...fbInternalOnly(['fb/www-certificate-exchange']), + ], }, ], - Advanced: [ - 'custom-ports', - 'stetho', - ...fbInternalOnly(['fb/www-certificate-exchange']), - ], - }, - extending: { - Tutorial: [ + 'Creating Plugins': [ 'tutorial/intro', 'tutorial/ios', 'tutorial/android', @@ -103,42 +105,46 @@ module.exports = { ], }, 'tutorial/js-publishing', + { + 'Development Workflow': [ + 'extending/dev-setup', + 'extending/loading-custom-plugins', + 'extending/desktop-plugin-structure', + 'extending/testing', + 'extending/debugging', + ...fbInternalOnly([ + 'fb/adding-analytics-0', + 'extending/fb/plugin-documentation', + ]), + 'extending/plugin-distribution', + 'extending/sandy-migration', + ], + }, + { + 'Desktop Plugin APIs': [ + 'extending/flipper-plugin', + 'extending/styling-components', + 'extending/style-guide', + 'extending/deeplinks', + 'extending/node-apis', + ...fbInternalOnly([ + { + 'QPL linting': ['fb/building-a-linter', 'fb/active-linters'], + }, + ]), + ], + }, + { + 'Client Plugin APIs': [ + 'extending/create-plugin', + 'extending/error-handling', + 'extending/arch', + 'extending/client-plugin-lifecycle', + 'extending/layout-inspector', + ], + }, ], - 'Development workflow': [ - 'extending/dev-setup', - 'extending/loading-custom-plugins', - 'extending/desktop-plugin-structure', - 'extending/testing', - 'extending/debugging', - ...fbInternalOnly([ - 'fb/adding-analytics-0', - 'extending/fb/plugin-documentation', - ]), - 'extending/plugin-distribution', - 'extending/sandy-migration', - ], - 'Desktop plugin APIs': [ - 'extending/flipper-plugin', - 'extending/styling-components', - 'extending/style-guide', - 'extending/deeplinks', - 'extending/node-apis', - ...fbInternalOnly([ - { - 'QPL linting': ['fb/building-a-linter', 'fb/active-linters'], - }, - ]), - ], - 'Client plugin APIs': [ - 'extending/create-plugin', - 'extending/error-handling', - 'extending/arch', - 'extending/client-plugin-lifecycle', - 'extending/layout-inspector', - ], - }, - internals: { - Internals: [ + 'Under the Hood': [ 'internals/index', 'internals/contributing', 'extending/public-releases',