Hi, thanks for this module. Can you please distinguish between the core and Dynamic Entity Reference field type labels? Currently, when adding a field, you see two identical options for every entity type:

adding a dynamic entity reference field

This makes it really hard for the site builder to understand what's going on and what you should choose.

Proposed solution:
Suffix the field type labels with "(Dynamic Entity Reference)". If you translate the suffix separately from the label itself, you can still leverage existing translations. In pseudo code: $field_type_label = $entityType->getLabel() . ' ' . t('(Dynamic Entity Reference)').

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

marcvangend created an issue. See original summary.

jibran’s picture

Title: Distinguish between core and DER field type labels » Change the DER field type group in the field_ui
Version: 8.x-1.0-rc5 » 8.x-1.x-dev
Category: Bug report » Task

Thanks for reporting this. Let's change the group name instead.

marcvangend’s picture

You're welcome. Grouping them in a separate optgroup sounds like a good idea for this specific form.

That said, there are other places (like /admin/structure/types/manage/NODETYPE/fields) where the field type label is used on its own, without the context of the proposed optgroup. In such a situation, the ambiguity would remain (although it's probably less of a DX problem because it's just info, not a form field). Just my 2 cents.

jibran’s picture

Status: Active » Needs review
FileSize
852 bytes

Here we go.

jibran’s picture

Issue summary: View changes
FileSize
26.14 KB
1.82 KB

larowlan’s picture

I think the 'Dynamic entity reference' option now needs to say 'Other' and be listed at the end (if possible)

Looks good otherwise

jibran’s picture

Nice idea. Here we go.

  • jibran committed 8a1da4e on 8.x-2.x
    Issue #2805659 by jibran, marcvangend, larowlan: Change the DER field...

  • jibran committed 96438be on 8.x-1.x
    Issue #2805659 by jibran, marcvangend, larowlan: Change the DER field...
jibran’s picture

Status: Needs review » Fixed

Committed and pushed to 8.x-2.x and 8.x-1.x. Thanks!

marcvangend’s picture

Thanks jibran!

Status: Fixed » Closed (fixed)

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