Skip to content

Logic for removing topic features and indicating PDF generation or download#2

Open
dcnb wants to merge 2 commits intoDigital-Grinnell:mainfrom
dcnb:main
Open

Logic for removing topic features and indicating PDF generation or download#2
dcnb wants to merge 2 commits intoDigital-Grinnell:mainfrom
dcnb:main

Conversation

@dcnb
Copy link
Copy Markdown

@dcnb dcnb commented Aug 13, 2025

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:

  • Filter controls in _includes/transcript/item/filters.html are now only rendered if there is more than one transcript segment (trancheck.size > 1), avoiding unnecessary UI when transcripts aren't present. [1] [2]
  • The filter dropdown and reset button are only enabled if both site.data.filters and uniquesubjects are 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:

  • Similarly, The transcript visualization (transcript-viz.html) is now only included if both site.data.filters is enabled and there is at least one unique subject, ensuring the visualization is meaningful.

Download button logic:

  • The PDF download/generation button in _includes/transcript/item/download-buttons.html now 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 the pdf field in the item's metadata

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