From 15e9d105c45688c8b77c644432374a3e58b35bf7 Mon Sep 17 00:00:00 2001 From: Michel Weststrate Date: Thu, 26 May 2022 04:26:20 -0700 Subject: [PATCH] Restore styleguide menu entry, reordered menu Summary: The styleguide was no longer accessible in Flipper, this diff restores that, and also cleans up the extras menu a bit to by creating a plugin devs only section. Reviewed By: antonk52 Differential Revision: D36697071 fbshipit-source-id: a2abce40157fffd4952172f379c8063492e2dcc0 --- .../src/sandy-chrome/LeftRail.tsx | 29 +++++++++++-------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/desktop/flipper-ui-core/src/sandy-chrome/LeftRail.tsx b/desktop/flipper-ui-core/src/sandy-chrome/LeftRail.tsx index 53ed50f1c..ae5d4e602 100644 --- a/desktop/flipper-ui-core/src/sandy-chrome/LeftRail.tsx +++ b/desktop/flipper-ui-core/src/sandy-chrome/LeftRail.tsx @@ -68,6 +68,7 @@ import {openDeeplinkDialog} from '../deeplink'; import {css} from '@emotion/css'; import {getRenderHostInstance} from '../RenderHost'; import openSupportRequestForm from '../fb-stubs/openSupportRequestForm'; +import {StyleGuide} from './StyleGuide'; const LeftRailButtonElem = styled(Button)<{kind?: 'small'}>(({kind}) => ({ width: kind === 'small' ? 32 : 36, @@ -216,10 +217,6 @@ const submenu = css` } `; -const MenuDividerPadded = styled(Menu.Divider)({ - marginBottom: '8px !important', -}); - function ExtrasMenu() { const store = useStore(); @@ -280,14 +277,24 @@ function ExtrasMenu() { Export shareable link ) : null} - openDeeplinkDialog(store)}> - Trigger deeplink - + + + { + store.dispatch(setStaticView(StyleGuide)); + }}> + Flipper Style Guide + + openDeeplinkDialog(store)}> + Trigger deeplink + + + {config.isFBBuild ? ( <> - { @@ -307,11 +314,9 @@ function ExtrasMenu() { ) : null} - setShowSettings(true)}> Settings - setWelcomeVisible(true)}> Help