Follow-up to
#2831274: Bring Media entity module to core as Media module →
.
Problem/Motivation
In
#2831274-200: Bring Media entity module to core as Media module →
, @effulgentsia commented:
This screenshot shows that when I add a new field somewhere (in this case to the Article content type), I'm presented a bunch of choices, and File
and Media
are two separate choices within the "Reference"
section. How do I know how these differ?
Over the course of much discussion, we realized that this is really a Field UI problem, not a Media problem. Even though Media is becoming the preferred, and eventually the default, way to handle files and images in Drupal, there are still valid use cases for good ol' file and image fields (and in fact, both File and Image modules are hard dependencies of Media) -- for instance, if you do not want to support metadata or re-use. So the real problem is how to make it obvious to users what the difference is between "File", "Image", and "Media" -- or, for that matter, between any of the similarly-named field types that one can create.
Proposed resolution
Split the problem in two phases:
1) Short-term goal (8.5 target)
Reduce confusion for inexperienced site-builders, while still allowing advanced users to use whatever they need, basically improving labels and adding more help (as suggested in #42 and #51).
Field type plugins already support descriptions, so those descriptions will be shown below the select list displayed when creating a new field. Only the description of the currently selected field type will be shown. Many of the current descriptions are very developer-centric, so they will be wordsmithed in the follow-up issue
📌
[PP-1] Improve field description texts for fields provided by core
Active
.
This work will be done in this issue.
2) Long-term goal
Reach a consensus on:
- If file/image fields will eventually be necessary at all (when Media is the preferred solution in core). (#47, #31 )
- If they are necessary, how / when to present them on the UI, versus the "media" field ( #34, #37, #43 )
Remaining tasks
Commit the patch.
User interface changes
The "Add field" page (/admin/structure/{entity-type}/manage/{bundle}/fields/add-field
) will be extended to include new visual elements to help site builders understand the differences between the field types.
Screenshots with the the patch in #91 applied:
File field:
Image field:
Media field:
Video of the new descriptions being shown, with patch in #91 applied:
file_add_with_descriptions.mp4 →
API changes
None.
Data model changes
None.