Problem/Motivation
Similar to #2977587: Improve block listing in Layout Builder by hiding uncommon block plugins this issue is intended to simplify the block listing
Proposed resolution
Remove some of the core blocks that do not serve any purpose within Layout Builder
Remaining tasks
User interface changes
API changes
Data model changes
Release notes snippet
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3040348-blocks-12.patch | 965 bytes | tim.plunkett |
Issue fork drupal-3040348
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:
- 3040348-remove-blocks-that
changes, plain diff MR !4144
Comments
Comment #2
tim.plunkettReminder: removing these here does not affect any blocks already placed. It only affects their visibility within the list.
Comment #3
johnwebdev commented+1
I think we should add to the documentation how you add removed definitions back.
Comment #4
tim.plunkettNW for #3. Unfortunately, adding back blocks is not super easy :(
Comment #7
kunalgautam commentedComment #8
kunalgautam commentedPatch for Drupal 9.1
Comment #9
tim.plunkettThe patch is identical to before. It didn't need a reroll, it needs work for #3/4
Comment #12
tim.plunkettStill NW for #3, though I don't know how we'll accomplish that.
Rerolled after #3218766: Adding a SystemMainBlock to a layout builder layout causes a fatal error and should not be available.
Comment #13
johnwebdev commentedRe #3 Can we store the original definitions in $extra? Or add another argument to the hook which keeps a copy of all definitions.
Comment #14
tim.plunkettOpened another issue to discuss that. I'm not sure about blocking this issue on that one, are there blocks in this patch you're specifically worried about?
Comment #15
johnwebdev commentedNo, I don't think so. I'm fine with this issue going in as is!
Edit: The related issue you added, is actually this one.
Comment #16
tim.plunkettUgh, lol. Thanks
Comment #17
tim.plunkettComment #18
johnwebdev commentedComment #19
tim.plunkettI think this could do with some rudimentary test coverage.
See #3218766: Adding a SystemMainBlock to a layout builder layout causes a fatal error and should not be available for inspiration.
Comment #26
cboyden commentedI've added some very basic test coverage. It seems possible that there might be some changes in the future that would cause these tests to fail. "Help" and "Messages" and "Tabs" are very basic link labels that might appear somewhere in the UI, for example.
Comment #27
smustgrave commentedThanks for working on this!
Seems there is 1 failure that could be legit to the change.
Comment #28
cboyden commentedComment #29
cboyden commentedI updated BlockFilterTest to account for the reduced number of filter results.
Comment #30
smustgrave commentedTests look good.
Question for committer will a change record be needed?
Comment #32
lauriiiProbably doesn't need a CR because I don't think there's any action site maintainers need to take on this.
Committed 3fe287d and pushed to 11.x. Thanks!
Comment #35
ab.shakir commentedComment #36
tisteegz commentedIs there anyway to configure which blocks are "not useful"? I have been using the Tabs block within my layouts and now only the layouts created before this change have tabs and others don't.