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.
GitHub Issue:
IslandoraCon 2022 Use-a-thon "Make viewers simpler".
Replaces #72
What does this Pull Request do?
Switches PDFjs, Openseadragon, and Binary handling to be simpler. The choice to use the special viewer is now set on the media, not the node.
What's new?
This is a new simpler way to select viewers. It does not use contexts or view modes on the node.
If you have an existing site, you cannot get this setup directly (you can't re-install Defaults!), but by seeing how it works it's not too hard to set up.
new module required, "View Mode Switch".
new View Mode switcher field on media (Document, File, Image) that lets you override the "Source" view mode by the "Openseadragon" or "pdfjs" view mode (as applicable). Decision was made to only make it available on the media types with a likely use case. We only have one (recommended) way to show Audio and Video so those media types were left as-is. If you want to implement another viewer you can extend this behaviour by placing or configuring a view mode switch field.
With this field, individual media can show up using their selected View Mode (pdfjs or openseadragon) instead of Source, in the standard (Islandora-provided) EVA view that shows up on repository items by default
since we dont need them, delete the PDFJS EVA and Openseadragon EVA
Since we dont need them, delete the (node) view modes that existed just to show the pdfjs and openseadragon EVAs
Since we don't need them, delete the contexts that switched nodes to use the above view modes
Since we dont need it, delete the Display Hint field on Nodes
Since we don't need it (view mode switcher's options come from the available view modes), delete the Display Hint taxonomy
Don't migrate terms into the Display hint taxonomy.
Does this change require documentation to be updated? Yep! Our team is working on it. one change in particular is that we no longer "guess" based on object type whether to show the "Original File" or the "Service File". The default behaviour now (i think this makes sense) is that the thing to show in the "viewer" area is the thing that you tagged Service file. Therefore if your PDF (for example) is an original file, but you also want it to be the thing in the viewer, then tag that file as a "Service File" as well.
Does this change add any new dependencies? Yep! Adds a new module, View Mode Switch
Does this change require any other modifications to be made to the repository
(i.e. Regeneration activity, etc.)? no
Could this change impact execution of existing code? no.
How should this be tested?
Install this PR on a fresh (never seen islandora defaults) site.
Ensure that:
Additional Notes:
Any additional information that you think would be helpful when reviewing this
PR.
Interested parties
Tag (@ mention) interested parties or, if unsure, @Islandora/8-x-committers