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

View zoom out canvas while inserting patterns #59337

Merged
merged 3 commits into from Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions packages/block-editor/src/components/inserter/style.scss
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
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