Skip to content
Merged
Show file tree
Hide file tree
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
Next Next commit
Make template parts contentOnly by default when using contentOnly pat…
…tern experiment
  • Loading branch information
talldan committed Sep 12, 2025
commit f4cb5a83fc06d22d8e647af9fe2fad2d0fc607e2
3 changes: 2 additions & 1 deletion packages/block-editor/src/store/private-selectors.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,8 +519,9 @@ export function isSectionBlock( state, clientId ) {
}

const attributes = getBlockAttributes( state, clientId );
const isTemplatePart = blockName === 'core/template-part';
if (
attributes?.metadata?.patternName &&
( attributes?.metadata?.patternName || isTemplatePart ) &&
!! window?.__experimentalContentOnlyPatternInsertion
) {
return true;
Expand Down
3 changes: 3 additions & 0 deletions packages/block-editor/src/store/reducer.js
Original file line number Diff line number Diff line change
Expand Up @@ -2286,6 +2286,9 @@ function getDerivedBlockEditingModesForTree(
const contentOnlyParents = [
...contentOnlyTemplateLockedClientIds,
...unsyncedPatternClientIds,
...( window?.__experimentalContentOnlyPatternInsertion
? templatePartClientIds
: [] ),
];

traverseBlockTree( state, treeClientId, ( block ) => {
Expand Down