WIP: Implement transcription support in Hyrax#7380
Draft
kirkkwang wants to merge 2 commits into
Draft
Conversation
Test Results 13 files ± 0 13 suites ±0 3h 1m 48s ⏱️ + 4m 1s For more details on these failures, see this check. Results for commit 891c447. ± Comparison against base commit da62e1e. This pull request removes 366 and adds 371 tests. Note that renamed tests count towards both.♻️ This comment has been updated with latest results. |
eltiffster
added a commit
that referenced
this pull request
Apr 16, 2026
orangewolf
added a commit
that referenced
this pull request
May 12, 2026
* Add transcript_ids property to file set model(s) * Add transcript_ids to file set form * Copy changes from @kirkkwang's draft PR, WIP: Implement Transcription Support in Hyrax #7380 https://github.com/samvera/hyrax/pull/7380/changes * Support transcriptions for ActiveFedora works * Fix broken specs * Normalize VTT file set language values to 2-letter language codes. * Simplify iiif_manifest_presenter_spec#annotates_content * Add comments and rubocop fixes * Add language field to file set form and move transcript ids form hint into simple form * Add VTT transcripts to default audio/video partials * Fix "l is not a function" error when displaying VTT transcripts in Annotations tab of Clover IIIF viewer. "l" is supposed to refer to the <ItemStyled> object in Annotation (https://github.com/samvera-labs/clover-iiif/blob/main/src/components/Viewer/InformationPanel/Annotation/Item.styled.tsx). In the minified version of this file, this should actually be uppercase L, not lowercase l. `l("span",{style:{backgroundImage` was changed to `L("span",{style:{backgroundImage` `return l(n9,{dir:P,"data-format"` was changed to `return L(n9,{dir:P,"data-format"` There appears to be an unnecessary call to `l()` in the following switch/case statement: ``` case "text/vtt": return l(HQ, { inlineCues: k, label: A, vttUri: ((D = y[0]) == null ? void 0 : D.id) || void 0 }); ``` In fact, `return l(HQ,{inlineCues:k` can be changed to `return HQ({inlineCues:k` since HQ is a function in the minified file. * Fix "l is not a function" error for other file types. The implementation for other file types seems unfinished and doesn't work. * Use the file set presenter to render the file set edit form instead of the solr document. Do not make language a required field for a file set. * Allow transcriptions_controller to serve file types other than VTT. Fix some formatting and specs. * Fix syntax error in clover.js * Increase the height of Clover IIIF viewer so that thumbnails for works with multiple files are visible. * Rename "transcriptions" to "transcripts" for consistency * Account for ActiveTriples::Resource in a transcript's language field. Remove tests for code that was already tested/covered elsewhere. * Remove unused fallback label, since a file set should always have a title or label * Make language optional again in IIIF manifest annotations, especially since it's not required by the viewer. * Delete a stray, unnecessary comment * Rename .valid_transcripts to .available_transcripts * Update file_set_form_helper_spec.rb * Fixes for Koppie: use file_ids_ssim.first instead of original_file_id * Fix and refactor file_set_form_helper_spec to use top-level context blocks (instead of describe) * Rubocop fixes and add comment * Refactor file set form * Use cached parent for FileSetFormHelper instead of running an extra query. Rename form_transcript_ids_select_for to transcript_ids_select_options * Add vtt file metadata to file_set_form_helper_spec * When searching for available transcripts. use an fq filter to capture both FileSets and Hyrax::FileSets. * Fix whitespace and add some clarifying comments. * Authorize transcript before streaming the file * Remove test for ActiveTriples::Resource in presenters/hyrax/displays_transcripts. It was created for a hypothetical edge case in which someone might configure a controlled vocabulary field (e.g. Hyrax::ControlledVocabularies::Language) in an AF-based app. Removed since it doesn't refer to any existing use case in Hyrax. * Make `transcript_ids` property conditional on Hyrax.config.file_set_include_metadata. Add `transcript_ids` to default flexible metadata profiles. * Update metadata profiles to fix allinson and koppie builds * Move the transcripts_ids form field to views/records/edit_fields so it can be optional for apps with flexible metadata. * Move transcript_ids into the file set metadata schema * Update clover.js to v.3.6.0, which officially fixes samvera-labs/clover-iiif#305 --------- Co-authored-by: Rob Kaufman <rob@notch8.com>
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.
Fixes
Fixes #issuenumber ; refs #issuenumber
Summary
Present tense short summary (50 characters or less)
Guidance for testing, such as acceptance criteria or new user interface behaviors:
Type of change (for release notes)
Add an appropriate
notes-*label to the PR (or indicate here) that classifies this change.Choose from:
notes-majorMajor Changes (Potentially breaking changes)notes-minorNew Features that are backward compatiblenotes-deprecationDeprecationsnotes-bugfixBug Fixesnotes-valkyrieValkyrie Progressnotes-docsDocumentationnotes-containerContainerization related (Docker, Helm, etc)Detailed Description
More detailed description, if necessary. Try to be as descriptive as you can: even if you think that the PR content is obvious, it may not be obvious to others. Include tracebacks if helpful, and be sure to call out any bits of the PR that may be work-in-progress.
Description can have multiple paragraphs and you can use code examples inside:
Changes proposed in this pull request:
@samvera/hyrax-code-reviewers