Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Render placeholderCanvas Element for Empty Canvases #263

Closed
2 tasks done
joncameron opened this issue Oct 11, 2023 · 2 comments
Closed
2 tasks done

Render placeholderCanvas Element for Empty Canvases #263

joncameron opened this issue Oct 11, 2023 · 2 comments
Assignees

Comments

@joncameron
Copy link
Contributor

joncameron commented Oct 11, 2023

Corresponds to the work to represent empty media objects or sections so that they render with a message to the user about the fact that the item/media is missing or deleted.

Ramp should render the placeholderCanvas for any canvas that does not have items (or has empty items?)

Done Looks Like

  • When a canvas has no items, the placeholderCanvas is rendered instead if it exists
  • If a canvas has no items and there is no placeholderCanvas, use generic message: "This item cannot be played."
@elynema
Copy link

elynema commented Dec 7, 2023

Ramp is rendering the placeholderCanvas properly when a new item has been uploaded to a media object and is not available and when there is a restricted/deleted item in a playlist.

I'm not entirely sure how to test the general case where a canvas has no items and also does not have a placeholderCanvas. @Dananji is there a way to test this general case relatively easily? Or have you already tested that?

@elynema
Copy link

elynema commented Jan 11, 2024

Created a manifest for a playlist with only 1 item and that item is restricted and removed the placeholderCanvas: https://raw.githubusercontent.com/elynema/sample-manifests/main/manifest-playlist-empty-canvas.json. I confirmed that in this scenario, the Ramp demo site says "This item cannot be played."

The IIIF Presentation validator does not like this test manifest at all for several reasons (the fact that there is only 1 empty canvas could be part of it?):

URL Tested: https://raw.githubusercontent.com/elynema/sample-manifests/main/manifest-playlist-empty-canvas.json

Error 1 of 3. Message: 'items' is a required property
Detail: AnnotationPage id, type and items required
Path: /items[0]/items[0]/['items' is a required property]
Description:
{"type":"AnnotationPage","id":"https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304/annotation_page/7b4d0b5b-060e-4d1c-9368-4077494e19f6"}
Error 2 of 3. Message: {'type': 'Canvas', 'id': 'https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304', 'label': {'none': ['Restricted item']}, 'items': [{'type': 'AnnotationPage', 'id': 'https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304/annotation_page/7b4d0b5b-060e-4d1c-9368-4077494e19f6'}], 'partOf': [{'type': 'manifest', 'id': 'https://avalon-dev.dlib.indiana.edu/media_objects/fq977t794/manifest'}], 'metadata': [{'label': {'en': ['Title']}, 'value': {'en': ['Yellowstone']}}, {'label': {'en': ['Date']}, 'value': {'en': ['2003']}}, {'label': {'en': ['Main Contributor']}, 'value': {'en': ['Vassar, David.']}}]} is not valid under any of the given schemas
Detail:
Path: /items[0]/[{'type': 'Canvas', 'id': 'https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304', 'label': {'none': ['Restricted item']}, 'items': [{'type': 'AnnotationPage', 'id': 'https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304/annotation_page/7b4d0b5b-060e-4d1c-9368-4077494e19f6'}], 'partOf': [{'type': 'manifest', 'id': 'https://avalon-dev.dlib.indiana.edu/media_objects/fq977t794/manifest'}], 'metadata': [{'label': {'en': ['Title']}, 'value': {'en': ['Yellowstone']}}, {'label': {'en': ['Date']}, 'value': {'en': ['2003']}}, {'label': {'en': ['Main Contributor']}, 'value': {'en': ['Vassar, David.']}}]} is not valid under any of the given schemas]
Description:
{"type":"Canvas","id":"https://avalon-dev.dlib.indiana.edu/playlists/55/manifest/canvas/304","label":"{ ... }","items":"[ ... ]","partOf":"[ ... ]","metadata":"[ ... ]"}
Error 3 of 3. Message: None is not of type 'object'
Detail: Language string, must have a language and value must be an array.
Path: /structures[0]/label/[None is not of type 'object']
Description:
null

Resolving that is probably a separate issue.

@elynema elynema closed this as completed Jan 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants