diff --git a/packages/editor/src/components/inserter-sidebar/index.js b/packages/editor/src/components/inserter-sidebar/index.js index 675ae5e11544b..ff2fc5881c1fc 100644 --- a/packages/editor/src/components/inserter-sidebar/index.js +++ b/packages/editor/src/components/inserter-sidebar/index.js @@ -33,27 +33,18 @@ export default function InserterSidebar() { getInsertionPoint, isPublishSidebarOpened, } = unlock( select( editorStore ) ); - const { getBlockRootClientId, __unstableGetEditorMode, getSettings } = - select( blockEditorStore ); + const { getSettings } = select( blockEditorStore ); const { get } = select( preferencesStore ); const { getActiveComplementaryArea } = select( interfaceStore ); - const getBlockSectionRootClientId = () => { - if ( __unstableGetEditorMode() === 'zoom-out' ) { - const { sectionRootClientId } = unlock( getSettings() ); - if ( sectionRootClientId ) { - return sectionRootClientId; - } - } - return getBlockRootClientId(); - }; + const { sectionRootClientId } = unlock( getSettings() ); return { inserterSidebarToggleRef: getInserterSidebarToggleRef(), insertionPoint: getInsertionPoint(), showMostUsedBlocks: get( 'core', 'mostUsedBlocks' ), - blockSectionRootClientId: getBlockSectionRootClientId(), sidebarIsOpened: !! ( getActiveComplementaryArea( 'core' ) || isPublishSidebarOpened() ), + blockSectionRootClientId: sectionRootClientId ?? '', }; }, [] ); const { setIsInserterOpened } = useDispatch( editorStore ); @@ -85,7 +76,7 @@ export default function InserterSidebar() { showInserterHelpPanel shouldFocusBlock={ isMobileViewport } rootClientId={ - blockSectionRootClientId ?? insertionPoint.rootClientId + insertionPoint.rootClientId ?? blockSectionRootClientId } __experimentalInsertionIndex={ insertionPoint.insertionIndex } onSelect={ insertionPoint.onSelect }