yalelibrary / YUL-DC

Preliminary issue tracking for Yale University Libraries Digital Collections project
3 stars 0 forks source link

Viewing hint for non-paged Canvases #142

Closed mikeapp closed 3 years ago

mikeapp commented 4 years ago

Issue

In paged objects there are sometimes additional images inserted into the sequence. For instance, in some cases a page is shot twice. The additional image causes the two-up book viewer mode to not show facing pages. See the example below.

The solution is to provide a viewing hint (or behavior in IIIF Presentation 3) on the IIIF Canvas that indicates that the Canvas is not part of the page sequence.

Screen Shot 2020-05-13 at 9.53.46 PM.png

Acceptance

Note: This field should be coming in the METS data. If not, we need to create a new ticket to make sure we're getting the data we need.

mikeapp commented 3 years ago

This might be done already?

alishaevn commented 3 years ago

@mikeapp the manifest in the description doesn't currently have a 2 page view available. so maybe this ticket has been solved? if I remember correctly, isn't it the manifest that determines if the uv will show the 2 page option?

http://universalviewer.io/uv.html?manifest=https://collections-uat.library.yale.edu/manifests/10958722#?c=0&m=0&s=0&cv=4&xywh=-1249%2C226%2C3433%2C2908

image.png

mikeapp commented 3 years ago

At the Manifest (/parent) level, there has to be a viewingHint (https://iiif.io/api/presentation/2.1/#viewinghint) of paged to trigger the two-up book reader view.

At the Canvas (/child) level, there are additional viewingHints that can be applied, see the drop-down:

Screen Shot 2021-04-20 at 6 01 13 PM

These should be expressed on that child's Canvas, for example if the first Canvas were non-paged it would look like:

{
  "@context": "http://iiif.io/api/presentation/2/context.json",
  "@id": "https://collections-uat.library.yale.edu/manifests/10958722",
  "@type": "sc:Manifest",
  "label": "Texts on St. Jerome",
  "sequences": [
    {
      "@id": "https://collections-uat.library.yale.edu/manifests/sequence/10958722",
      "@type": "sc:Sequence",
      "canvases": [
        {
          "@id": "https://collections-uat.library.yale.edu/manifests/oid/10958722/canvas/10962124",
          "@type": "sc:Canvas",
          "viewingHint": "non-paged",
          "images": [
            {
              "@id": "https://collections-uat.library.yale.edu/manifests/oid/10958722/canvas/10962124/image/1",
              "@type": "oa:Annotation",
              "motivation": "sc:painting",
etc....

There's no guarantee that the viewer will actually render this correctly, so just focus on outputting the viewingHint in the Manifest JSON correctly.

dylansalay commented 3 years ago

We uncovered an issue where the parent object was not re-creating the manifest when it was updated. We addressed that in this ticket so now when a viewing hint is added, the parent object will reflect that viewing hint in the manifest and the universal viewer.

We will be making a new ticket for re-creating the manifest when a child object is updated. For now, if you need to update the viewing hint for a child object, you will need to update the viewing hint on the child object, and then update the parent object so the manifest is regenerated.

alishaevn commented 3 years ago

The work for this ticket is complete, but we need to address the failing specs and drop in coveralls coverage.

FCRodriguez7 commented 3 years ago

Needs discussion for rerunning manifest.

FCRodriguez7 commented 3 years ago

Released management v2.36.1

mikeapp commented 3 years ago

Looks good on test.