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

Issue fork drupal-3040348

Command icon 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

tim.plunkett created an issue. See original summary.

tim.plunkett’s picture

Status: Active » Needs review
Related issues: +#2977587: Improve block listing in Layout Builder by hiding uncommon block plugins
StatusFileSize
new968 bytes

Reminder: removing these here does not affect any blocks already placed. It only affects their visibility within the list.

johnwebdev’s picture

+1

I think we should add to the documentation how you add removed definitions back.

tim.plunkett’s picture

Status: Needs review » Needs work

NW for #3. Unfortunately, adding back blocks is not super easy :(

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

kunalgautam’s picture

Assigned: Unassigned » kunalgautam
kunalgautam’s picture

Assigned: kunalgautam » Unassigned
Status: Needs work » Needs review
StatusFileSize
new968 bytes

Patch for Drupal 9.1

tim.plunkett’s picture

Status: Needs review » Needs work

The patch is identical to before. It didn't need a reroll, it needs work for #3/4

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

tim.plunkett’s picture

StatusFileSize
new965 bytes

Still 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.

johnwebdev’s picture

Re #3 Can we store the original definitions in $extra? Or add another argument to the hook which keeps a copy of all definitions.

tim.plunkett’s picture

Opened 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?

johnwebdev’s picture

No, 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.

tim.plunkett’s picture

Status: Needs work » Needs review
johnwebdev’s picture

Status: Needs review » Reviewed & tested by the community
tim.plunkett’s picture

Status: Reviewed & tested by the community » Needs work
Issue tags: +Needs tests

I 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.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

cboyden made their first commit to this issue’s fork.

cboyden’s picture

Status: Needs work » Needs review

I'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.

smustgrave’s picture

Status: Needs review » Needs work

Thanks for working on this!

Seems there is 1 failure that could be legit to the change.

cboyden’s picture

cboyden’s picture

Status: Needs work » Needs review

I updated BlockFilterTest to account for the reduced number of filter results.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: -Needs tests +Needs Review Queue Initiative

Tests look good.

Question for committer will a change record be needed?

  • lauriii committed 3fe287db on 11.x
    Issue #3040348 by cboyden, tim.plunkett: Remove blocks that are not...
lauriii’s picture

Status: Reviewed & tested by the community » Fixed

Probably 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!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ab.shakir’s picture

tisteegz’s picture

Is 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.