From ca8c191b419a8335c94f9e1c9526793ecc1c35cb Mon Sep 17 00:00:00 2001 From: Aki Hamano <54422211+t-hamano@users.noreply.github.com> Date: Tue, 22 Oct 2024 22:36:13 +0900 Subject: [PATCH] Editor Interface: Remove small header from global styles/plugin sidebar (#64474) Co-authored-by: t-hamano Co-authored-by: stokesman Co-authored-by: jameskoster Co-authored-by: jasmussen Co-authored-by: afercia Co-authored-by: Mamaduka --- .../global-styles-sidebar/default-sidebar.js | 1 - .../components/global-styles-sidebar/index.js | 32 ++++++++++-------- .../components/global-styles/screen-css.js | 1 + .../src/components/plugin-sidebar/index.js | 13 -------- packages/interface/CHANGELOG.md | 4 +++ .../complementary-area-header/index.js | 33 +++++++------------ .../complementary-area-header/style.scss | 25 -------------- .../components/complementary-area/README.md | 8 ----- .../components/complementary-area/index.js | 7 ++-- .../components/complementary-area/style.scss | 6 +--- 10 files changed, 39 insertions(+), 91 deletions(-) diff --git a/packages/edit-site/src/components/global-styles-sidebar/default-sidebar.js b/packages/edit-site/src/components/global-styles-sidebar/default-sidebar.js index 5817c6d97ddddf..1f24bb49aa9f80 100644 --- a/packages/edit-site/src/components/global-styles-sidebar/default-sidebar.js +++ b/packages/edit-site/src/components/global-styles-sidebar/default-sidebar.js @@ -30,7 +30,6 @@ export default function DefaultSidebar( { scope="core" identifier={ identifier } title={ title } - smallScreenTitle={ title } icon={ icon } closeLabel={ closeLabel } header={ header } diff --git a/packages/edit-site/src/components/global-styles-sidebar/index.js b/packages/edit-site/src/components/global-styles-sidebar/index.js index 2b9a2669a96fe6..c0ad313d5d477c 100644 --- a/packages/edit-site/src/components/global-styles-sidebar/index.js +++ b/packages/edit-site/src/components/global-styles-sidebar/index.js @@ -11,6 +11,7 @@ import { store as editorStore, privateApis as editorPrivateApis, } from '@wordpress/editor'; +import { useViewportMatch } from '@wordpress/compose'; import { privateApis as routerPrivateApis } from '@wordpress/router'; /** @@ -81,6 +82,7 @@ export default function GlobalStylesSidebar() { const { setEditorCanvasContainerView } = unlock( useDispatch( editSiteStore ) ); + const isMobileViewport = useViewportMatch( 'medium', '<' ); useEffect( () => { if ( shouldClearCanvasContainerView ) { @@ -149,20 +151,22 @@ export default function GlobalStylesSidebar() { gap={ 1 } className="edit-site-global-styles-sidebar__header-actions" > - -