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
548 stars 258 forks source link

Presentation API 2.0 support for ranges and table of contents display #527

Closed snydman closed 8 years ago

thehabes commented 9 years ago

I have written an algorithm using recursion that takes a collection of ranges, in any order, and displays them from largest collection to smallest in a 'table of contents' style display so that there are no repeats and the proper parent-child relationship is maintained throughout. I had to do this for one of the projects that SLU has taken on. The canvases contained within the ranges display with all of their annotations. I planned on showing it at the Monday, 5/4 IIIF event.

In conjunction with this piece, I am working on a "re-ordering" interface so that ranges can be removed from or included in other ranges in a 'drag-and-drop' style, but this will not be prepared in time for the event.

thehabes commented 9 years ago

http://165.134.241.141/brokenBooks/getManifest.html --There's a sneak peek. The code I have on my local machine is already improved. The things that are out of order are so on purpose to I can work on my re-ordering interface. Things will make much more sense when I demo.

aeschylus commented 9 years ago

Here is some more data provided by Sean Martin with the Vatican. The relevant code is in a recursive method in the toc module. I'll have a look at how it can be adapted to handle 2.0 manifests better than currently, but it looks like there may be other issues besides. Paste follows: The issue with display and navigation of table of contents with Mirador 2

Preamble

The web site video at https://www.youtube.com/watch?v=9b1ReCZh9-E has at around time 1:00

mins a good looking table of contents (TOC) with indents - see attached screen shot below:

I have located the Harvard manifest and been able to reproduce the table of contents (TOC) with a

similar user experience. The indents can be controlled to collapse and expand, and also one can

navigate by clicking on an entry. So far so good …

However I have tried but failed to reproduce a similar behaviour with a TOC for one of the Vatican

manuscripts.

Rob has confirmed that Mirador has so far implemented version 1.0 of the IIIF spec regarding ranges,

but has not yet implemented version 2.0. The structure of these versions is different: version 1.0 is

essentially bottom-up and version 2.0 is top-down.

Background and timing

The Vatican pilot project funded by Mellon will conclude at the end of June. It comprises ten

manuscripts which will be viewed by Vatican staff. Most of them have rich structural information,

hence a good TOC presentation and navigation will be important. There is thus a timing issue about

when the issue might be resolved - in essence the sooner the better.

It will be desirable for us to have a working version by mid May, so that we can conduct testing, and

then make a release with the set of ten manuscripts by the end of May.

Summary of the Issue

I have experimented to find under which conditions I am able to get a good looking TOC and under

what conditions I am not. Here is a summary of what I have found:

I have two similar test cases, TOC1 and TOC2, and both comprise five canvases each with one image.

The canvases are numbered 0 to 4.

The ranges in the first test case, TOC1, are:

Range label Start canvas End canvas

Canvases 1 - 4 1 4

Canvas 2 2 2

Canvases 3 & 4 3 4

The ranges in the second test case, TOC2, are:

Range label Start canvas End canvas

Canvases 2 - 4 2 4

Canvas 2 2 2

Canvases 3 & 4 3 4

The difference is highlighted: TOC1 has a range with canvases 1-4 and TOC2 has a range with

canvases 2 – 4. TOC2 omits canvas 1 from the range.

TOC1 “works” - here is a screen shot:

Each line can be selected and the main display jumps to the corresponding canvas. The triangle to

the left of the label canvases 1-4 can be clicked and the display collapses resulting in the following

screen shot:

Clicking again on the triangle expands the list back to the earlier screen shot.

However, the corresponding display with TOC2 is below, but clicking on the triangle to the left of the

label canvases 2-4 does not result in the display changing to reveal the lower subsections :

The two manifests are available at:

http://www.appliediiif.org.uk/manifests/TOC1.json

http://www.appliediiif.org.uk/manifests/TOC2.json

A “diff” of the two manifests results in several changes that relate solely from the change in name

from TOC1 to TOC2, but the significant change is the difference in the list of canvases for the range

(a) canvases 1 – 4 and (b) canvases 2 – 4, as follows:

165,168c165,167

< "http://www.appliediiif.org.uk/nullservice/TOC1/canvas/canvas1.json",

< "http://www.appliediiif.org.uk/nullservice/TOC1/canvas/canvas2.json",

< "http://www.appliediiif.org.uk/nullservice/TOC1/canvas/canvas3.json",

< "http://www.appliediiif.org.uk/nullservice/TOC1/canvas/canvas4.json"


            "http://www.appliediiif.org.uk/nullservice/TOC2/canvas/canvas2.json",

            "http://www.appliediiif.org.uk/nullservice/TOC2/canvas/canvas3.json",

            "http://www.appliediiif.org.uk/nullservice/TOC2/canvas/canvas4.json"

One line referring to canvas1 is missing in the latter.

Way forward and a potential dilemma

It’s plausible that the resolution of the issue is fairly straight forward, but it would be with version

