From ca4b740085e574ea4cd842917eb317b0df09d725 Mon Sep 17 00:00:00 2001 From: tellthemachines Date: Wed, 11 Dec 2024 16:43:20 +1100 Subject: [PATCH 1/5] Give style book its own route so it can be linked to directly. --- .../sidebar-global-styles-wrapper/index.js | 23 ++++++++--- .../components/site-editor-routes/index.js | 2 + .../site-editor-routes/styles-stylebook.js | 40 +++++++++++++++++++ 3 files changed, 59 insertions(+), 6 deletions(-) create mode 100644 packages/edit-site/src/components/site-editor-routes/styles-stylebook.js diff --git a/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js b/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js index 030512a38fab3a..10491ab9454445 100644 --- a/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js +++ b/packages/edit-site/src/components/sidebar-global-styles-wrapper/index.js @@ -15,15 +15,18 @@ import { seen } from '@wordpress/icons'; import GlobalStylesUI from '../global-styles/ui'; import Page from '../page'; import { unlock } from '../../lock-unlock'; -import StyleBook from '../style-book'; -import { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants'; +// import StyleBook from '../style-book'; +// import { STYLE_BOOK_COLOR_GROUPS } from '../style-book/constants'; const { useLocation, useHistory } = unlock( routerPrivateApis ); const GlobalStylesPageActions = ( { isStyleBookOpened, setIsStyleBookOpened, + path, } ) => { + const stylebookPath = 'styles-stylebook'; + const history = useHistory(); return (