Motivation

For sites having a lot of files, loading the Media Library in Gutenberg will result in timeout errors, or give a bad UX since the user will see nothing (white screen) for a long time.

The issue is that Gutenberg Drupal module implements it's own Media library using MediaController.php and some JS.

Aside from performance issues, this makes it not configurable.

Proposed resolution

  • Solution #1: Use Views. Implement Gutenberg "Media library" view for files entities. This makes configurable for pagination, sorting, searching ...etc.
  • Solution #2: Use Entity Browser. TBH this is a better solution since it standardizes selection, and browser configuration. However, this might add a dependency on Entity Browser module. Perhaps it could be as "optional" config if Entity Browser module was installed.

Remaining tasks

TBD.

User interface changes

TBD.

API changes

TBD.

Data model changes

TBD.

Release notes snippet

TBD.

Comments

Mohammed J. Razem created an issue. See original summary.

Mohammed J. Razem’s picture

Issue summary: View changes
thorandre’s picture

Category: Bug report » Feature request
Status: Active » Needs work

Good input! This is probably a feature to put into the roadmap ahead.

roborn’s picture

Version: 8.x-1.x-dev » 8.x-2.x-dev
Issue tags: +ContributionWeekend2021
Related issues: +#3150127: Insert Image or Media shows blank modal Media Library window

Solution #1 was implemented, but there's a blocking issue https://www.drupal.org/project/gutenberg/issues/3150127

roborn’s picture

Status: Needs work » Fixed

Solution #1 is now implemented on 2.x-dev

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.