You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This PR disables transforms and inspector controls when one or more or all blocks in multi-selection are "section blocks".
Why?
As part of #71517, a "section block" — for example patterns or template parts — is displayed in content only mode.
Content only mode describes an editing mode in which the inner block tree of section blocks are filtered to only display common content blocks, and with limited editing in the toolbar and inspector sidebar.
The different toolbar and inspector states of section blocks make them incompatible with regular blocks.
The idea is to make things more consistent with other "incompatible" multi-block combinations - in these cases n blocks is displayed only in the sidebar.
How?
Checking for section blocks in the getSelectedBlockClientIds() return value (Array).
Testing Instructions
Switch on the patterns + content only experiment:
Insert a few patterns and a few blocks
Using the list view menu, select the patterns. Check that the inspector does not display any styles controls or others.
Select a pattern and regular block. Check that you cannot transform them in the toolbar, and that the inspector doesn't display controls.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.
If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
E2E test fails seem related. Will look into it tomorrow.
Oversight on my part - the isSectionBlock: _isSectionBlock( renderedBlockClientId ), was required because it checks the parent block as well for single selections.
Should be fixed now. No other changes to functionality. If the tests pass I'll 🚢
Flaky tests detected in 8a109fb.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Fixes #71709
Part of #71517
Context: #71512 (comment)
This PR disables transforms and inspector controls when one or more or all blocks in multi-selection are "section blocks".
Why?
As part of #71517, a "section block" — for example patterns or template parts — is displayed in content only mode.
Content only mode describes an editing mode in which the inner block tree of section blocks are filtered to only display common content blocks, and with limited editing in the toolbar and inspector sidebar.
The different toolbar and inspector states of section blocks make them incompatible with regular blocks.
The idea is to make things more consistent with other "incompatible" multi-block combinations - in these cases
n
blocks is displayed only in the sidebar.How?
Checking for section blocks in the
getSelectedBlockClientIds()
return value (Array).Testing Instructions
Switch on the patterns + content only experiment:
Screenshots or screencast
Before
Kapture.2025-09-17.at.14.12.04.mp4
After
Kapture.2025-09-17.at.13.53.44.mp4