Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update/content empty #56898

Draft
wants to merge 7 commits into
base: trunk
Choose a base branch
from
Prev Previous commit
Next Next commit
Merge branch 'trunk' into update/content-empty
  • Loading branch information
SaxonF committed Dec 13, 2023
commit 2d8b7ded95f70be1a1f1a731a6a0862cdaad78da
Original file line number Diff line number Diff line change
Expand Up @@ -66,29 +66,37 @@ export default function SiteEditorCanvas() {
const forceFullHeight = isNavigationFocusMode;

return (
<>
<EditorCanvasContainer.Slot>
{ ( [ editorCanvasView ] ) =>
editorCanvasView ? (
<div className="edit-site-visual-editor is-focus-mode">
{ editorCanvasView }
</div>
) : (
<BlockTools
className={ classnames( 'edit-site-visual-editor', {
'is-focus-mode':
isFocusMode ||
!! editorCanvasView ||
isEditingTemplate,
'is-view-mode': isViewMode,
} ) }
__unstableContentRef={ contentRef }
onClick={ ( event ) => {
// Clear selected block when clicking on the gray background.
if ( event.target === event.currentTarget ) {
clearSelectedBlock();
}
} }
<EditorCanvasContainer.Slot>
{ ( [ editorCanvasView ] ) =>
editorCanvasView ? (
<div className="edit-site-visual-editor is-focus-mode">
{ editorCanvasView }
</div>
) : (
<BlockTools
className={ classnames( 'edit-site-visual-editor', {
'is-focus-mode':
isFocusMode ||
!! editorCanvasView ||
isEditingTemplate,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for the change here and why it's limited only to the site editor?

'is-view-mode': isViewMode,
} ) }
__unstableContentRef={ contentRef }
onClick={ ( event ) => {
// Clear selected block when clicking on the gray background.
if ( event.target === event.currentTarget ) {
clearSelectedBlock();
}
} }
>
<BackButton />
<ResizableEditor
enableResizing={ enableResizing }
height={
sizes.height && ! forceFullHeight
? sizes.height
: '100%'
}
>
<EditorCanvas
enableResizing={ enableResizing }
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.