Revert to using a node-level viewer override #71
Merged
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.
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
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.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.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 theviews_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.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).