diff --git a/packages/edit-site/src/components/block-editor/index.js b/packages/edit-site/src/components/block-editor/index.js index 4957beee030f2b..cc5e7c8d9254df 100644 --- a/packages/edit-site/src/components/block-editor/index.js +++ b/packages/edit-site/src/components/block-editor/index.js @@ -143,6 +143,7 @@ export default function BlockEditor() { const [ resizeObserver, sizes ] = useResizeObserver(); const isTemplatePart = templateType === 'wp_template_part'; + const hasBlocks = blocks.length !== 0; const enableResizing = isTemplatePart && @@ -169,9 +170,7 @@ export default function BlockEditor() { { ( [ editorCanvasView ] ) => editorCanvasView ? (
- - { editorCanvasView } - + { editorCanvasView }
) : ( unlock( select( editSiteStore ) ).getEditorCanvasContainerView(), @@ -62,6 +68,7 @@ function EditorCanvasContainer( { children, closeButtonLabel, onClose } ) { () => getEditorCanvasContainerTitle( editorCanvasContainerView ), [ editorCanvasContainerView ] ); + function onCloseContainer() { if ( typeof onClose === 'function' ) { onClose(); @@ -97,24 +104,26 @@ function EditorCanvasContainer( { children, closeButtonLabel, onClose } ) { return ( - { /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ } -
- { shouldShowCloseButton && ( -
+ + { /* eslint-disable-next-line jsx-a11y/no-noninteractive-element-interactions */ } +
+ { shouldShowCloseButton && ( +
+
); } diff --git a/packages/edit-site/src/components/revisions/index.js b/packages/edit-site/src/components/revisions/index.js index 347d05094ef376..3e06b6415cc4ea 100644 --- a/packages/edit-site/src/components/revisions/index.js +++ b/packages/edit-site/src/components/revisions/index.js @@ -74,6 +74,7 @@ function Revisions( { onClose, userConfig, blocks } ) { title={ __( 'Revisions' ) } onClose={ onClose } closeButtonLabel={ __( 'Close revisions' ) } + enableResizing={ true } >