Olivero: Media library within Layout Builder modal is unstyled

Created on 24 September 2020, over 4 years ago
Updated 31 May 2024, 8 months ago

Problem/Motivation

As a front-end end theme, Olivero will be in visible when using Layout Builder to create structured content. When accessing the media library, the interface does not look consistent with the rest of the theme, or how the media library looks with other themes.

The filters are stacked instead of being inline:

The images do not appear in a grid, and the checkboxes are below the images:

For reference, here's what Bartik looks like for the same use case (almost certain the checkboxes are over the images outside of Layout Builder):

And here's what Gin looks like:

Steps to reproduce

Create a content type with Layout Builder enabled for managing layouts.
Create a custom block type with an entity reference field for media entities.
Use layout builder to edit a node's layout, and then add an inline block has a media reference field. Click "Add media" to open the media library.

Proposed resolution

Add styling to make the media library look as it does in other themes. Or better!

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Media 

Last updated about 8 hours ago

Created by

🇨🇦Canada mandclu

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

    It involves the content or handling of Cascading Style Sheets.

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.

  • 🇬🇧United Kingdom joachim

    AFAICT the media_library.ui route is what provides the content for the media library browser. So I'd have thought that setting this on the route would do it:

      options:
        _admin_route: true
    

    but it has no effect.

    Is there something in the routing system which switches the theme in an ajax response?

  • 🇬🇧United Kingdom joachim

    > But, in that case, this is a duplicate of #3050508: Media library loads front-end theme when invoked from settings tray, correct?

    I don't think it is.

    If we solve the problem by adding basic styling for the Media Library in media module itself, then the result is that the media library will look OK in all themes. So #3050508: Media library loads front-end theme when invoked from settings tray will still be an issue for people who want that consistency of theme, but it won't be as much of a problem because it'll be usable.

  • First commit to issue fork.
  • Status changed to Needs review 8 months ago
  • 🇮🇳India gauravvvv Delhi, India

    Here is after patch screenshot

  • Pipeline finished with Failed
    8 months ago
    Total: 624s
    #179981
  • Status changed to Needs work 8 months ago
  • 🇺🇸United States smustgrave

    Believe issue summary should be updated to include screenshots olivero before/after. Currently showing bartik and gin which aren't in core.

  • 🇨🇦Canada SKAUGHT

    Bartik (old core) and Gin as contrib are good reminders that this issue is against the media module and should be more toward stark as base module, or media component itself.

Production build 0.71.5 2024