Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Serve Mirador through an iFrame #25

Closed
alxp opened this issue Jun 16, 2023 · 3 comments
Closed

Serve Mirador through an iFrame #25

alxp opened this issue Jun 16, 2023 · 3 comments

Comments

@alxp
Copy link
Contributor

alxp commented Jun 16, 2023

On one of our projects, we want to show the Mirador viewer inline with the node fields.

However, when I stick the block in this place, copying the approach of the field formatter, the viewport comes out of its parent

and occupies the whole area of the node. Specifically the element.

It turns out that the Mirador app also lives inside its own

element so it's probably conflicting styling that's causing the problem.

Looking at both Stanford's (https://exhibits.stanford.edu/jarndyce-test/catalog/qs858rw6303?search=gotty) and Harvard's (https://wiki.harvard.edu/confluence/display/LibraryStaffDoc/Mirador+iFrame+Test+Page), Mirador is embedded in an iFrame.

This seems to be the standard practice so I think we should follow it.

To do this we would need:

  1. A controller that serves nothing but the rendered Mirador app,
  2. Change the Mirador block to render an iFrame containing the above. A pointer to the manifest and any relevant query parameters representing search terms and / or page would need to be passed in.

Thoughts from @Islandora/committers especially @adam-vessey @ajstanley @rosiel very much welcome.

@cbeer
Copy link

cbeer commented Jun 16, 2023

👋

I don't think an iframe is a requirement for Mirador; we have an embedded test with positioned elements that works fine: https://mirador-dev.netlify.app/__tests__/integration/mirador/embedding.html

@adam-vessey
Copy link
Contributor

Seems to be working fine here, with the block embedded (making use of #22, but unsure if anything there might somehow fix whatever issue you're encountering?)?

Screenshot 2023-06-16 at 5 07 33 PM

That said, not opposed to having another alternative in addition to the present block/field implementations to do iframe things if we really want it, but unsure where it would ideally live. Vague recollections of the past, but: Generating plain unthemed pages of HTML in the Drupal context can get kind of weird... I feel like I could probably dig some up that's been done in the past, at least in D7 stuff.

There might be some funky Z-ordering stuff between Mirador's "workspace navigation" sidebar/panel and the admin toolbar dealio from Drupal, but that should be easily enough addressed with a bit of CSS overriding, one way or another.

@alxp
Copy link
Contributor Author

alxp commented Jul 7, 2023

This turned out to be a quirk of our particular theme.

FWIW the fix was to add a position: relative to the div that holds the Mirador wrapper block.

@alxp alxp closed this as completed Jul 7, 2023
@alxp alxp reopened this Jul 7, 2023
@alxp alxp closed this as not planned Won't fix, can't repro, duplicate, stale Jul 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants