Problem/Motivation

Contrib is starting to use field property definitions, for example Search API. Some labels that we currently have could be improved to be shorter or more specific. For example, entity references could use the entity type label as the label for the ->entity property instead of t('Entity'). Right now, in Search UI, you get something like Image > Entity > File URI.

Others are very long, like the image alt and title labels.

Proposed resolution

Go through property definition labels and improve them.

Remaining tasks

User interface changes

None in core as they are not displayed.

API changes

Comments

berdir’s picture

Status: Active » Needs review
StatusFileSize
new8.01 KB
new32.67 KB
new19.92 KB

Initial patch, with before/after screenshots of Search API's UI.

Note: We have a somewhat strange pattern of naming the label for the ->value "Something value", like "Text value", "Float value", "Integer value" and so on. I already cleaned up a few of the really weird ones, like E-mail value or Comment status value, but many are left. Not sure what to do with them. When it's the only property then search api won't display it, but still..

Before:

After:

berdir’s picture

Assigned: Unassigned » fago

Trying to get some feedback :)

Jalandhar’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

Patch needs reroll.

leevingo’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll
StatusFileSize
new7.76 KB

Rerolled patch, resolved 1 conflict in core/lib/Drupal/Core/Field/Plugin/Field/FieldType/EmailItem.php
I tried to test the patch but the current version of search_api (search_api 8.x-1.x-dev) doesn't work.

fago’s picture

Status: Needs review » Reviewed & tested by the community

Thanks, new labels are definitely better. Moving longer stuff into the description also helps.

fago’s picture

Assigned: fago » Unassigned
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed 82d059a and pushed to 8.0.x. Thanks!

  • alexpott committed 82d059a on 8.0.x
    Issue #2248505 by leevingo, Berdir: Improve property definition labels.
    

Status: Fixed » Closed (fixed)

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