Remove disabled blocks from the Block Layout GUI

Created on 15 August 2020, about 4 years ago
Updated 21 July 2024, about 2 months ago

Problem/Motivation

When you first install Drupal with the default Bartik theme, not all blocks available are assigned a region. To enable them, you click "Place block", and place it in a region as part of the "Configure block" dialogue.

So far, so good. However, after placing it in a region, it is no longer possible to restore a block to the initial state where it is no longer assigned a region.

You can make it disappear by setting it "Disabled", but it still is assigned a region, cluttering up the display of the Block Layout.

The only thing one can do to reduce the clutter, is to assign one of theme's region as a "parking lot", and "park" all disabled blocks there. In the screendump below, I am using the region called "Footer Fifth" as a parking lot for disabled blocks.

It has been broken like that since: #2513534: Remove the 'disabled' region from Block UI β†’

Steps to reproduce

  1. Do a clean install of Drupal with Bartik.
  2. Observe that unused blocks (e.g. "Administration") does not appear anywhere in the Block Layout.
  3. Place the "Administration" in some region.
  4. Disable it.
  5. Observe that it still appears to clutter the Block Layout, just tagged with "Disabled".

Proposed resolution

Change module so that when a block is disabled, it is no longer assigned a region (i.e. same as its initial state).

Remaining tasks

Alter the code.

User interface changes

Disabled blocks will no longer clutter the Block Layout GUI.

API changes

None.

✨ Feature request
Status

Active

Version

11.0 πŸ”₯

Component
BlockΒ  β†’

Last updated 3 days ago

Created by

πŸ‡³πŸ‡΄Norway gisle Norway

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡³πŸ‡±Netherlands Summit

    Hi, would it be possible to have a Drupal 10.3 patch for this?
    As Drupal 10.3 is the most stable version at this moment?
    Thanks a lot to consider this.
    Greetings,

Production build 0.71.5 2024