Problem/Motivation
In #2968500: Change inline blocks workflow in Layout Builder to match mocks, the link to allow to create inline blocks in Layout Builder was introduced to make easier the process to add new inline blocks to LB.
However, that logic cannot be disabled, forcing to have that link in every Layout Builder's ChooseBlockController instance.
Since Navigation is using Layout Builder and we don't want to allow Site Administrators to add new inline blocks to the Navigation bar, would be great to make this feature optional
Steps to reproduce
- Install a Standard Profile Drupal Site
- Enable Navigation
- Go to the Navigation Blocks config page (/admin/config/user-interface/navigation-block)
- Try to add a new block to the Navigation
- Confirm that unwanted link is there

Proposed resolution
Add an extra optional parameter to SectionStorage Annotation/Attribute that would allow to opt out this feature.
By default, the link should be visible to avoid UI regressions.
Remaining tasks
Define PatchImplement PatchWrite TestsWrite Change Record
User interface changes
Create Inline block will be removed for those Layout Builder Section Storage that will opt out that feature.
Introduced terminology
API changes
New parameter in SectionStorage Annotation/Attribute
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #18 | 3485435-nr-bot.txt | 91 bytes | needs-review-queue-bot |
| #16 | 3485435-nr-bot.txt | 91 bytes | needs-review-queue-bot |
| #12 | Screenshot 2025-01-03 at 6.14.37 PM.png | 74.87 KB | smustgrave |
| #12 | Screenshot 2025-01-03 at 6.15.11 PM.png | 78.7 KB | smustgrave |
| #8 | navigtaion_block_ui_no_link.png | 1.31 MB | m4olivei |
Issue fork drupal-3485435
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:
- 3485435-layout-builder-create
changes, plain diff MR !10061
Comments
Comment #2
plopescWorking on it.
Comment #4
plopescThis is not an actual bug, but a feature request.
Comment #5
plopescMR created including test coverage and CR draft created.
Comment #6
plopescComment #7
plopescComment #8
m4oliveiThanks for reporting this @plopesc and doing all the work to get to a resolution.
The need makes sense. We don't want users to be able to add inline blocks to the navigation, it's not designed for that. Blocks for navigation should be very intentional and opt into placement there. I like that we're restricting inline blocks. We were discussing on Drupal Slack whether this is a Navigaton stable blocker. I'm of the opinion that it is, for the reasons just mentioned. I'm marking it as such.
I've tested the resolution and reviewed the code. It all makes sense to me and the tests look good too. I've taken it for a spin on my local, and all looks good. Marking RTBC.
Comment #9
danielvezaDone a review & there is still a couple of older unresolved threads
Comment #10
plopescThank you for your review!
I would like to hear the opinions from other folks regarding the open threads, so let's keep it as Needs Review until we have more consensus about the given feedback.
Comment #11
m4oliveiOn further conversation in Slack, we'll drop the Navigation stable blocker label, but keep it as a really important nice to have.
Comment #12
smustgrave commentedBefore
After
Probably duplicate screenshots but seems to be a few changes so thought I'd re-upload.
After the MR can see that the Create content block link is no longer there.
Opened up a follow up about refactoring core/modules/layout_builder/tests/src/FunctionalJavascript/InlineBlockTest.php. Believe the rest of this is good, and going to go out on a limb.
Comment #13
catchNeeds a rebase.
Comment #14
plopescRebased and made some adjustments. I think it needs a new round of reviews to ensure there are no regressions.
Comment #15
smustgrave commentedRebase seems fine
Comment #16
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #17
plopescBack to RTBC after rebase.
Comment #18
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #19
plopescBack to RTBC after rebase.
Comment #20
catchCommitted/pushed to 11.x, thanks!
Comment #22
catchComment #24
quietone commentedThere has been no review of the change record for this issue.
Comment #25
penyaskitoI've rewritten some parts, hope it's more clear now. Also updated version to 11.2.0, and catch has published it.