Skip to content

WIP: Implement transcription support in Hyrax#7380

Draft
kirkkwang wants to merge 2 commits into
mainfrom
implement-transcriptions
Draft

WIP: Implement transcription support in Hyrax#7380
kirkkwang wants to merge 2 commits into
mainfrom
implement-transcriptions

Conversation

@kirkkwang

Copy link
Copy Markdown
Contributor

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-major Major Changes (Potentially breaking changes)
  • notes-minor New Features that are backward compatible
  • notes-deprecation Deprecations
  • notes-bugfix Bug Fixes
  • notes-valkyrie Valkyrie Progress
  • notes-docs Documentation
  • notes-container Containerization 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:

class PostsController
  def index
    respond_with Post.limit(10)
  end
end

Changes proposed in this pull request:

@samvera/hyrax-code-reviewers

@github-actions

github-actions Bot commented Mar 11, 2026

Copy link
Copy Markdown

Test Results

    13 files  ± 0      13 suites  ±0   3h 1m 48s ⏱️ + 4m 1s
 7 100 tests + 5   6 791 ✅ + 2  306 💤 ±0  3 ❌ +3 
18 957 runs  +18  18 442 ✅ +13  510 💤 ±0  5 ❌ +5 

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.
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f206e366ce0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f262c2699c8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f95eda26e00>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f206dedd700>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f262c2234a0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f95ed97b2d0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: 8d98612c-3ed8-473e-863d-7cab98b490af
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 3f0c5f17-2aa0-4d41-8fe4-0c2f3a2c999c
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: c184b35d-16b3-4c34-a32a-e04723126026
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: c9c2798e-f45c-4fe8-8f5c-c0abc761ba0d
…
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007f8cad67d4a0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fa6e8f99750>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplate:0x00007fc52c914c60>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007f8cad668ac8>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fa6e9075ca0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to create #<Hyrax::PermissionTemplateAccess:0x00007fc52147b2e0>
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy AdminSet: a5c431b1-cf24-41b0-bd5a-1969f456af9c
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 132ff51f-0818-418c-abfb-e07373df2417
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to destroy Hyrax::AdministrativeSet: 75c46f8e-3b68-4195-bf15-20885b6b36c6
spec.abilities.ability_spec ‑ Hyrax::Ability AdminSets and PermissionTemplates a user without edit access is expected not to be able to edit AdminSet: 50f1adb9-38b3-4604-a503-531b8f141705
…

♻️ This comment has been updated with latest results.

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>
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