Logic for removing topic features and indicating PDF generation or download#2
Open
dcnb wants to merge 2 commits intoDigital-Grinnell:mainfrom
Open
Logic for removing topic features and indicating PDF generation or download#2dcnb wants to merge 2 commits intoDigital-Grinnell:mainfrom
dcnb wants to merge 2 commits intoDigital-Grinnell:mainfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 pull request updates the transcript item pages to improve the display and behavior of filters and download buttons, especially for transcripts with multiple segments. The main changes ensure that filter and download options are only shown when they are relevant, and that filter controls are only enabled when there are subjects to filter by.
Filter controls and logic improvements:
_includes/transcript/item/filters.htmlare now only rendered if there is more than one transcript segment (trancheck.size > 1), avoiding unnecessary UI when transcripts aren't present. [1] [2]site.data.filtersanduniquesubjectsare present, preventing empty or non-functional filter controls when a user leaves in filter.csv but isn't assigning subjects to a csv. [1] [2]Visualization improvements:
transcript-viz.html) is now only included if bothsite.data.filtersis enabled and there is at least one unique subject, ensuring the visualization is meaningful.Download button logic:
_includes/transcript/item/download-buttons.htmlnow shows as "Generate PDF" if the PDF is being generated using the paged_js feature or "Download PDF" if the user can download a pdf of the transcript (Which would be listed in thepdffield in the item's metadata