Make the media library modal's dimensions configurable

Created on 28 August 2020, almost 4 years ago
Updated 11 June 2024, 18 days ago

Problem/Motivation

It is currently not possible to change the width and height of the media library modal. The values are hard-coded (in MediaLibraryUiBuilder::getDialogOptions()) and not changeable.

In #3127867-7: MediaLibraryWidget should use the media_library.ui_builder service when fetching modal dialog options β†’ , @seanB said:

I've had more questions about changing the width and height of the modal. We have discussed things like an alter hook before but since the class is also used in a lot of javascript we should not make it easy for people to change this.

As a first step I can see making this method non-static and fetch the options via the service is a good step to help with this. Calling the static method on the class is definitely not developer friendly. I guess if we make the width and height configurable this would even help other people from not needing to override the service as well, but that can be a followup.

This is that follow-up.

Steps to reproduce

N/A

Proposed resolution

Make the dimensions configurable in some way -- ideally as settings of the Media Library field widget.

Remaining tasks

Write a patch with tests
Review and commit

User interface changes

TBD; possibly a couple of new configuration options for the Media Library field widget.

API changes

None.

Data model changes

The Media Library field widget may get a couple of new settings.

Release notes snippet

TBD

✨ Feature request
Status

Needs work

Version

11.0 πŸ”₯

Component
MediaΒ  β†’

Last updated about 16 hours ago

Created by

πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

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

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

Sign in to follow issues

Comments & Activities

Not all content is available!

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

Production build 0.69.0 2024