Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What does this do?
This is a big one...
This adds the ability for a user to select between options a
Choice
annotation type.https://www.w3.org/TR/annotation-model/#choice-between-bodies
If a Choice exists on the active canvas, the options are presented to the user in a select render below the visible canvas (OpenSeadragon for Image, HTML5 video for Video and Sound). The work he abstracts out the Collection select and makes this component generic under
src/components/internal/Select
. The newly created Select component is then used for both the Collection drop down in the header, functioning as it did previously, and as the Choice select UI element. In the case of Choice, the the default option is the first item in the Choice array.When reviewing, the following manifests should accomplish different things:
An image manifest with choice will render the
ImageViewer
component with a Choice select below it. With this, Clover now supports the Multiple Choice of Images in a Single View (Canvas) recipe see: localhost:3000/docs/viewer/demo?iiif-content=https://iiif.io/api/cookbook/recipe/0033-choice/manifest.json locally.A video manifest with choice will render the
Player
component with a Choice select below it. With this, Clover will now support Avalon and Internet Archive manifests with choice options. See: localhost:3000/docs/viewer/demo?iiif-content=http://localhost:3000/manifest/avalon/transcript-annotation.json and localhost:3000/docs/viewer/demo?iiif-content=https://iiif.archive.org/iiif/Shogun_Miniseries/manifest.json locally. Note that the Internet Archive video formats may not currently be support by the browsers native HTML5 video element. It seems like Ogg Video is commonly supported.Collections should still function as expected, with a select render in the Header in lieu of a static text Manifest label. See: http://localhost:3000/docs/viewer/demo?iiif-content=https://canopy-iiif.github.io/canopy-iiif/api/facet/date/1910.json locally.