Problem/Motivation

The description of the "Directory" selection field in media entities is very technical:

The ID of the taxonomy term.

The "directory" base field is currently implemented like this:

$fields['directory'] = BaseFieldDefinition::create('entity_reference')
->setLabel($this->t('Directory'))
->setDescription($this->t('The ID of the taxonomy term.'))
->setSetting('handler', 'media_directory:default')
->setSetting('target_type', 'taxonomy_term')
->setDisplayConfigurable('form', TRUE)
->setDisplayOptions('form', [
        'type' => 'options_select',
        'weight' => 2,
]);

https://git.drupalcode.org/project/media_directories/-/blob/3.0.x/src/Ho...

The description used is not very self-explaining for non-Drupal-Specialists.

I think the description should be improved or updated to be more clear.

Maybe something like:
"Select the media directory to (virtually) store this file in."
(I don't think this is perfect yet - but should not be that technical)

Further points:

  1. I think it might make sense to add a setting to show a link for managing the taxonomy vocabulary here (in a new tab) for users with the required permission?
  2. Maybe also "Directory" should be relabeled as "Media directory" or is that too much?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

anybody created an issue. See original summary.

anybody’s picture

Issue summary: View changes
anybody’s picture

PS: Let me say THANK YOU for this GREAT module, it's perfect in many places with great UX!
These are just the final nitpicks!

  • rang501 committed cb448523 on 3.0.x
    Issue #3614787: Improve 'Directory' base field description to be less...

  • rang501 committed b5cab6bd on 3.0.x
    Issue #3614787: Revert the field label back to 'Directory'
    
rang501’s picture

Status: Active » Needs review

The description text is changed, it should feel more logical:
"The media directory this item is placed in. Directories organize the media library and do not affect where files are stored."

I did not change the field name - the "Directory" should be fine.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thank you, perfect! The other points are irrelevant now.

Did I see "Folder" in some places, maybe we should use this issue to unify that to "Directory"?
https://git.drupalcode.org/search?search=folder&nav_source=navbar&projec...

  • rang501 committed e8800765 on 3.0.x
    Issue #3614787: Use 'directory' consistently instead of 'folder' in code...
rang501’s picture

Good catch, thanks. Should be correct now - directory is correct terminology. I tend to mix those two words quite often.

anybody’s picture

Status: Reviewed & tested by the community » Fixed

Yeah me too - still unsure which is the better word here ;)

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

anybody’s picture

PS: Thanks for the credits! I think you should also credit yourself for the incredible work!

rang501’s picture

@anybody I'm the maintainer, it feels weird to credit myself here :D

anybody’s picture

@rang501 I think it's fine, if you actually contributed and didn't only merge for example.

AI summary:

Summary Rule of Thumb

If a maintainer invested meaningful effort (coding, reviewing, testing, or triaging) that helped resolve the issue, yes—they should check their own name in the credit UI alongside other contributors.

I didn't find clear advice against or for it, but in my eyes it's fair. It's your time.

Status: Fixed » Closed (fixed)

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