diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index 0024e136c86ef1..e0bc29d62e1b9a 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -32,6 +32,7 @@ import InserterSearchResults from './search-results'; import useInsertionPoint from './hooks/use-insertion-point'; import { store as blockEditorStore } from '../../store'; import TabbedSidebar from '../tabbed-sidebar'; +import { useZoomOut } from '../../hooks/use-zoom-out'; const NOOP = () => {}; function InserterMenu( @@ -145,6 +146,11 @@ function InserterMenu( const showMediaPanel = selectedTab === 'media' && !! selectedMediaCategory; + const showZoomOut = + showPatternPanel && !! window.__experimentalEnableZoomedOutPatternsTab; + + useZoomOut( showZoomOut ); + const inserterSearch = useMemo( () => { if ( selectedTab === 'media' ) { return null;