-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/newspaper viewer revisions (WIP) #166
Closed
mathewjordan
wants to merge
50
commits into
samvera-labs:main
from
wykhuh:feature/newspaper-viewer--revisions
Closed
Changes from 48 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
8d519ea
add package-lock.json
wykhuh 0d33799
add newspaper manifest
wykhuh 66e5240
add page to display newspaper example
wykhuh a0dfa22
give plugins access to opensnapdragon viewer
wykhuh 2e04af8
add methods to process annotations
wykhuh f3076d4
add newspaper page that highlights search word
wykhuh 95c6e7c
display annotation resources on information panel
wykhuh 164971f
click on annotation to zoom and pan; add osd viewer to store
wykhuh c349432
replace unneeded osdViewerCallback with osd viewer in store
wykhuh a053083
add overlays to OpenSeadragon viewer using annotations manifest
wykhuh 8927726
remove add overlay code from newspaper page
wykhuh 1e6dc54
add page to display annotation examples from IIIF cookbook
wykhuh 350872b
make annotation overlays work with point selectors
wykhuh dfb5cf1
render annotations that use html
wykhuh 797337b
make annotation overlays work with svg
wykhuh 2f6fbfd
add zoomLevel to annotation config
wykhuh a797dee
remove annotation manifest from newspaper page
wykhuh a108528
refactor seadragon-svg - add import, export; get rid of require
wykhuh be9418a
show information panel renderAnnotation is true, but no annotation
wykhuh 979825e
refactor checking if annotation has valid motivation
wykhuh df500e8
fix tests for annotation overlay
wykhuh 93c715f
fix linting errors
wykhuh ced93b7
remove osdViewerCallback
wykhuh c8bc0e8
show information panel on annotations docs
wykhuh aec8e04
remove deprecated prop from newspaper page
wykhuh 6d44c5c
fix openseadragon svg - rename file; to check if viewer has been loaded
wykhuh 38fcaba
remove hardcoded code for svg bounding box
wykhuh b3c9351
add note about svg overlay bug
wykhuh 0331f85
Consolidate annotation resource gathering.
mathewjordan 94452df
Create Annotation folder under InformationPanel
adamjarling ac85e18
Parse annotation format and target; rewire VTTs.
mathewjordan c4110d7
Update openseadragon helpers, abstact rect creation.
mathewjordan 98e5096
Get OSD overlays working
adamjarling 3572c2d
Fix test for addOverlaysToViewer()
adamjarling 1056284
Get click handler working (part way) for 0261 recipe non-rectangular …
adamjarling a9e2c62
Update annotation parsing to handle tagging motivation, which support…
adamjarling 22e3aa3
Support image annotation for recipe 11, Image in annotations
adamjarling e1c3148
Update styling of annotation items, consolidate with previous VTT cue…
adamjarling d8c4b68
TypeScript cleanup part one
adamjarling a6ceb5c
TypeScript cleanup part two
adamjarling 9de1158
Get all tests to pass
adamjarling 748ac8e
Video captions working again with new annotations structure
adamjarling 974953b
Finish tests for getAnnotationResources helpers
adamjarling f6f0cdd
Remove old references to getSupplementingResources() helper function
adamjarling 351fae9
Add fixed 0135 specific point recipe.
mathewjordan 9736b86
Add some Annotation component tests
adamjarling b5efb3f
Merge branch 'feature/newspaper-viewer--revisions' of github.com:wykh…
adamjarling cc68774
Wrap up tests for new Annotation components
adamjarling 28a1939
PR cleanup AnnotationItem component
adamjarling d73bbea
Update newspaper fixture manifest to have unique Annotation and Annot…
adamjarling File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/usr/bin/env sh | ||
. "$(dirname -- "$0")/_/husky.sh" | ||
|
||
pnpm exec lint-staged | ||
# pnpm exec lint-staged |
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import Viewer from "docs/components/DynamicImports/Viewer"; | ||
import CallToAction from "docs/components/CallToAction"; | ||
|
||
|
||
## Viewer | ||
|
||
<br /> | ||
<CallToAction href="/docs/viewer" text="Docs" size="small" /> | ||
|
||
## Displays "Other kinds of annotations" from [IIIF cookbook](https://iiif.io/api/cookbook/). | ||
|
||
<Viewer | ||
iiifContent="http://localhost:3000/manifest/annotations/annotations.json" | ||
options={{ | ||
informationPanel: { open: true }, | ||
canvasHeight: "640px", | ||
openSeadragon: { | ||
gestureSettingsMouse: { | ||
scrollToZoom: false, | ||
}, | ||
}, | ||
}} | ||
/> |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import React from "react"; | ||
|
||
import Viewer from "docs/components/DynamicImports/Viewer"; | ||
|
||
function Newspaper() { | ||
const iiifContent = | ||
"http://localhost:3000/manifest/newspaper/newspaper_collection.json"; | ||
|
||
return <Viewer iiifContent={iiifContent} />; | ||
} | ||
|
||
export default Newspaper; |
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a weird bug. When there is a collection, Clover will display a dropdown menu to switch between items in the collection. If you use the menu to switch items the first time, the canvas is updated. If you use the menu to switch items 2nd, 3rd, etc times, the manifest changes but the canvas painting does not change.
http://localhost:3000/newspaper
The bug exists on the version of Clover that is running the GitHub pages.
https://samvera-labs.github.io/clover-iiif/docs/viewer/demo?iiif-content=https://iiif.io/api/cookbook/recipe/0068-newspaper/newspaper_title-collection.json
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wykhuh @mathewjordan Spent the morning digging into this odd behavior, and getting quite familiar with
vault
s storage structure. Which finally pointed me to the underlying problem, or at least the cause of this bug.vault
will store it's resources, ("Collection", "Annotation", "AnnotationPage", etc) keyed by the resourceid
. There were duplicate resourceid
s (URIs), for anAnnotation
andAnnotationPage
between the two fixture files:When switching to the 2nd manifest in
public/manifest/newspaper/newspaper_collection.json
,vault
was overriding the value for:http://localhost:3000/manifest/newspaper/annotation_page_painting/ap1
http://localhost:3000/manifest/newspaper/annotation/p1
Updating the
id
s innewspaper_issue_2.json
makesvault
happy and it can uniquely retrieve items as expected once again.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamjarling The bug also happens in the IIIF newspaper recipe https://iiif.io/api/cookbook/recipe/0068-newspaper/newspaper_title-collection.json Is the bug also caused by a duplicate id in the IIIF recipe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wykhuh Hmmm, well that is interesting. I don't see any duplicate
id
s in that manifest, so that's not the problem, but something else is. I think we should add that recipe to theannotations
test page and look into further.