You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fixes a few minor bugs involving the embedded Mirador viewer.
Instructions for Reviewers
Bug 1: Currently you can remove or add the mirador viewer by only removing or adding the dspace.iiif.enabled field from the Item. Toggling the value to true or false has no effect. This PR makes it possible to show/hide the viewer by updating the field value.
Bug 2: For sites that support the IIIF Content Search API it's extremely useful to pass the DSpace query to the viewer. The query is obtained from the Angular route history. The current implementation doesn't work for searches executed from new community and collection pages and is updated here to support all route paths that include a query parameter.
Bug 3: When embedding the viewer we see errors in console. This PR should eliminate those errors.
You can test by adding dspace.iiif.enabled to an item and toggling the value to true and false to verify that the viewer is correctly enabled and disabled.
IIIF Content Search can't be tested directly, but if you view an IIIF-enabled item from a list of search results on a community page you should see the query term in the iframe URL. (If you also add iiif.search.enabled to the item metadata the query term will appear in the viewer.)
Console should be clear of errors.
List of changes in this PR:
iiif-item-utils is updated to address the first two bugs listed above
The mirador component and template are modified to use the DsSafeUrl pipe when adding the URL to the Mirador iframe. This fixes the unsafe resource url error in console that was triggered when using an observable.
A minor change to the mirador config.default.js fixes a second console error
Checklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
My PR is created against the main branch of code (unless it is a backport or is fixing an issue specific to an older branch).
My PR is small in size (e.g. less than 1,000 lines of code, not including comments & specs/tests), or I have provided reasons as to why that's not possible.
My PR uses i18n (internationalization) keys instead of hardcoded English text, to allow for translations.
My PR includes details on how to test it. I've provided clear instructions to reviewers on how to successfully test this fix or feature.
If my PR includes new libraries/dependencies (in package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.
If my PR includes new features or configurations, I've provided basic technical documentation in the PR itself.
To verify it is working the item metadata must include iiif.search.enabled=true. I was mistaken above when I said that the query will appear in the iframe url even if search is not enabled.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 APPROVALpull request only requires a single approval to mergebugintegration: IIIFRelated to International Image Interoperability Framework (IIIF) supportmerge conflictport to dspace-8_xThis PR needs to be ported to `dspace-8_x` branch for next bug-fix releaseport to dspace-9_xThis PR needs to be ported to `dspace-9_x` branch for next bug-fix releaseport to dspace-10_xThis PR needs to be ported to `dspace-10_x` branch for next bug-fix release
4 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a few minor bugs involving the embedded Mirador viewer.
Instructions for Reviewers
Bug 1: Currently you can remove or add the mirador viewer by only removing or adding the
dspace.iiif.enabledfield from the Item. Toggling the value to true or false has no effect. This PR makes it possible to show/hide the viewer by updating the field value.Bug 2: For sites that support the IIIF Content Search API it's extremely useful to pass the DSpace query to the viewer. The query is obtained from the Angular route history. The current implementation doesn't work for searches executed from new community and collection pages and is updated here to support all route paths that include a query parameter.
Bug 3: When embedding the viewer we see errors in console. This PR should eliminate those errors.
You can test by adding
dspace.iiif.enabledto an item and toggling the value to true and false to verify that the viewer is correctly enabled and disabled.IIIF Content Search can't be tested directly, but if you view an IIIF-enabled item from a list of search results on a community page you should see the query term in the iframe URL. (If you also add
iiif.search.enabledto the item metadata the query term will appear in the viewer.)Console should be clear of errors.
List of changes in this PR:
iiif-item-utilsis updated to address the first two bugs listed aboveDsSafeUrlpipe when adding the URL to the Mirador iframe. This fixes the unsafe resource url error in console that was triggered when using an observable.config.default.jsfixes a second console errorChecklist
This checklist provides a reminder of what we are going to look for when reviewing your PR. You do not need to complete this checklist prior creating your PR (draft PRs are always welcome).
However, reviewers may request that you complete any actions in this list if you have not done so. If you are unsure about an item in the checklist, don't hesitate to ask. We're here to help!
mainbranch of code (unless it is a backport or is fixing an issue specific to an older branch).npm run lintnpm run check-circ-deps)package.json), I've made sure their licenses align with the DSpace BSD License based on the Licensing of Contributions documentation.