Skip to content

Commit

Permalink
View full zoom out mode canvas while inserting patterns (#59337)
Browse files Browse the repository at this point in the history
* Add is-zoom-out to top level site editor element

* Allow pattern inserter to push zoom out mode canvas

* Rename isZoomOut to isZoomOutMode
  • Loading branch information
jeryj authored Feb 24, 2024
1 parent 9469295 commit 8265e49
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/block-editor/src/components/inserter/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
5 changes: 5 additions & 0 deletions packages/edit-site/src/components/layout/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export default function Layout() {

const {
isDistractionFree,
isZoomOutMode,
hasFixedToolbar,
hasBlockSelected,
canvasMode,
Expand All @@ -96,6 +97,9 @@ export default function Layout() {
'core',
'distractionFree'
),
isZoomOutMode:
select( blockEditorStore ).__unstableGetEditorMode() ===
'zoom-out',
hasBlockSelected:
select( blockEditorStore ).getBlockSelectionStart(),
};
Expand Down Expand Up @@ -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': isZoomOutMode,
}
) }
>
Expand Down

0 comments on commit 8265e49

Please sign in to comment.