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

Make the mirador config more easily alterable, Drupal-side. #22

Merged
merged 5 commits into from
Jul 4, 2023

Conversation

adam-vessey
Copy link
Contributor

@adam-vessey adam-vessey commented May 30, 2023

What does this Pull Request do?

Moves building up the "object" of Mirador viewer config PHP-side, so we can alter/adjust/augment it more easily, minimizing the size of the actual Javascript "integration" piece required.

  • Related GitHub Issue: (link)

  • Other Relevant Links: (Google Groups discussion, related pull requests,
    Release pull requests, etc.)

What's new?

A in-depth description of the changes made by this PR. Technical details and
possible side effects.

  • Changes x feature to such that y
  • Added x
  • Removed y
  • Does this change add any new dependencies?
  • Does this change require any other modifications to be made to the repository
    (i.e. Regeneration activity, etc.)?
  • Could this change impact execution of existing code?

How should this be tested?

A description of what steps someone could take to:

  • Reproduce the problem you are fixing (if applicable)
  • Test that the Pull Request does what is intended.
  • Please be as detailed as possible.
  • Good testing instructions help get your PR completed faster.

Documentation Status

  • Does this change existing behaviour that's currently documented?
  • Does this change require new pages or sections of documentation?
  • Who does this need to be documented for?
  • Associated documentation pull request(s): ___ or documentation issue ___

Additional Notes:

Any additional information that you think would be helpful when reviewing this
PR.

Interested parties

Tag (@ mention) interested parties or, if unsure, @Islandora/committers

Object.entries(settings.mirador.viewers).forEach(entry => {
const [base, values] = entry;
once('mirador-viewer', base, context).forEach(() =>
Mirador.viewer(values, window.miradorPlugins || {})
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The window.miradorPlugins thing here seems like we could have saner expectations? Like, have the integration itself include it itself, so there's not this arbitrary JS extension point?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With something like roblib/mirador-integration-islandora#1, could possibly avoid having to touch window.miradorPlugins here? Could just become:

Suggested change
Mirador.viewer(values, window.miradorPlugins || {})
Mirador.viewer(values)

@adam-vessey adam-vessey marked this pull request as ready for review June 19, 2023 13:52
... apparently, is strict about the keys being numeric.
@jordandukart
Copy link
Member

This looks fine here to me but given the in-flight work being undertook in the community I am hesitant to merge this prior to having more sets of eyes on this, primarily in regards to the roblib integration pull and the changing of the attached structure (albeit it's backwards compatability).

@wgilling wgilling requested a review from alxp June 21, 2023 17:18
@alxp
Copy link
Contributor

alxp commented Jul 4, 2023

Just noticed that this was no longer marked as Draft.

I tested it and the plugins and everything still works as expected so this looks good.

@alxp alxp merged commit 38570cc into Islandora:2.x Jul 4, 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

Successfully merging this pull request may close these issues.

3 participants