diff --git a/packages/edit-post/src/components/layout/index.js b/packages/edit-post/src/components/layout/index.js index 94db337d34f17..acc71afe1db0a 100644 --- a/packages/edit-post/src/components/layout/index.js +++ b/packages/edit-post/src/components/layout/index.js @@ -407,6 +407,9 @@ function Layout( { const isRenderingPostOnly = getRenderingMode() === 'post-only'; const isNotDesignPostType = ! DESIGN_POST_TYPES.includes( currentPostType ); + const isDirectlyEditingPattern = + currentPostType === 'wp_block' && + ! onNavigateToPreviousEntityRecord; return { mode: getEditorMode(), @@ -417,7 +420,9 @@ function Layout( { !! select( blockEditorStore ).getBlockSelectionStart(), showIconLabels: get( 'core', 'showIconLabels' ), isDistractionFree: get( 'core', 'distractionFree' ), - showMetaBoxes: isNotDesignPostType && ! isZoomOut(), + showMetaBoxes: + ( isNotDesignPostType && ! isZoomOut() ) || + isDirectlyEditingPattern, isWelcomeGuideVisible: isFeatureActive( 'welcomeGuide' ), templateId: supportsTemplateMode && @@ -435,6 +440,7 @@ function Layout( { currentPostId, isEditingTemplate, settings.supportsTemplateMode, + onNavigateToPreviousEntityRecord, ] ); useMetaBoxInitialization( hasActiveMetaboxes );