Repository navigation
Conversation
kdid
force-pushed
the
clover-4
branch
3 times, most recently
from
November 5, 2026 20:52
94adbf4 to
f90ef4a
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Upgrades Digital Collections from the deprecated
@samvera/clover-iiif3.17.0 to@nulib/clover4.4.2 (now maintained innulib-ds/clover) for the work-page viewer, the IIIF primitives (title, summary, metadata, thumbnails) and the collection/related-item sliders.Clover 4 is a rewrite, not a drop-in upgrade: settings are props instead of an
optionsobject, the markup and class names are new, and the package is ESM-only. This PR moves DC onto it while keeping the current look and behavior. Users get Clover 4's viewer, with highlighted content-search hits, a transcript view for A/V, and new image controls, while panel tabs, sliders and typography still look like current DC.User-facing:
Changes
@samvera/clover-iiifwith@nulib/clover4.4.2.pages/_app.tsxnow imports@nulib/clover/styles.css.components/Clover/ViewerWrapper.tsx, `components/Work/EmbeddedViewer.tsx):optionsto Clover 4 props:header,defaultPanelOpen,panelLayout="tabs",panelSections,panelLabels,request,searchQuery,onContentStateChange. The 640px canvas height is now--clover-body-height.searchQueryis set.components/Clover/CloverViewer.tsx, becausenext/dynamic'srequire.resolveWeakcan't resolve an import-only package.components/Clover/clover-request.ts, new): Clover 4 applies one request setting to everything it fetches.info.json, search, annotation pages), so restricted works keep working./public/vtt/) are fetched without cross-origin credentials, because that host answersAccess-Control-Allow-Origin: *, which browsers reject for credentialed requests. Without this, the transcript tab was blank.TopInfo,Metadata,Hero,Homepage/Overview,EmbedResources):value=. Metadata's custom search links moved fromcustomValueContenttorenderValue.Thumbnailhas noregionprop.components/Clover/SliderWrapper.tsx):<Items layout="slider">.homepage.ViewerWrapper.module.css,SliderWrapper.module.css): rewrote the overrides for Clover 4's markup.gr3size. Clover 4 sizes text inrem, and DC's root is 19px, so panel text came out too large.jest.config.js): transform@nulib/cloverand@iiif/parser, which are ESM-only. Slider and viewer tests were updated for Clover 4, andclover-request.test.tswas added.lib/constants/homepage.ts): one homepage overview thumbnail URL contained//full/and returned 403. Clover 3 built a different URL from the image service and hid the typo.Testing
Known differences / follow-ups
nulib-ds/cloverCenter searches around user and start from current canvas. nulib-ds/clover#397, h. Once it's released, bump@nulib/clover.?content-search=. Clover 4 has nocontentSearchCallback; there's a TODO inViewerWrapper.tsx. Searches started from the URL still work..m3u8) didn't play, because Clover 4'sThumbnailonly renders<img>. The video tile is now a still poster frame.