mirador icon indicating copy to clipboard operation
mirador copied to clipboard

Parent item in structure linked to canvas

Open ch-sander opened this issue 4 years ago • 7 comments

It seems impossible for Mirador (and UV) to link a parent item in the structures ('Table of contents') to the canvas that is specified in the manifest.json but links will only be active for child items of the ultimate level. Put simple: If you have the 'Book 1' beginning at p. 10, and sub-items like 'Diagram 1/2/n', only these sub-items will be linked to the canvases, although there is a canvas also for the parent item in the json.

This is not how I as a reader would want to navigate and hierarchical PDF bookmarks work differently, too. Parent items in historical documents are often themself referers in the document and duplacting them seems awkward.

Can you fix this?

Example:

"structures": [
    {
      "id": "https://dlib2.biblhertz.it/iiif/3/bdh0000089635/ranges",
      "type": "Range",
      "label": {
        "en": [
          "Table of Contents"
        ]
      },
      "items": [
        {
          "id": "https://dlib2.biblhertz.it/iiif/3/bdh0000089635/ranges/5",
          "type": "Range",
          "label": {
            "en": [
              "Book 1"
            ]
          },
          "items": [
            {
              "id": "https://dlib2.biblhertz.it/iiif/3/bdh0000089635/canvas/p0005",
              "type": "Canvas"
            },
            {
              "id": "https://dlib2.biblhertz.it/iiif/3/bdh0000089635/ranges/7",
              "type": "Range",
              "label": {
                "en": [
                  "Diagram 1"
                ]
              },
              "items": [
                {
                  "id": "https://dlib2.biblhertz.it/iiif/3/bdh0000089635/canvas/p0007",
                  "type": "Canvas"
                }
              ]
            }
          ]
        }

ch-sander avatar Dec 01 '21 16:12 ch-sander

Hi all! Could someone explain the desired functionality more visually? This would help with design, thanks

brittnylapierre avatar Aug 27 '24 19:08 brittnylapierre

Has been a while and the host's image server seems to be down for my own examples to test but if I remember correctly the issue is that only the child items (lowest level) link to a canvas, i.e. are clickable to load an image, while any parent structure item only unfolds the children but is itself not linked to a canvas in the UI.

I assume this is intended but it fails to address how (historical) documents work where some parent item, say a chapter, has children, say paragraphs, and users would want to navigate to the canvas for a chapter to begin while the first paragraph is only e.g. two canvases later to start.

grafik


Index/Table of Contents UI Structure

  • Book Title (Clickable, leads to cover page canvas)
    • Chapter 1 (Not clickable, but should lead to the first canvas of the chapter)
      • Paragraph 1.1 (Clickable, leads to its specific canvas)
      • Paragraph 1.2 (Clickable, leads to its specific canvas)
      • Paragraph 1.3 (Clickable, leads to its specific canvas)
    • Chapter 2 (Not clickable, but should lead to the first canvas of the chapter)
      • Paragraph 2.1 (Clickable, leads to its specific canvas)
      • Paragraph 2.2 (Clickable, leads to its specific canvas)

Issue

  • When users want to start reading from the beginning of a chapter, they cannot directly navigate to the chapter's starting canvas. Instead, they have to manually click through or find the first chapter's canvas.

Proposed Solution

  • Make each chapter header clickable and link it to the canvas where the chapter begins. This provides a more intuitive navigation experience, aligning with the traditional way users interact with physical documents.

ch-sander avatar Aug 27 '24 20:08 ch-sander

maybe @giacomomarchioro remembers as well

ch-sander avatar Aug 27 '24 20:08 ch-sander

yes, for instance when we click over the chapter in the table of content like in this example the UI opens a dropdown, it does not set the current canvas to the chapter starting point, so the user has to click on the subsection. This is particularly annoying if the subsection start some pages after the Chapter starting point, the user that wants to start reading a chapter must first click on the subsection and then move up to the Chapter starting point. Other viewers don't behaves like this see for instance theseus, maybe @ch-sander could provide a link to a manifest that has a subsection starting some pages after the chapter starting point, the comparison between theseus and mirador could clarify the issue.

giacomomarchioro avatar Aug 28 '24 10:08 giacomomarchioro

thanks @giacomomarchioro for clarification. Once our image server is back to work, I can point to an example here. In my pseudocode in the initial comment, it's maybe best understood if you imagine a manifest structure that has chapters or books as top-level-structure and images or tables as sub-structure that rarely occur in the first page of a book/chapter.

ch-sander avatar Aug 28 '24 10:08 ch-sander

Hi, I also think that this would be a useful feature (moreover, it can be achieved by changing just one line of code), but it seems that it contradicts to the following commit: https://github.com/ProjectMirador/mirador/commit/8e429384e71692efb8a70a8e276f780702975ea3 which says "Parent nodes in TOC should only be expandable but should not set the canvas".

goynov avatar Feb 06 '25 14:02 goynov

Linking this discussion (item 2) about the original implementation for reference. I would be in favor of the change, but it will turn out to be more complex than a single line.

lutzhelm avatar Feb 06 '25 14:02 lutzhelm