Media library upload form should use source field label and description

Created on 6 February 2020, over 5 years ago
Updated 30 January 2023, over 2 years ago

Problem/Motivation

In the Media Library, the form allowing to create a new media by uploading a file should use the source field label and description to improve usability.

Proposed resolution

Convert the container to a fieldset and use the current generic label as the fiedlset title.
Use the source field label and description as title and description of the upload field.

Feature request
Status

Needs work

Version

10.1

Component
Media 

Last updated 1 day ago

Created by

🇫🇷France duaelfr Montpellier, France

Live updates comments and jobs are added and updated live.
  • Usability

    Makes Drupal easier to use. Preferred over UX, D7UX, etc.

  • Needs usability review

    Used to alert the usability topic maintainer(s) that an issue significantly affects (or has the potential to affect) the usability of Drupal, and their signoff is needed. When adding this tag, make it easy to review the issue. Make sure the issue summary describes the problem and the proposed solution. Screenshots usually help a lot! To get sign-off on issues with the "Needs usability review" tag, post about them in the #ux channel on Drupal Slack, and/or attend a UX meeting to demo the patch and get direct feedback from designers/UX folks/product management on next steps. If an issue represents a significant new feature, UI change, or change to the general "user experience" of Drupal, use Needs product manager review instead. See the scope of responsibilities for product managers.

Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • The Needs Review Queue Bot tested this issue. It either no longer applies to Drupal core, or fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".

    Apart from a re-roll or rebase, this issue may need more work to address feedback in the issue or MR comments. To progress an issue, incorporate this feedback as part of the process of updating the issue. This helps other contributors to know what is outstanding.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • Status changed to Needs review over 1 year ago
  • 🇫🇷France Nixou Toulon

    Re-roll patch for 10.2.x.

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Custom Commands Failed
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    4:08
    1:17
    Running
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    25,779 pass, 1,831 fail
  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    25,790 pass, 1,833 fail
  • Status changed to RTBC over 1 year ago
  • 🇮🇳India Kanchan Bhogade

    Hi,
    I verified and tested the Patch #37 on the Drupal 11. x version.
    Patch applied successfully

    Testing steps:

    1. Install the Drupal version 11. x
    2. Add Media and Media Library Module
    3. Go to Structure > Content types -> Add Media field for any content type and save
    4. Go to Add Content -> click on Add Media -> select different media options
    5. check for the label; it's not changing for different media
    6. Apply Patch, again check for the same

    Test Result:
    When selecting different types of media, that particular media is displayed as a Label

    Attaching screenshots for reference

    Moving to RTBC

  • Status changed to Needs work over 1 year ago
  • 🇺🇸United States phenaproxima Massachusetts

    The patch is failing automated tests, unfortunately. It can’t be committed until they all pass… :(

  • Open in Jenkins → Open on Drupal.org →
    Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    25,816 pass, 1,817 fail
  • 🇫🇷France Nixou Toulon

    Test fails with errors like No space left on device which seems related to a CIT infrastructure problem.

    Not sure what we can do to solve this.

  • First commit to issue fork.
  • Pipeline finished with Failed
    over 1 year ago
    Total: 538s
    #80668
  • Pipeline finished with Failed
    over 1 year ago
    Total: 511s
    #80686
  • Pipeline finished with Success
    over 1 year ago
    #80692
  • First commit to issue fork.
  • Pipeline finished with Failed
    over 1 year ago
    Total: 599s
    #138183
  • Pipeline finished with Failed
    2 months ago
    Total: 437s
    #528922
  • Pipeline finished with Success
    2 months ago
    Total: 426s
    #528936
  • Status changed to Needs review 2 months ago
  • Pipeline finished with Success
    2 months ago
    Total: 439s
    #528945
  • Pipeline finished with Success
    2 months ago
    Total: 1544s
    #529632
  • 🇯🇵Japan neptune-dc

    I have reviewed the content and confirmed that it presents the name and description for audio document, image and video media.

    I was mildly surprised that it did not also update the name at `media/add/audio`, `media/add/video`, etc, but I can understand why it wasn't. The same information is visible elsewhere on the page.

  • 🇺🇸United States benjifisher Boston area

    We discussed this issue at 📌 Drupal Usability Meeting 2025-06-27 Active . That issue has a link to a recording of the meeting. For the record, the attendees at the usability meeting were @benjifisher and @rkoller.

    I plan to leave another comment summarizing that meeting, but until then you can watch the recording.

  • 🇺🇸United States benjifisher Boston area

    Usability review

    Issue summary updates

    I added the tag for an issue summary update. The purpose of the issue summary is to help anyone reviewing the issue understand the proposed changes, and the current summary does not do a good job of that.

    1. The Problem/Motivation should be something like this: "When a user uploads a file to a Media reference field, there is not enough context to tell the user what kind of file is expected (audio, image, etc.)." The current text is basically the same as the Proposed Resolution.
    2. The issue summary should be very clear about what the "source field" means: the file field on the media entity. This detail is mentioned in passing under the "User interface changes" section, but it should be more prominent and more explicit. This detail is important for understanding the Proposed Resolution.
    3. The Steps to reproduce (STR) should be more explicit, so that they lead to a consistent state. The Umami demo profile is good for this sort of thing. My STR are typically something like this:
      1. Install Drupal with the Umami demo profile.
      2. Edit field_media_document at Administration > Structure > Media types > Edit Document > Manage fields (/en/admin/structure/media/manage/document/fields). For testing purposes, add something under "Help text".
      3. Edit field_media_image at Administration > Structure > Content types > Article > Manage fields (/en/admin/structure/types/manage/article/fields). Under Media type, select all options.
      4. Create a new Article node (/en/node/add/article). Use the "Add media" button to open the modal editing window, and select Document from the vertical tabs.
    4. The screenshots in the User interface changes section should be based on the last step of the STR, and they should show the Help text (description) added in the earlier step.
    5. Some part of the issue summary, perhaps Problem/Motivation, should compare the file upload field that does not have enough context to the form at /en/media/add/document, which does have more context (the field label and description mentioned in this issue). This comparison will help avoid confusion, point out where the label and description are currently shown, and point out the inconsistency between the two forms.

    Proposed resolution

    There were only two people present at the Usability meeting, so these recommendations have less weight than if it had been a larger meeting.

    We considered various goals of the proposed changes:

    1. Provide better context for the user uploading a file.
    2. Be more consistent between the forms at /en/node/add/article and /en/media/add/document.
    3. Avoid having more interface text than necessary. ("Less is more.")

    The current proposal helps with (1), but goes in the wrong direction for (2). Furthermore, we felt that adding the description (Help text) to the existing field description made it easy to miss.

    Instead of replacing the standard "Add field" label with the source field’s label, we feel that a better solution is to add the source field’s label and description above the add-file widget. Explicitly, we suggest something like the following:

    Source field label (probably as an <h2> element) Example: Document
    
    Source field description (maybe as a <p> element) Example: This is the help text for the Document field (for the sake of example).
    
    Add file
    
    ...
    

    We feel that this provides better context, since the description, if any, is more prominent. (To be clear, less is more: the default description is empty, and site builders should leave it that way unless there is something useful to put there.) We feel this increases consistency between the two forms, since the other one already has the field label as the summary of a <details> element. The drawback is that our suggestion fails the "less is more" test, but we feel that the other points make up for that.

    If you want more feedback from the usability team, a good way to reach out is in the #ux channel in Slack.

  • 🇦🇺Australia acbramley

    Re #49

    Actioned 1, 2 and 3.

    Re 4 - This is already the case, is it not? It shows before and after of 2 media types, one with help text for the last step of the new STR.

    5. I believe is covered now.

    The current proposal helps with (1), but goes in the wrong direction for (2).

    How does it go in the wrong direction? It's directly matching the media add form?

    Instead of replacing the standard "Add field" label with the source field’s label, we feel that a better solution is to add the source field’s label and description above the add-file widget.

    This was suggested in a previous iteration of this issue I believe. IMO this is adding more noise and going against goal 3 you mentioned.

    Adding the description to the existing description (file upload help) matches other UIs such as the media/add form.

  • The Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".

    This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.

    Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.

  • First commit to issue fork.
  • Pipeline finished with Failed
    12 days ago
    Total: 1110s
    #578363
  • 🇫🇮Finland sokru

    Rebased, test failures seems unrelated.

  • Pipeline finished with Success
    12 days ago
    Total: 600s
    #578737
Production build 0.71.5 2024