1.0 of the range definition. This capability would then be superseded when Mirador migrates to

version 2.0 of the range definition. In essence there may be a dilemma or choice about which way to

go forward: fixing the issue on version 1.0 or updating to version 2.0.

For the Vatican project we need early resolution of the issue – either a fix with version 1.0 or an

implementation of 2.0. We can produce range information to version 2.0, but this has not been

tested as there is no software to consume it.

Sean Martin

24 April 2015

aeschylus commented 9 years ago

It would be great to have some help on this because it has no UI changes or design needed.

aeschylus commented 9 years ago

I have tested these in Mirador and discovered that advancing the pages will re-render the table of contents so that it displays correctly. However some of its behaviours are strange, for instance going back to the first canvas (which is not represented in TOC2 ranges) closes the range since it wasn't deliberately opened (this would seem normal except that there is no other range to focus.

It seems the TOC is attempting to focus/open, etc. the "first" range section, but no such range exists. This is likely because the canvas is not represented in any range. The relevant logic is at line 197 of TOC.js. This doesn't address any 2.0 formatting concerns, but adjusting this to check if the canvas exists in a range will fix the problem.

snydman commented 9 years ago

From Paola Manoni from the Biblioteca Apostolica Vaticana:

The expectation for TOC is to have a similar display and navigation as provided, e.g. http://digi.vatlib.it/view/MSS_Barb.gr.126 or http://digi.vatlib.it/view/MSS_Barb.gr.87 (list of contents) If you compare the same TOC in Mirador: http://iiifpilot1.vps.vatlib.it:8080/live/miradorbarb.gr.126.htm#e54eb2cb-abc0-4b85-8df8-cf970f3fd7bc and http://iiifpilot1.vps.vatlib.it:8080/live/miradorbarb.gr.87.htm#d54fa6a8-b71a-407d-b0f7-7afbf723533a

1) you display the information in a different indentation (e.g. Barb.gr.87: 'Legatura' is not at the same level as 'Ir Schema ontologicum aristotelicum' and '13r-35v Aristoteles: Categoriae' or '35v-48v Aristoteles: De interpretationes' are not the displayed as lower level of '13r-287v Aristotelis opera cum scholiis.' and '49r-92r + f. 17 inter ff. 89-90 iure hodie reposito lib. I' is not the lower level of '49r-120v Aristoteles: Analytica priora'). The three level of indentation are not provided. 2) Links are not provided and if you scroll the images the display of TOC is:

image

3) The line: "Table of contents" is not just a text but it's a link 4) The font-size is too large.

thehabes commented 9 years ago

Sure. Broken Books is not on GitHub and I am not suppose to put it there, so I will have to dig the code and put it on a text file to share it with you.

If you want to pull it out of the page, go to http://165.134.241.141/brokenBooks/getManifest.html. There will be an included file called bb.js. All of the parsing is done in one function called organizeRanges() which you can pull out of the code there if you would like. I am doing some work on it so I will give you the most updated code Saturday (5/16) if you would rather wait.

On Thu, May 14, 2015 at 4:35 PM, aeschylus notifications@github.com wrote:

@thehabes https://github.com/thehabes, when you get a chance, could I have a look at your 2.0 Ranges parser?

— Reply to this email directly or view it on GitHub https://github.com/IIIF/mirador/issues/527#issuecomment-102177225.


Bryan J. Haberberger Web Developer-Center for Digital Humanities Saint Louis University 314-977-4254

"You can say there is no good and no evil, but the fact remains the most existentially 'good' thing one form of matter can have on another is to aid

in its advancement."

PaolaManoni commented 9 years ago

Greetings. Again about the the bug - I was trying to browse TOC of Pal.lat.50 and clic on some of the items in list: links are not working but if you scroll the digital object (right or left) and you clic again it seems working but in that case selections are not consistent because the link goes to the previous image. e.g. http://iiifpilot1.vps.vatlib.it:8080/live/miradorPal.lat.50.htm if you clic on "116r-124v: Capitulare evangeliorum" [the range is from image 'Pal.lat.50_0241_fa_0116r' to image 'Pal.lat.50_0258_fa_0124v'] but Mirador selects the previous one: folio 115 v [image 'Pal.lat.50_0240_fa_0115v'] Thanks for your work in fixing the bug and thanks for this post (I have a concern for the pilot presentaion of our project in june...). Paola Manoni, Vatican Library 22 May 2015

snydman commented 9 years ago

@azaroth42 will create 2.0 version of Richardson 7 manifest using manifest factory as fixture.

azaroth42 commented 9 years ago

Expected this would be trivial ... it revealed a bug in the factory that I'm tracking down :(

azaroth42 commented 9 years ago

Bug fixed. Richardson 7 in 2.0 is: http://dlss-dev-azaroth.stanford.edu/prezi/r7_20.json

Have a look and make sure it's what you were expecting though!

rsinghal commented 8 years ago

duplicate of #94, closing