Improving media type management

Created on 12 July 2023, over 1 year ago
Updated 9 July 2024, 5 months ago

Problem/Motivation

Managing the settings for a media type currently involves two separate forms:

  • The bundle form to control the media type's name, description, and metadata mappings.
  • The source field's settings form for managing allowed extensions or other configuration options.

This is not apparent for end-users. For example, let's say I want to allow uploading webp files for images. This is not a default file extension. Here is the current flow:

  • Visit Structure > Media types > Edit β€œImage”
  • Review the form and find Media source configuration. This instructs the user "Image field is used to store the essential information about the media item." (There is no link or indication on how to view this field or modify its settings.)
  • Click Manage fields from the local tasks block
  • Find Image in the fields list and click Edit for the Image field
  • Add webp to Allowed file extensions
  • Click Save settings

This requires users to understand internals of Drupal and it’s field system for content modeling to manage media types. That is a barrier for new site builders.

Proposed resolution

I have three ideas for a proposed resolution.

  1. Provide a link to entity.field_config.media_field_edit_form for the source field in the description of Media source configuration. That way the descriptive text explaining the field used can link to the field for modifying its settings.
  2. In Media source configuration provide a button to open the field settings form in a dialog for in-context modification.
  3. MR !8722 – In Media source configuration embed the field setting’s form within the media type form.

I prefer option #3 and I do not believe it is more complex than #2.

Remaining tasks

Get UX sign off

User interface changes

Modifies the media type form

API changes

None

Data model changes

None

Release notes snippet

Something about streamlined media type management.

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated 3 days ago

Created by

πŸ‡ΊπŸ‡ΈUnited States mglaman WI, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024