Delete local task should be the last tab for content entities

Created on 27 August 2022, over 2 years ago
Updated 3 January 2024, 12 months ago

Problem/Motivation

During #3304790: Drupal Usability Meeting 2022-08-26 β†’ , while reviewing an unrelated issue, it was noted that the Delete local task is not always presented as the last local task.

This is most obvious when editing a Node in Umami (which has Layout Builder and Content Translation installed), where the "Delete" tab appears in-between the "Edit" and "Layout" tabs:

With Layout Builder installed, this feels particularly odd; It would be better to have the "Edit" and "Layout" tabs together, with "Delete" appearing after "Revisions" and "Translate".

"Delete" being the last tab makes more sense because it is the only tab which leads the user down an unrecoverable path (permanently deleting the content); Whereas the four other tabs (excluding "View") all involve some form of manipulating the existing piece of content, whether that be: editing a field, changing the layout, reverting to a previous version or translating the content; All of these actions involve making incremental, recoverable changes, so it makes sense that they are grouped together.

While this problem is most obvious on Nodes, the same is present for other core content entities, including Media and Custom Block.

Steps to reproduce

Proposed resolution

This issue was discussed at #3307567: Drupal Usability Meeting 2022-09-09 β†’ .

The weight of the Delete local task on all core content entities should be increased so that it always appears last. Additional tests could be added to the relevant modules to ensure that in the future Delete always remains the last local task.

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

πŸ“Œ Task
Status

Active

Version

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated about 9 hours ago

Created by

πŸ‡¬πŸ‡§United Kingdom AaronMcHale Edinburgh, Scotland

Live updates comments and jobs are added and updated live.
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.

  • First commit to issue fork.
  • Status changed to Needs review 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States capysara

    Is there still interest here?

    I went with weight 80 since that has the most votes.

    Updated the Delete weight for:
    node
    block_content
    media
    taxonomy
    comment
    workspace (/admin/config/workflow/workspaces/manage/stage/edit)

    Updated the Translate weight to 70 so that it wouldn't display last.

    I manually tested by enabling media, layout builder, language, translation modules, and workspaces.
    Enabled layout builder and translation for entity types.
    Added content.
    Confirmed that Delete displays last.

  • Status changed to Needs work 12 months ago
  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    Even though a task seems like something. that should of had test coverage. Suppose we can add here.

  • πŸ‡ΊπŸ‡ΈUnited States shasha821110

    Vote +
    Delete should be the last one in the tab.

Production build 0.71.5 2024