From 1a5205608f45ade4001fcf8b857f97b586352bed Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Fri, 28 May 2021 13:00:18 +0100 Subject: [PATCH] Remove metaboxes from template mode --- packages/edit-post/src/components/layout/index.js | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 52457c93507d2e..43e5bf16a9cd2a 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -85,9 +85,11 @@ function Layout( { styles } ) { showIconLabels, hasReducedUI, showBlockBreadcrumbs, + isTemplateMode, } = useSelect( ( select ) => { const editorSettings = select( editorStore ).getEditorSettings(); return { + isTemplateMode: select( editPostStore ).isEditingTemplate(), hasFixedToolbar: select( editPostStore ).isFeatureActive( 'fixedToolbar' ), @@ -227,10 +229,12 @@ function Layout( { styles } ) { { isRichEditingEnabled && mode === 'visual' && ( ) } -
- - -
+ { ! isTemplateMode && ( +
+ + +
+ ) } { isMobileViewport && sidebarIsOpened && ( ) }