Skip to content

How we should express which Canvas should be opened when I click on the parent Range? #2423

@giacomomarchioro

Description

@giacomomarchioro

At the moment, in some viewers when you click in a parent Range we can reach the contained Canvases but not the first element of the Range itself.
There is some debate on what should be the expected viewer behaviour when a user click on the parent range:
ProjectMirador/mirador#3521 (comment)
The viewers seems to interpret this inconsistently (see for instance TIFY in https://iiif.io/api/cookbook/recipe/0024-book-4-toc/)

For instance, imagine a Book with this structure:

Chapter 1 (page 6)
Chapter 1 Section 1 (page 8)

This wold results in a manifest with this structure:

Manifest
structures
Range (ToC)
          items
             Range (Chapter 1) (when I click it opens the Canvas list but I can't reach the Canvas of the where the first Chapter begins)
             items
                Canvas 1 (Chapter 1 Section 1) (when I click I go to the Section 1 of Chapter 1 as intended)

From the specs the most plausible solution seems to be using start:

{
  "type": "Range",
  "label": { "en": ["Chapter 1"] },
  "start": {
    "id": "https://example.org/manifest/canvas/page6",
    "type": "Canvas"
  },
  "items": [
    {
      "type": "Range",
      "label": { "en": ["Chapter 1 Section 1"] },
      "items": [
        {
          "id": "https://example.org/manifest/canvas/page8",
          "type": "Canvas"
        }
      ]
    }
  ]
}

I open this issue for discussion before using this on a recipe, and in case I think it would be good to have this on the main Presentation API documentation examples.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions