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

Use view mode switcher. #73

Closed
wants to merge 1 commit into from
Closed

Conversation

rosiel
Copy link
Member

@rosiel rosiel commented Aug 4, 2022

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:

You create a repository item with an Image (media type) Service File, and it will show that service file on the node.
if you use the View Mode Switcher on the image, you can make that image show up in openseadragon on the node.
Similarly with PDFs in Documents. (default is a download link; with "pdfjs" selected on the media it shows pdfjs)
Similarly with PDFs or TIFFs in Files.

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

@rosiel
Copy link
Member Author

rosiel commented Jun 23, 2023

Defaults is deprecated.

@rosiel rosiel closed this Jun 23, 2023
@rosiel rosiel deleted the use-view-mode-switch branch June 23, 2023 16:57
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

Successfully merging this pull request may close these issues.

1 participant