From a88f3c26dfb4543d999b004f6357d56061a1823c Mon Sep 17 00:00:00 2001 From: Nik Tsekouras Date: Thu, 1 Jun 2023 12:17:34 +0300 Subject: [PATCH] Fix styling of actions in site editor navigation sidebar (#51153) --- .../sidebar-navigation-screen-global-styles/index.js | 4 ++-- .../src/components/sidebar-navigation-screen-page/index.js | 4 ++-- .../components/sidebar-navigation-screen-template/index.js | 4 ++-- .../src/components/sidebar-navigation-screen/index.js | 6 +++++- .../src/components/sidebar-navigation-screen/style.scss | 4 ++++ 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js index 9fd87521806194..8e6f080e74a80a 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-global-styles/index.js @@ -118,7 +118,7 @@ export default function SidebarNavigationScreenGlobalStyles() { ) } content={ } actions={ -
+ <> { ! isMobileViewport && ( await openGlobalStyles() } /> -
+ } /> { isStyleBookOpened && ! isMobileViewport && ( diff --git a/packages/edit-site/src/components/sidebar-navigation-screen-page/index.js b/packages/edit-site/src/components/sidebar-navigation-screen-page/index.js index 2404217dcd81ac..5e0c113b3544ad 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen-page/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen-page/index.js @@ -79,7 +79,7 @@ export default function SidebarNavigationScreenPage() { record?.title?.rendered || __( '(no title)' ) ) } actions={ -
+ <> -
+ } meta={ + <> - + } description={ description } /> diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/index.js b/packages/edit-site/src/components/sidebar-navigation-screen/index.js index 0baac6278c4307..67e22721e78f0b 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen/index.js +++ b/packages/edit-site/src/components/sidebar-navigation-screen/index.js @@ -83,7 +83,11 @@ export default function SidebarNavigationScreen( { title ) } - { actions } + { actions && ( +
+ { actions } +
+ ) } { meta && ( <> diff --git a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss index 81508a7709d942..111b2650e41256 100644 --- a/packages/edit-site/src/components/sidebar-navigation-screen/style.scss +++ b/packages/edit-site/src/components/sidebar-navigation-screen/style.scss @@ -57,6 +57,10 @@ padding: $grid-unit-15 * 0.5 0 0 0; } +.edit-site-sidebar-navigation-screen__actions { + flex-shrink: 0; +} + .edit-site-sidebar-navigation-screen__content .edit-site-global-styles-style-variations-container { .edit-site-global-styles-variations_item-preview { border: $gray-900 $border-width solid;