MediaLibraryWidget should use the media_library.ui_builder service when fetching modal dialog options

Created on 15 April 2020, about 4 years ago
Updated 2 February 2023, over 1 year ago

Problem/Motivation

Currently the MediaLibraryWidget uses a static call to \Drupal\media_library\MediaLibraryUiBuilder::dialogOptions which means that altering these dimensions is really hard.

Proposed resolution

By just using the media_library.ui_builder instead of the static call a developer can influence the dimensions by overriding the service.

I know the service says:
* This service is an internal part of the modal media library dialog and
* does not provide any extension points.

But sheesh how un-Drupal can you get and there doesn't seem to be another way to alter these options either.

Remaining tasks

Decide if this is the best way to do this

User interface changes

None

API changes

Constructor for Drupal\media_library\Plugin\CKEditorPlugin\DrupalMediaLibrary updated to accept and eventually require the media_library.ui_builder service as an argument.

Data model changes

None

Release notes snippet

TBD

📌 Task
Status

Needs work

Version

10.1 ✨

Component
Media  →

Last updated about 15 hours ago

Created by

🇳🇱Netherlands Lendude Amsterdam

Live updates comments and jobs are added and updated live.
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.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work over 1 year ago
  • 🇮🇳India akshay_d Bangalore

    Hi

    I am updating the patch #38 for using ckeditor5 on drupal 9.5.x.

    As part of this i have removed the ckeditor4 updates from #38. But the status will be still needs work from the comment #39.

    Thanks

Production build 0.69.0 2024