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

Revert to using a node-level viewer override #71

Merged
merged 5 commits into from
Mar 13, 2023

Conversation

rosiel
Copy link
Contributor

@rosiel rosiel commented Mar 10, 2023

This largely undoes the steps taken in the December 2022 sprint to move from having a node-level "Display Hints" field to having a VIew Mode Switcher on the Media.

Reasons for this reversion are outlined in this google group post.

This pull was co-authored with @Natkeeran and follows the same path (great minds... :) ) as outlined in that post by @simonhm.

Secondly (this snuck in, sorry) the Islandora Object's display configuration now puts all field labels "inline" instead of "above" their metadata. This looks a little prettier.

What this does

  1. Remove the View Mode Switcher field from Image, File, and Document media. If you've been using this field, export a mapping between the values in this field ( e.g. pdfjs) and the corresponding parent node id (e.g. nid=27).
  2. Re-implements the "Islandora Display" taxonomy, its RDF mapping, and the field_external_uri on that vocabulary. This PR also includes an updated migration spreadsheet, so the islandora_defaults_tags migration will now create the same two terms as before (PDF.js and OpenSeadragon). Tiny note, I changed the spelling to match how each system styles their own name. There's no space in OpenSeadragon.
  3. Adds a field back to Repository Item. Instead of calling it "Display Hints" it's now called "Viewer Override" (field_viewer_override). It uses the Islandora Display taxonomy vocabulary. We didn't use the same name to help with troubleshooting, since this uses a pretty different mechanism we hoped it could be clearer which one you're using. But they function essentially the same.
  4. Creates a new View called Media Display (media_display_blocks) which contains six blocks: One for each "source", "pdfjs" and "openseadragon" as view modes, and one each of those for "ServiceFile" and "OriginalFile". The blocks that render the ServiceFile use the views_field_view module's ability to nest views: If the service file view has no results, it tries to render a media tagged Original File. Hence, those blocks are named long names like 'Media Display - OpenSeadragon - Service File with fallback to Original'. All these blocks take a node ID through a contextual filter, and only show media of that node ID.
  5. Creates three Contexts: Default display, PDFjs, and OpenSeadragon. They display the appropriate block (the Service-file-with-fallback-to-original version) in "Content Above".
  6. Disables the EVA Service File view from the Repository Item's display, and just disables the view for good measure. We don't delete it because it's part of the Islandora Core Feature.

Is this simpler/better? Not sure. It avoids using Node View Modes, which I think ought to be reserved for when different sets of fields need to be rendered, so that's good. And this fallback technique will also hopefully make everybody happy (and reduce the need for double-tagging).

@rosiel rosiel merged commit 92125bc into Islandora-Devops:main Mar 13, 2023
@rosiel rosiel deleted the update branch March 13, 2023 19:03
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