diff --git a/packages/edit-site/src/components/block-editor/index.js b/packages/edit-site/src/components/block-editor/index.js index 4957beee030f2..cc5e7c8d9254d 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/editor-canvas-container/style.scss b/packages/edit-site/src/components/editor-canvas-container/style.scss index acc0e0872f0b4..452b778f40682 100644 --- a/packages/edit-site/src/components/editor-canvas-container/style.scss +++ b/packages/edit-site/src/components/editor-canvas-container/style.scss @@ -1,5 +1,4 @@ .edit-site-editor-canvas-container { - background: $white; // Fallback color, overridden by JavaScript. border-radius: $radius-block-ui; bottom: 0; left: 0; diff --git a/packages/edit-site/src/components/revisions/index.js b/packages/edit-site/src/components/revisions/index.js index 347d05094ef37..28386ac1ca3e6 100644 --- a/packages/edit-site/src/components/revisions/index.js +++ b/packages/edit-site/src/components/revisions/index.js @@ -77,8 +77,15 @@ function Revisions( { onClose, userConfig, blocks } ) { >