diff --git a/packages/edit-site/src/components/block-editor/site-editor-canvas.js b/packages/edit-site/src/components/block-editor/site-editor-canvas.js index bfbb2d3eac43ff..944dbab3f96f08 100644 --- a/packages/edit-site/src/components/block-editor/site-editor-canvas.js +++ b/packages/edit-site/src/components/block-editor/site-editor-canvas.js @@ -24,7 +24,6 @@ import { NAVIGATION_POST_TYPE, } from '../../utils/constants'; import { unlock } from '../../lock-unlock'; -import PageContentFocusNotifications from '../page-content-focus-notifications'; export default function SiteEditorCanvas() { const { clearSelectedBlock } = useDispatch( blockEditorStore ); @@ -60,50 +59,46 @@ export default function SiteEditorCanvas() { const forceFullHeight = isNavigationFocusMode; return ( - <> - - { ( [ editorCanvasView ] ) => - editorCanvasView ? ( -
- { editorCanvasView } -
- ) : ( - { - // Clear selected block when clicking on the gray background. - if ( event.target === event.currentTarget ) { - clearSelectedBlock(); - } - } } + + { ( [ editorCanvasView ] ) => + editorCanvasView ? ( +
+ { editorCanvasView } +
+ ) : ( + { + // Clear selected block when clicking on the gray background. + if ( event.target === event.currentTarget ) { + clearSelectedBlock(); + } + } } + > + + - - - - { resizeObserver } - - - - ) - } -
- - + { resizeObserver } + + +
+ ) + } +
); } diff --git a/packages/edit-site/src/components/page-content-focus-notifications/index.js b/packages/edit-site/src/components/page-content-focus-notifications/index.js deleted file mode 100644 index b4d8f62436ba27..00000000000000 --- a/packages/edit-site/src/components/page-content-focus-notifications/index.js +++ /dev/null @@ -1,8 +0,0 @@ -/** - * Internal dependencies - */ -import EditTemplateNotification from './edit-template-notification'; - -export default function PageContentFocusNotifications( { contentRef } ) { - return ; -} diff --git a/packages/edit-site/src/components/page-content-focus-notifications/edit-template-notification.js b/packages/editor/src/components/editor-canvas/edit-template-blocks-notification.js similarity index 94% rename from packages/edit-site/src/components/page-content-focus-notifications/edit-template-notification.js rename to packages/editor/src/components/editor-canvas/edit-template-blocks-notification.js index 8799eb4d661281..047ca6688ff021 100644 --- a/packages/edit-site/src/components/page-content-focus-notifications/edit-template-notification.js +++ b/packages/editor/src/components/editor-canvas/edit-template-blocks-notification.js @@ -6,7 +6,11 @@ import { useEffect, useState, useRef } from '@wordpress/element'; import { store as noticesStore } from '@wordpress/notices'; import { __ } from '@wordpress/i18n'; import { __experimentalConfirmDialog as ConfirmDialog } from '@wordpress/components'; -import { store as editorStore } from '@wordpress/editor'; + +/** + * Internal dependencies + */ +import { store as editorStore } from '../../store'; /** * Component that: @@ -22,7 +26,7 @@ import { store as editorStore } from '@wordpress/editor'; * @param {import('react').RefObject} props.contentRef Ref to the block * editor iframe canvas. */ -export default function EditTemplateNotification( { contentRef } ) { +export default function EditTemplateBlocksNotification( { contentRef } ) { const renderingMode = useSelect( ( select ) => select( editorStore ).getRenderingMode(), [] diff --git a/packages/editor/src/components/editor-canvas/index.js b/packages/editor/src/components/editor-canvas/index.js index 86df470087862b..a0e82694b10449 100644 --- a/packages/editor/src/components/editor-canvas/index.js +++ b/packages/editor/src/components/editor-canvas/index.js @@ -27,6 +27,7 @@ import { useMergeRefs } from '@wordpress/compose'; import PostTitle from '../post-title'; import { store as editorStore } from '../../store'; import { unlock } from '../../lock-unlock'; +import EditTemplateBlocksNotification from './edit-template-blocks-notification'; const { LayoutStyle, @@ -361,6 +362,7 @@ function EditorCanvas( } renderAppender={ renderAppender } /> + { children }