From 634b0096220242a8ba73b09fc939e857f5e8721d Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Sat, 24 Feb 2024 12:10:38 +0100 Subject: [PATCH 1/3] Add is-zoom-out to top level site editor element --- packages/edit-site/src/components/layout/index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index fcb0a74b0b3b8..e0777152e0d1c 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -70,6 +70,7 @@ export default function Layout() { const { isDistractionFree, + isZoomOut, hasFixedToolbar, hasBlockSelected, canvasMode, @@ -96,6 +97,9 @@ export default function Layout() { 'core', 'distractionFree' ), + isZoomOut: + select( blockEditorStore ).__unstableGetEditorMode() === + 'zoom-out', hasBlockSelected: select( blockEditorStore ).getBlockSelectionStart(), }; @@ -172,6 +176,7 @@ export default function Layout() { 'is-full-canvas': canvasMode === 'edit', 'has-fixed-toolbar': hasFixedToolbar, 'is-block-toolbar-visible': hasBlockSelected, + 'is-zoom-out': isZoomOut, } ) } > From c77ed3723ea090b0176cc6d50c6d8252e003627d Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Sat, 24 Feb 2024 12:18:47 +0100 Subject: [PATCH 2/3] Allow pattern inserter to push zoom out mode canvas --- .../block-editor/src/components/inserter/style.scss | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/packages/block-editor/src/components/inserter/style.scss b/packages/block-editor/src/components/inserter/style.scss index 35c18e1d9acce..685355a81a297 100644 --- a/packages/block-editor/src/components/inserter/style.scss +++ b/packages/block-editor/src/components/inserter/style.scss @@ -767,3 +767,13 @@ $block-inserter-tabs-height: 44px; } } } + +.is-zoom-out { + .block-editor-inserter__menu { + display: flex; + } + + .block-editor-inserter__patterns-category-dialog { + position: static; + } +} From 8aa82d1d2c2b8a20ac49f9479142f279e3752a64 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Sat, 24 Feb 2024 14:43:49 +0100 Subject: [PATCH 3/3] Rename isZoomOut to isZoomOutMode --- packages/edit-site/src/components/layout/index.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/layout/index.js b/packages/edit-site/src/components/layout/index.js index e0777152e0d1c..d15be016173b0 100644 --- a/packages/edit-site/src/components/layout/index.js +++ b/packages/edit-site/src/components/layout/index.js @@ -70,7 +70,7 @@ export default function Layout() { const { isDistractionFree, - isZoomOut, + isZoomOutMode, hasFixedToolbar, hasBlockSelected, canvasMode, @@ -97,7 +97,7 @@ export default function Layout() { 'core', 'distractionFree' ), - isZoomOut: + isZoomOutMode: select( blockEditorStore ).__unstableGetEditorMode() === 'zoom-out', hasBlockSelected: @@ -176,7 +176,7 @@ export default function Layout() { 'is-full-canvas': canvasMode === 'edit', 'has-fixed-toolbar': hasFixedToolbar, 'is-block-toolbar-visible': hasBlockSelected, - 'is-zoom-out': isZoomOut, + 'is-zoom-out': isZoomOutMode, } ) } >