Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Consider blocks with patternName as sections
  • Loading branch information
talldan committed Sep 10, 2025
commit 110543e2ff0d65009a1936c5044b9ac31cbab01c
6 changes: 6 additions & 0 deletions packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
getClientIdsWithDescendants,
isNavigationMode,
getBlockRootClientId,
getBlockAttributes,
} from './selectors';
import {
checkAllowListRecursive,
Expand Down Expand Up @@ -537,6 +538,11 @@ export function isSectionBlock( state, clientId ) {
return true;
}

const attributes = getBlockAttributes( state, clientId );
if ( attributes?.metadata?.patternName ) {
return true;
}

// Template parts become sections in navigation mode.
const _isNavigationMode = isNavigationMode( state );
if ( _isNavigationMode && blockName === 'core/template-part' ) {
Expand Down