- Issue created by @plach
- 🇦🇺Australia pameeela
I'll let @tonypaulbarker weigh in on this, unless I find time first!
- 🇬🇧United Kingdom tonypaulbarker Leeds
Thanks @plach. I will take these for a spin.
- 🇮🇹Italy plach Venezia
Here is the corresponding core issue (postponed on this one):
🌱 [PP-1] [Meta] Consider adopting Media Widgets as an experimental feature Active
- 🇬🇧United Kingdom tonypaulbarker Leeds
@plach I have had a little look (in fact I did take a look at media widget a little while ago) and these modules are on the way to finding solutions for features we were discussing that we would like to have so I intend to look in lots more depth at these. Here are some very early notes for myself and they may offer you some early insights. I will go through in more detail and take some screenshots / produce a few wireframes to better describe some of the discussion points. I began a meta issue to list the upcoming opportunities for media management, which is at https://www.drupal.org/project/drupal_cms/issues/3488393 🌱 [META] Vision for Media Management Active
- Media can begin from a URL (as in the case of remote video) as well as an upload.
- I think we should be able to use the media library to use existing media.
- Bulk uploads is a consideration.So I think we have three cases of initialisation that we should support (new upload, new URL and existing media). This may lead us to end up with something similar to the media library UI, except that there should be no need to pre-select a media type before uploading (it's at least one click that we can save). As a bonus, bulk uploads would be possible along the lines of https://www.drupal.org/project/simple_media_bulk_upload → and the media types of the bulk uploads would be detected. In the long run, I would love to have some detection that a file already exists if the same is re-uploaded.
We should be able to handle custom media entities that may share some filetypes with other media entities.
Once the media entity is place, there is some UX / UI work because the I think the out of the box experience is currently quite confusing. I think we should be able to get to edit the media entity. We plan to have a small number of additional fields on media entities for filtering the library and for SEO.
In the case of allowed URLs, content security policy comes to mind. Modules like Seckit are not easy to configure but by installing or approving only certain URLs / providers in the UI we can improve the situation. We might consider a validation of known and approved providers instead of rendering a link.
- 🇫🇮Finland lauriii Finland
This is definitely solving a pain point that I've heard mentioned in many conversations with Drupal users. However, many of these sites are re-using media and it would be great if we could solve this in a way that doesn't get rid of the re-use media part. I think there are ways in which this could be solve so that we would have both.
This is not the only pain point that I've heard mentioned related to inserting media. Maybe we should do a more holistic design effort around how media gets referenced from content types to try to design something that could solve more of these problems at once? We don't have to implement all of these at once but having a north star design would be more likely to get us an overall better experience. It looks like some of these considerations are already being documented in 🌱 [Meta] Consider adopting Media Widgets as an experimental feature Active .
- 🇬🇧United Kingdom tonypaulbarker Leeds
@lauriii I think you have linked to this same issue?
I think the holistic view comes in three main parts for the UI
1. Initiating the upload / URL or library as discussed here.
2. Interacting with the media library
3. Enabling editor to set transformations and properties of an instance that uses a media field and getting some live feedback.and under the hood I think these will be the main considerations to achieve it:
1. Field Widgets.
2. Entity usage.
3. System handling of transformations and image styles.I am doing some work to map out those problems and possible approaches, but I expect big changes that can take a while so in the meantime if we have the opportunity to improve the experience with smaller changes I think we should try to do it.
- 🇮🇹Italy plach Venezia
@lauriii
However, many of these sites are re-using media and it would be great if we could solve this in a way that doesn't get rid of the re-use media part. I think there are ways in which this could be solve so that we would have both.
In terms of what is possible right now, the widgets defined by Media Widgets were thought explicitly with non-reusability in mind: they mimic the Media Library widgets without offering the ability to select existing media. A site needing to support use cases could certainly enable both the Media Library widget on re-usable media reference fields (e.g. an article content type only authored by the site's editorial team) and the non-reusable Media Widgets for other use cases, e.g. user pictures.
An approach I've been thinking about, but that I didn't have the opportunity to explore is conditionally enabling the existing media selector depending on permissions: a less privileged user could only upload new media items (or enter new URLs), while a more privileged one could have access to the Media Library as well. From the implementation perspective, this would likely mean always using the Media Library widget and tweak its logic to make access to the existing media selection UI conditional.