Complete features for IIIF manifests, Mirador image viewer, and inline PDF viewing
Completes the development cycle for DDR-Public from May-Aug 2024 focusing on IIIF manifest support and new viewer tooling for images & PDFs.
Notable Changes
- Render IIIF Presentation API V3 manifests for all objects using ARK-based paths
- Use performant static pre-generated manifest files (if present) for structural data, else generate it on-the-fly
- Decorate the descriptive metadata in static manifests using DDR-Public's baseline config for metadata fields, labels, and transformations (hybrid static + dynamic manifest strategy)
- Create component-level manifests dynamically by supplementing the parent item's manifest with a
start
property (to begin on the corresponding component canvas) - Render a draggable link to a manifest in applicable sidebars and
Share
menus - Remove DUL's heavily-customized OpenSeadragon image viewer
- Implement Mirador IIIF viewer for image objects; configure to DUL preferences
- Implement Mirador viewer in
iframe
Embed views (e.g., for digital objects in finding aids) - Add Matomo analytics event tracking to elements of the Mirador viewer UI
- Add new JS tooling required to support building/running Mirador viewer with plugins (
jsbundling-rails
,esbuild
,yarn
) - Add
mirador-image-tools
plugin to support rotation, brightness/contrast, etc. - Add & configure
mirador-keyboardshortcuts
plugin to improve accessibility - Add a DUL-developed Mirador plugin to prevent unwanted scrollwheel interactions
- Patch some accessibility issues in Mirador UI
- Add inline browser-native PDF viewing on appropriate item & component show pages (note: does not use IIIF nor Mirador)
- Remove JSON Web Token-based paths for non-public images; access control is enforced via the
IiifImagesController
Developer Notes
Mirador is a React application, and using its plugin framework necessitates using JS bundling tools to support ESM (ECMAScript Modules). Key changes to note from a developer perspective:
- This MR adds necessary NPM dependencies in
package.json
- For now, leaves all other existing JS intact & managed through Sprockets
- When changing Mirador JS files in dev, run
yarn build --watch
to update bundled JS
IIIF Image API
These revisions keep DDR-Public's use of IIIF Image API at V2 (reflected in IIP image server config and in IIIF manifests). An upgrade to V3 will require resolution of this issue affecting our ability to specify a max height or width for an image without upscaling.