ProjectMirador / mirador

An open-source, web-based 'multi-up' viewer that supports zoom-pan-rotate functionality, ability to display/compare simple images, and images with annotations.
https://projectmirador.org
Apache License 2.0
550 stars 256 forks source link

Displaying annotations for intended target #3568

Open jptmoore opened 2 years ago

jptmoore commented 2 years ago

Manifest URLs: https://miiifystore.s3.eu-west-2.amazonaws.com/iiif/annotest.json

Hi. When I view annotations and the annotation target does not match the canvas being displayed the annotation is still shown. Here is a simple example where the 2nd annotation is shown despite not having a matching canvas/target to display on: https://projectmirador.org/embed/?iiif-content=https://miiifystore.s3.eu-west-2.amazonaws.com/iiif/annotest.json

cbeer commented 2 years ago

Thanks for the report, and the test case object. I had a look at the IIIF spec and I feel like there's some ambiguity about whether a canvases annotations can target other canvases:

The motivation of the Annotations must not be painting, and the target of the Annotations must include this resource or part of it. https://iiif.io/api/presentation/3.0/#annotations

but later on, this seems reduced to a SHOULD (perhaps allowing canvas annotations to target contained content resources?):

All of the Annotations in the Annotation Page should have the Canvas as their target https://iiif.io/api/presentation/3.0/#55-annotation-page

--

I think we also need some clarification about how to handle canvas annotations that target other canvases. Do we simply filter them out (because they are given in error, I guess?), or does mirador need to aggregate all the annotations in a IIIF presentation manifest (whether specified in the hierarchy for this canvas or elsewhere) to collect matching manifest, or some other behavior?

Can you share any real-world manifests with this behavior to help determine the appropriate user experience?

jptmoore commented 2 years ago

Hi.

I think it makes sense that if you are applying annotations to a particular canvas those annotations would have the same target. What I am not sure how to handle is when the annotation page is retrieved from an annotation server where the annotations belong to a container that is not specific to a canvas. It is at another level of abstraction. For example, a container of cats containing multiple annotations with different targets like this: https://miiify.rocks/annotations/cats This would require filtering on the target to avoid showing all annotations about cats on a single canvas. I wonder if there is another way to handle this in the manifest?

brittnylapierre commented 1 month ago

Hey all! Does this mean that when an annotation doesn't resolve, don't show it in the side menu? image