Closed dleadbetter closed 3 weeks ago
@jamiefolsom - A few notes on implementing this feature and the proof-of-concept I've been working on. Interested in your thoughts on the UI and if we should keep going down this path of pagination or explore other options.
In order to implement pagination in the IIIF Presentation API, the recommendation is to use Collections, specifically, Collections of Collections:
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "http://localhost:3001/core_data/public/places/e954666b-d4e2-4960-95f8-864d36cf319a/media_contents/manifest?project_ids=11",
"type": "Collection",
"label": "Test",
"items": [
{
"type": "Collection",
"id": "http://localhost:3001/core_data/public/places/e954666b-d4e2-4960-95f8-864d36cf319a/media_contents/manifest/1?page=1\u0026project_ids=11",
"label": "Page 1"
},
{
"type": "Collection",
"id": "http://localhost:3001/core_data/public/places/e954666b-d4e2-4960-95f8-864d36cf319a/media_contents/manifest/2?page=2\u0026project_ids=11",
"label": "Page 2"
}
]
}
The Viewer
component doesn't support collections, however the Slider
component is designed (somewhat) for this:
It isn't exactly setup to handle pagination and looks a little awkward. There also isn't any ability to customize the look of the Slider
component.
To leverage some of what we've already done in IIIF Cloud, I attempted to use the Viewer
component to render a collection of manifests, each containing a single image:
{
"@context": "http://iiif.io/api/presentation/3/context.json",
"id": "http://localhost:3001/core_data/public/places/e954666b-d4e2-4960-95f8-864d36cf319a/media_contents/manifest/1?page=1\u0026project_ids=11",
"type": "Collection",
"label": "Page 1",
"items": [
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/35ad0be1-4d9a-4d17-9bb0-d54228c1b031/manifest",
"label": "3c615a570b45f5a6496aca94ae11dc7d.jpeg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/edb25b0b-c62b-40af-afcb-2fdb98702cb6/manifest",
"label": "75a98514-bf01-4a21-b9c1-1d9dd219f4b3HiResProxy.jpg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/fededf00-d6bc-4ebc-b6e8-594e20175195/manifest",
"label": "5426b1019ad0531e6b4e4fcfc5122af6.jpeg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/c440b03b-b86f-46aa-904c-a019425b2d34/manifest",
"label": "69647db5bfa49a8d293ecbdb253d7d8a-p_e.jpg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/edf7a351-242c-40f6-98fb-bdb55b7e9208/manifest",
"label": "530700-boston-common.jpg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/108e1c8c-fe3a-42e0-9ff9-e53b77f6f932/manifest",
"label": "875355095_f40b6c9ff4_b.jpg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/6f7ee219-1a6e-4bd3-aaa0-b99f4db95cdc/manifest",
"label": "average-cost-of-electricity-in-ma.jpg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/1ebec6ad-a336-4209-9daf-cf68adc904e5/manifest",
"label": "boston-where-to-stay.jpeg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/700fa93f-a06b-46eb-9c21-78b19037bbf1/manifest",
"label": "Harrison-Plympton-edit-1-1024x617.jpeg"
},
{
"type": "Manifest",
"id": "https://iiif-cloud-staging.herokuapp.com/public/resources/3729066d-de02-4479-aae0-0cb595cb3851/manifest",
"label": "ISH_WC_Boston4.jpg"
}
]
}
While it works, the UI is a little less than great. Each manifest is rendered as a dropdown item instead of a thumbnail/slider (which I guess makes sense since each manifest could contain multiple images).
@dleadbetter @NickLaiacona here's the plan we discussed today. Let me know if this corresponds to your understanding, and/or if you have further questions/concerns, or if further complexities present themselves as you move forward.
Cap the number of media objects that can be related to any parent record (place, person, source, etc), at a number to be determined through performance testing, and through discussion with clients/projects. 100, or 1000 for now, and we'll validate that input in Core Data so users know they've reached the cap.
For a given record, we will create a IIIF manifest containing the related media records, and their metadata (drawn from native fields on the parent record; UDF values on the media object, UDF values on the parent record, and UDF values on the join record, as appropriate), which will be available within and outside of Core Data, at a stable, unauthenicated URL (unless the record is deleted).
Since any CD model can have any number of media model inclusions, and any record can have up to the number of related media allowed, this should not unduly constrain any project.
Manifests must be valid per the IIIF Presentation API v.3.0, tested using https://presentation-validator.iiif.io/, and Mirador, Universal Viewer, etc.
The record viewer (like the place viewer on the Peripleo prototype) will have either:
When a user clicks on a thumbnail, we'll present that manifest and its contents using Clover, and could include and present anything IIIF Cloud can handle, including images, videos, audios, PDFs, etc.
The Atlas Design shows the first option, which I think is preferable:
In the future, we'll discuss:
@NickLaiacona is going to review this to be sure it works for NBU.
Allow all media attached to a record to be viewable within a IIIF viewer. This will include making all image available within the same IIIF manifest (IIIF Cloud). Some performance/technical aspects to consider:
POST
a list of resource IDs?fetching
the URL/public/places/:id/media_content/manifest
?