Remove weight field from menu item entity forms

Created on 14 June 2009, about 15 years ago
Updated 16 February 2024, 4 months ago

Problem/Motivation

  • The interface is simpler.
  • The functionality provided is not very helpful. The majority of users have no idea of the weight assigned to other menu items. This is a frustrating experience for users and a definite "DrupalWTF". Drag and drop menus are an intuitive experience.
  • Weight has been removed from other user facing systems. Are there any other areas of core that still show a weight selector like this?
  • The change is consistent with blocks. You can not set the weight of a block under its configuration page.

Steps to reproduce

Proposed resolution

Removes weight from the user interface for adding/editing menu items

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

📌 Task
Status

Needs work

Version

11.0 🔥

Component
Menu module  →

Last updated about 2 months ago

Created by

🇨🇦Canada rickvug

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • DrupalWTF

    Worse Than Failure. Approximates the unpleasant remark made by Drupal developers when they first encounter a particular (mis)feature.

  • Needs change record

    A change record needs to be drafted before an issue is committed. Note: Change records used to be called change notifications.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

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

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    "needs accessibility review" was added when there was a patch that altered the menu list.

    Since then, all iterations are just removing the weight from the menu section of entity forms. - There was no a11y concern about that and is arguably an accessibility improvement. The weights are only useful as they relate to weights of sibling items within a menu, and it's probably best to not give anyone the accidental impression that reordering items in a menu requires having multiple node form tabs open to compare weights.

  • First commit to issue fork.
  • 🇳🇿New Zealand quietone New Zealand
  • Pipeline finished with Success
    5 months ago
    Total: 1678s
    #87336
  • Status changed to Needs review 5 months ago
  • 🇳🇿New Zealand quietone New Zealand

    I started with the patch in #35 and then simply worked on the tests.

  • Status changed to RTBC 5 months ago
  • 🇺🇸United States smustgrave

    So had to run locally as I couldn't run the test-only feature

    Reverted the changes besides the 2 test files

    Only ran MenuUiNodeTest::testMenuNodeFormWidget as that was the one that had new assertions added. Got

    Behat\Mink\Exception\ElementNotFoundException : Form hidden field with id|name|value "menu[weight]" not found.

    So test coverage is there

    Issue summary appears complete and code change appears to line up.

  • 🇫🇮Finland lauriii Finland

    Maybe we should consider opening a follow-up for some next steps. I think the first next step would be to always add the new menu item to the end of the list. Another next step would be trying to come up with a better UI for users to select where the new menu link should be added.

    I think this also needs a change record.

  • Status changed to Needs work 4 months ago
  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    This affects the UX (in a positive way!) and may break some contrib tests so it indeed needs a change record. Perhaps it should also get a Drupal 10.3 release note?

    Also, the issue summary states there's no UI changes, whereas that's literally the goal of this issue 😅 Also, the title says "menu item entity forms" â€” but it's specifically only node forms? (This modifies menu_ui_form_node_form_alter() after all.) The current title would make for a confusing commit message.

  • 🇧🇪Belgium Wim Leers Ghent 🇧🇪🇪🇺

    (This issue piqued my curiosity because based on the title it seemed related to 📌 Deprecate vocabulary weight property Needs work , but it is not. Hence my request to clarify all that.)

Production build 0.69.0 2024