It can be very difficult to administer menus with many items, like the admin menu. Having a nicely organized admin menu can be a huge quality-of-life improvement for developers and clients.

Several things could be done to make this experience better (being able to expand/collapse entire submenus), but one that seems relatively simple would be to add a button to toggle the visibility of menu items that are disabled. Being able to hide them would make it far easier to rearrange menu items that ARE enabled via drag and drop.

I've been doing this in the browser console by using `$('.menu-disabled').toggle()`. I figure if it helps me, then it would probably help others. Here's a very simple mockup:

Screenshot of Drupal menu admin screen with proposed change

Issue fork drupal-3275513

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

bhogue created an issue. See original summary.

bhogue’s picture

Issue summary: View changes
StatusFileSize
new293.54 KB

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.

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

enaznin’s picture

Assigned: Unassigned » enaznin

enaznin’s picture

Current Implementation:
Default behavior:
Current Implementation, before clicking the disable menu link button
After clicking:
Current implementation, alfter cliccking the disable menu ink
Few notes:
1. I think the placement of the ‘hide disabled’ button should be Inside the table under the ‘Enabled’ heading. That’s how I implemented it.
2. There’s a corner case, If a parent menu is disabled while its children are enabled, only the parent menu gets hidden. As a result, the visible children seem like they are listed under the wrong parent.

enaznin’s picture

Assigned: enaznin » Unassigned
enaznin’s picture

StatusFileSize
new766.7 KB
enaznin’s picture

StatusFileSize
new698.46 KB
enaznin’s picture

Status: Active » Needs review
needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.94 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

enaznin’s picture

Status: Needs work » Needs review

Restoring status unrelated, failure.

needs-review-queue-bot’s picture

Status: Needs review » Needs work
StatusFileSize
new2.94 KB

The Needs Review Queue Bot tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

enaznin’s picture

bhogue’s picture

BTW, I created a module for this: admin_menu_levels

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.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.