Rough POC of respecting "supports multiple" in the auto-inserted block metadata #53925
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?
A very rough proof of concept of having the new auto-insert block API (#51449) respect the supports multiple configuration in the
block.json
of the block configuring auto-insertion.This PR is definitely not ready for merge as is but could be shaped towards it.
Why?
There are cases where blocks are registered to have only one instance of the block in the layout and this is typically configured using the
supports.multiple
property inblock.json
. Currently, the auto-insertion does not respect this property and this PR demonstrates a potential path to doing so.An important caveat: this has no control over what instance of an anchor block the auto insertion will kick in. If the blocks has
supports.multiple
defined as false, then the block will only be inserted in the first instance of the anchor block.Testing Instructions
__experimentalAutoInsert
property inblock.json
supports.multiple
property inblock.json
is set to false.Testing Instructions for Keyboard
Screenshots or screencast