diff --git a/packages/block-editor/src/components/block-toolbar/index.js b/packages/block-editor/src/components/block-toolbar/index.js index c9eddd5a5b4756..a8f75bd1dc8759 100644 --- a/packages/block-editor/src/components/block-toolbar/index.js +++ b/packages/block-editor/src/components/block-toolbar/index.js @@ -69,6 +69,9 @@ export function PrivateBlockToolbar( { hasParentPattern, hasContentOnlyLocking, showShuffleButton, + showSlots, + showGroupButtons, + showLockButtons, } = useSelect( ( select ) => { const { getBlockName, @@ -134,6 +137,9 @@ export function PrivateBlockToolbar( { hasParentPattern: _hasParentPattern, hasContentOnlyLocking: _hasTemplateLock, showShuffleButton: isZoomOutMode(), + showSlots: ! isZoomOutMode(), + showGroupButtons: ! isZoomOutMode(), + showLockButtons: ! isZoomOutMode(), }; }, [] ); @@ -198,7 +204,7 @@ export function PrivateBlockToolbar( { disabled={ ! isDefaultEditingMode } isUsingBindings={ isUsingBindings } /> - { ! isMultiToolbar && ( + { ! isMultiToolbar && showLockButtons && ( @@ -212,7 +218,8 @@ export function PrivateBlockToolbar( { ) } { ! hasContentOnlyLocking && shouldShowVisualToolbar && - isMultiToolbar && } + isMultiToolbar && + showGroupButtons && } { showShuffleButton && ( ) } - { shouldShowVisualToolbar && ( + { shouldShowVisualToolbar && showSlots && ( <>