scaife-viewer / frontend

Skeleton, Widgets, and other frontend packages for the Scaife Viewer
0 stars 3 forks source link

Folio images mode only shows the first image when multiple are returned #27

Open jacobwegner opened 4 years ago

jacobwegner commented 4 years ago

What happens:

When viewing passage reference 12r-14v, all of the text parts are shown, but only the first folio image is shown:

image

When paginating to 15r-17v, the first folio image is shown

image

What I'd expect to happen:

Show multiple folios, with the text parts "grouped" into a text part / folio row.

(The ImageAnnotations query could even return the relevant text parts, rather than having to build something up client-side:

https://github.com/scaife-viewer/frontend/blob/master/packages/reader-image-mode/src/ImageModeReader.vue#L72 )

jacobwegner commented 3 years ago

@paltman I've got a new deploy up:

https://mini-stack-a-feature-fo-m269pa.herokuapp.com/graphql/#operationName=Folios&query=query%20Folios(%24urn%3A%20String!)%20%7B%0A%20%20imageAnnotations(reference%3A%20%24urn)%20%7B%0A%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20idx%0A%20%20%20%20%20%20%20%20imageIdentifier%0A%20%20%20%20%20%20%20%20textParts%20%7B%0A%20%20%20%20%20%20%20%20%20%20edges%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20node%20%7B%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20id%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20ref%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%20%20%7D%0A%20%20%20%20%20%20%7D%0A%20%20%20%20%7D%0A%20%20%7D%0A%7D%0A&variables=%7B%0A%20%20%22urn%22%3A%20%22urn%3Acts%3AgreekLit%3Atlg0012.tlg001.msA-folios%3A12r-14v%22%0A%7D

Pedantically, the textParts relation is including 12r, 12r.1, 12r.1.1, 12r.1.2, etc. I'm still mulling around this.

Looping back to our discussion, I'd still think you'd want to do two queries:

And then you could flatten textParts from the image annotations and map the refs from the text parts to "group" the passage text parts within each image annotation.

Take a look, and if you would rather see additional changes on the server, I'm open to discussing it further.,

jacobwegner commented 3 years ago

This isn't ready yet; requires an ATLAS data model change

jacobwegner commented 3 years ago

@jtauber this can be reviewed via http://deploy-preview-47--sv-mini.netlify.app/reader/urn:cts:greekLit:tlg0012.tlg001.msA-folios:12r-13v?mode=folio