Order local tasks for view modes and form modes on name rather than machine name

Created on 13 May 2017, about 7 years ago
Updated 2 March 2023, over 1 year ago

Problem/Motivation

In Manage Display (e.g. admin/structure/types/manage/article/display) the local tasks (view modes) are ordered based on the machine name.
If Teaser is renamed to Breezer, the order is: Default / Full content / RSS / Breezer

Proposed resolution

Sort the local tasks based on the visible name, rather than the machine name.
In the above example the order would be: Default / Breezer / Full content / RSS

This issue especially affects non-English views and custom installations with extra view modes where labels have been changed from those originally created.

🐛 Bug report
Status

Fixed

Version

10.1

Component
Field UI 

Last updated 3 days ago

Created by

🇷🇴Romania mfernea

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

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

  • Field UX

    Usability improvements related to the Field UI

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.

  • 🇺🇸United States smustgrave

    This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

    This seemed like a feature request.

    Confirm the issue though by renaming teaser to breezer like the IS suggested and the order did not update
    Applied the patch and cleared cache
    The order now is correct.

  • Status changed to Needs work over 1 year ago
  • 🇫🇮Finland lauriii Finland

    This is a usability problem when using Drupal in other language than English. On those sites it is pretty common place to have the label appear in a different language from the machine name.

    It looks like #24 is only addressing this for manage display. The same problem exists for form modes. We should fix these at one to keep the sorting consistent across these two pages.

  • First commit to issue fork.
  • @bnjmnm opened merge request.
  • Status changed to Needs review over 1 year ago
  • 🇺🇸United States bnjmnm Ann Arbor, MI

    MR builds from #25 and adds form mode sorting.

  • 🇮🇳India Nayana Ramakrishnan

    Verified MR!3568 and tested it on Drupal version 10.1.x. The patch works fine and I have added the before and after screenshots for reference.

  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States smustgrave

    Confirmed this for form modes similar to #26
    Created 2 form modes Breezer and Teaser
    Renamed Teaser to A Teaser
    Verified the order updated.

    • catch committed 09b7d821 on 10.1.x
      Issue #2878211 by mfernea, bnjmnm, Lendude, Anchal_gupta, smustgrave,...
  • Status changed to Fixed over 1 year ago
  • 🇬🇧United Kingdom catch

    This seems like a good usability improvement, I tried to think of a simpler way to sort, but couldn't come up with one.

    Committed 09b7d82 and pushed to 10.1.x. Thanks!

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

Production build 0.69.0 2024