Problem/Motivation
In my site I have some layouts with regions/slots that only accept one kind of block by configuring the Layout Builder Restrictions module.
I'd like for editor to skip one click and be presented directly with the form of that only block instead of having to choose the only option available.
Steps to reproduce
Configure Layout builder browser and Layout Builder Restrictions to allow only one kind of block in a region. Then try to add a block to that region

Proposed resolution
Add a global setting "Autoselect block when only one option is available".
The implementation can be done in the frontend. When the modal opens and there is only one "js-layout-builder-block-link" in the modal simulate a click.
Remaining tasks
Decide if this is a worthy addition to the module
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot From 2026-07-02 20-07-28.png | 36.01 KB | rodrigoaguilera |
Issue fork layout_builder_browser-3608040
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
rodrigoaguileraOpened a MR to demonstrate better what I want to achieve