Overview

#3471978: Make the Media Library dialog look like the admin theme without materially affecting anything outside of the dialog (possibly use an iframe for CSS isolation) made it so media library widgets opened via the props form render with the admin theme

This should now be expanded so media library widgets opened via any form in the contextual panel are rendered by the admin theme.

NOTE THE FOLLOWING
Based on testing a branch PRE #3471978: Make the Media Library dialog look like the admin theme without materially affecting anything outside of the dialog (possibly use an iframe for CSS isolation) , I was not able to get a page-data-form triggered media library widget to include the "insert" button. This issue will focus on rendering the media library widget with the admin theme, but the scope does not include changing / expanding the dialog functionality beyond what was already available before the rendering changed in #3471978.

Proposed resolution

User interface changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

bnjmnm created an issue. See original summary.

nagwani’s picture

Title: Exapand Media Library admin theme rendering beyond props form. » Expand Media Library admin theme rendering beyond props form.
bnjmnm’s picture

Issue summary: View changes

nagwani’s picture

Status: Active » Needs review
bnjmnm’s picture

StatusFileSize
new357.49 KB
new367.85 KB
new343.85 KB

XB Page - Page Data (no buttons - as was the case pre-#3471978)

Article - Page Data (no buttons - as was the case pre-#3471978)

XB Page - Props (the "add media" button does not work reliably, which is not in this issue's scope. It was the case pre-#3471978 and will likely be fixed with the solution reported in #3505826: Image can only be replaced one time before "add media" stops working

bnjmnm’s picture

Note the test failures in the pipeline are unrelated to the changes in this issue. You can see PHPUnit passing on the previous major runs

hooroomoo’s picture

Issue summary: View changes
StatusFileSize
new88.87 KB
new96.75 KB

I manually tested this and can confirm that the media library styles look good when clicking from the Page data form from both Article and an XB_Page. Below are screen shots from opening an article and xb_page from the "Page data" form

But I am unable to check for regressions from opening from the props form because I'm unable to add an image to XB because of this issue: https://www.drupal.org/project/experience_builder/issues/3501902.

(I tried testing it with an in-progress MR from that issue and it let me place an image to XB but it does not open the media library dialog when i click "Add media" which makes me think it might just be best to test it after the image issue is fixed and merged.)

bnjmnm’s picture

The "add media" button can get a little flaky if it is used multiple times, not related to the changes in this issue. There's an NR merge request that addresses that here: #3505826: Image can only be replaced one time before "add media" stops working

effulgentsia’s picture

Issue tags: +sprint
lauriii’s picture

Issue tags: +Needs followup

The styles seem to be loading fine but the dialog buttons are not working. If we're not fixing it here, we'll need a follow-up for that.

bnjmnm’s picture

Issue tags: -Needs followup

Just to clarify, what was spotted in #11 was mentioned in the summary.

I feel it's important to clarify it is something that props-form-triggered media library widgets have never been capable of doing, and not an issue introduced by any of the theming efforts, nor should it be within the scope of those. The need to get this working should be reflected in the issue queue, of course, but (at the risk of nitpicking) it's not a followup to this issue - it's just one of many things that need to happen as part of constructing Experience Builder.

But yep lets be sure it is documented and findable in the issue queue #3506467: Make Media Library widget work from "page data" (content entity form)

wim leers made their first commit to this issue’s fork.

  • wim leers committed b035e69c on 0.x authored by bnjmnm
    Issue #3505772 by bnjmnm, hooroomoo, nagwani: Expand Media Library admin...
wim leers’s picture

This improves on the status quo. Let's get it in.

effulgentsia’s picture

Issue tags: -sprint

Status: Fixed » Closed (fixed)

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