UX: Editing a CER: first/second field option list

Created on 17 February 2020, over 5 years ago
Updated 16 June 2025, 2 months ago

Problem/Motivation

The form for editing a single corresponding entity reference (form#corresponding-reference-edit-form) would be way more user-friendly if the "first field" / "second field" select lists included the label/human-readable name as a prefix, like how the bundles list has the entity type as a prefix.

I know human-readable names are per field instance, but the Views admin interface handles it somehow (they seem to use the "default" field label, which I imagine is the first one that existed? and then "also known as" -- which doesn't seem important here, I'm just explaining), so maybe we can use that as a model?

Alternatively, maybe just changing the option-list sort to be alphabetical by machine name, since that's what's shown as the choices.

Proposed resolution

Add human-labels to "first/second fields"
OR
Order the "first/second field" options alphabetically by machine name.

Remaining tasks

decide... do...

User interface changes

Depends on decision, but: changes to user interface text would be included.

Release notes snippet

(Major and critical issues should have a snippet that can be pulled into the release notes when a release is created that includes the fix)

Original report by [username]

(Text of the original report, for legacy issues whose initial post was not the issue summary. Use rarely.)

✨ Feature request
Status

Needs work

Version

5.0

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States alison

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.

  • πŸ‡©πŸ‡ͺGermany Anybody Porta Westfalica

    Totally agree here. Just had the same points. The machine name could still be kept as first value in the select, having the human readable name in brackets second.

    Sorting the field names alphabetically totally makes sense!

  • First commit to issue fork.
  • Merge request !20Sort fields by machine name β†’ (Open) created by mortona2k
  • Pipeline finished with Success
    2 months ago
    Total: 205s
    #523100
  • πŸ‡ΊπŸ‡ΈUnited States mortona2k Seattle

    Sorting the field machine names was easy, and a big QOL improvement when you have lots of fields.

    We could check this MR in now and improve it further later. Or create a separate issue?

  • Pipeline finished with Success
    2 months ago
    Total: 195s
    #523122
  • πŸ‡ΊπŸ‡ΈUnited States erutan

    Can confirm that #7 works on 10.5.

    Here's a quick patch that includes the labels as well if someone wants to take a look and possibly clean it up.

  • First commit to issue fork.
  • Pipeline finished with Success
    18 days ago
    Total: 146s
    #564876
  • Pipeline finished with Success
    18 days ago
    Total: 144s
    #565222
  • Pipeline finished with Success
    18 days ago
    Total: 141s
    #565226
  • πŸ‡ΊπŸ‡ΈUnited States mlncn Minneapolis, MN, USA

    This latest, greatest, and i hope final update to the merge request shows the label (when it exists, which in my testing is always) and what bundle it came from, and if there are more bundles.

    field_example "Example" on node:page & 1 other

    Also, it sorts by field machine name within entity types, but leaves fields grouped by entity type. We now show the entity type with the bundle (media:image, node:article, user:user - in the same manner displayed in the Bundles field below) so it should become evident quickly that all the media fields are first, then node fields, then user, for example.

    For me, definitely the most confusing thing was not knowing what entity type each field name was on, since fields are not shared across different types of entities, so the exact same name can appear twice. Showing the entity type as well as the bundle definitely helps but i still think grouping by entity type is clearer.

    As a follow-up we may want to add help text that the label may vary on the additional bundles (where we note "& 1 other" or "& 2 others" etc for each field), but putting "label may vary on Y other bundles" made the already-long option text too long.

    The other follow-up that could improve UX is reminding people they can filter for which bundles will have CER active for below. (So field_media_image "Image" on node:page & 5 others can be synchronized with media:image for node:article only.) Also, that saving the form after selecting the fields will update the autocomplete options in Bundles to only the relevant ones (i don't think it works the other way around, but a way to filter the first and second fields by bundle would be nice).

Production build 0.71.5 2024