Skip to content

feat: add in-platform transcript editor to the videos page - #3215

Open
abhalsod-sonata wants to merge 1 commit into
openedx:masterfrom
abhalsod-sonata:feat/in-platform-transcript-editor
Open

feat: add in-platform transcript editor to the videos page#3215
abhalsod-sonata wants to merge 1 commit into
openedx:masterfrom
abhalsod-sonata:feat/in-platform-transcript-editor

Conversation

@abhalsod-sonata

@abhalsod-sonata abhalsod-sonata commented Aug 27, 2026

Copy link
Copy Markdown

Adds an in-platform transcript editor to the Studio videos page. Course authors can
open "Edit transcript" from a transcript row's action menu and edit the SRT in the
browser instead of the download → edit locally → re-upload round-trip.

What's included:

  • New transcript-editor/ module: cue-by-cue text editing with SRT parsing/validation
    (srtUtils), invalid-SRT alerting, debounced auto-save, and a video preview with
    click-to-seek + active-cue highlighting and auto-scroll.
  • The video Info content moves under the preview (InfoTab via a new
    infoModalContentUnderPreview slot on FileTable/InfoModal), and the info sidebar
    lists transcripts directly - this intentionally supersedes the previous tabbed
    sidebar layout for videos.
  • The row action menu label for videos changes from "Info" to "Info and
    transcripts"
    (FileMenu, MoreInfoColumn); two existing tests that asserted the
    old label on video fixtures are updated.
  • Saving a transcript re-uploads the SRT through the existing /transcript_upload/
    endpoint; the UI distinguishes replace (200) from create (201) - see dependency
    below.

Impacted user roles: Course Authors (primary); Developers (new
transcript-editor module and the infoModalContentUnderPreview extension point on
the generic file table).

Screen recording:

  • Before:
Before.mp4
  • After
After.mp4

Supporting information

Testing instructions

Automated:

npm ci
npx jest src/files-and-videos --coverage=false
# 20 suites / 229 tests expected green

Manual (tutor dev):

  1. Check out feat: return 200 when a transcript upload replaces an existing language openedx-platform#39038 in your platform (or any branch
    containing it) and run Studio.
  2. npm run dev in this repo (port 2001); open a course with videos that have
    transcripts → Videos page.
  3. Row ⋮ menu shows "Info and transcripts" (videos only; Files page unchanged);
    the info modal shows the video preview with Info content below it and
    transcripts listed in the sidebar.
  4. Transcript row menu → Edit transcript: edit a cue, watch auto-save, Save;
    reopen to confirm persistence; click cues to seek the preview.
  5. Paste invalid SRT content → validation alert, save blocked.
  6. Network tab: re-saving an existing language returns 200; adding a new language
    returns 201.

Other information

  • Port provenance & adaptations (for reviewers comparing against the downstream
    PRs): rebased onto current master, which required - merging with the new
    permissions gating in FileTable/MoreInfoColumn; porting one-line changes into
    the TS-renamed FileMenu.tsx and messages.ts files; re-applying the
    injectIntl → useIntl migration on top of the reworked Transcript.jsx; and
    keeping upstream's key={idx} fix in TranscriptTab.
  • CourseVideosTable still passes activeTab/setActiveTab into the sidebar factory
    for compatibility; the new sidebar ignores them. Happy to remove that plumbing here
    or in a follow-up if preferred.
  • Playback: seekTo() guards the play() promise and ignores AbortError
    (interrupted play on rapid cue-seek/pause/unmount), logging anything else.
  • Accessibility: built from Paragon components (Menu, AlertModal, form controls);
    no dedicated audit yet - feedback welcome, especially on cue-list keyboard
    navigation.
  • i18n: all new messages include translator descriptions; existing message ids are
    unchanged so downstream translations carry over.

Best Practices Checklist

  • Any new files are using TypeScript (.ts, .tsx).
    - The new transcript-editor/ module is ported as .jsx/.js to stay
    reviewably close to the downstream original. Happy to convert
    TranscriptEditor/srtUtils to TS in this PR if preferred
    - say the word.
  • Avoid propTypes and defaultProps in any new or modified code.
    - Ported/modified components follow the surrounding files' existing
    PropTypes style; will drop them as part of the TS conversion above if requested.
  • Tests should use the helpers in src/testUtils.tsx (initializeMocks)
    - Changes extend the existing videos-page suites, which predate
    initializeMocks; kept their established setup for consistency.
  • Do not add new fields to the Redux state/store. (No slice/thunk changes;
    editor state is component-local.)
  • Use React Query to load data from REST APIs.
    - Transcript content is fetched via the page's existing axios helpers
    (videos-page/data/api.js); this page has not been migrated to React Query yet.
  • All new i18n messages in messages files have a description for translators.
  • Avoid ../ in import paths; use @src for parent-folder imports.

Relevant backend PR

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Aug 27, 2026
@openedx-webhooks

Copy link
Copy Markdown

Thanks for the pull request, @abhalsod-sonata!

This repository is currently maintained by @bradenmacdonald.

Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review.

🔘 Get product approval

If you haven't already, check this list to see if your contribution needs to go through the product review process.

  • If it does, you'll need to submit a product proposal for your contribution, and have it reviewed by the Product Working Group.
    • This process (including the steps you'll need to take) is documented here.
  • If it doesn't, simply proceed with the next step.
🔘 Provide context

To help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:

  • Dependencies

    This PR must be merged before / after / at the same time as ...

  • Blockers

    This PR is waiting for OEP-1234 to be accepted.

  • Timeline information

    This PR must be merged by XX date because ...

  • Partner information

    This is for a course on edx.org.

  • Supporting documentation
  • Relevant Open edX discussion forum threads
🔘 Submit a signed contributor agreement (CLA)

⚠️ We ask all contributors to the Open edX project to submit a signed contributor agreement or indicate their institutional affiliation.
Please see the CONTRIBUTING file for more information.

If you've signed an agreement in the past, you may need to re-sign.
See The New Home of the Open edX Codebase for details.

Once you've signed the CLA, please allow 1 business day for it to be processed.
After this time, you can re-run the CLA check by adding a comment below that you have signed it.
If the CLA check continues to fail, you can tag the @openedx/cla-problems team in a comment for further assistance.

🔘 Get a green build

If one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green.

Details
Where can I find more information?

If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources:

When can I expect my changes to be merged?

Our goal is to get community contributions seen and reviewed as efficiently as possible.

However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:

  • The size and impact of the changes that it introduces
  • The need for product review
  • Maintenance status of the parent repository

💡 As a result it may take up to several weeks or months to complete a review and merge your PR.

@github-project-automation github-project-automation Bot moved this to Needs Triage in Contributions Aug 27, 2026
@mphilbrick211 mphilbrick211 moved this from Needs Triage to Needs Tests Run or CLA Signed in Contributions Aug 27, 2026
@mphilbrick211 mphilbrick211 added the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 27, 2026
@mphilbrick211

Copy link
Copy Markdown

Hi @abhalsod-sonata! in order to get your CLA check to turn green, please have your manager reach out to oscm@axim.org to have you added to our existing entity agreement.

Thank you!

@mphilbrick211 mphilbrick211 removed the needs test run Author's first PR to this repository, awaiting test authorization from Axim label Aug 27, 2026
Course authors can now edit video transcripts directly in Studio:
"Edit transcript" in a transcript row's action menu opens an editor
with per-cue text editing, SRT validation, debounced auto-save, and
click-to-seek playback with active-cue highlighting against the video
preview. The video's Info content moves below the preview (InfoTab),
the sidebar lists transcripts directly, and the row menu label becomes
"Info and transcripts" for videos.
@abhalsod-sonata
abhalsod-sonata force-pushed the feat/in-platform-transcript-editor branch from eb30fd5 to 4b28c54 Compare August 28, 2026 07:28
@abhalsod-sonata

Copy link
Copy Markdown
Author

Hi @abhalsod-sonata! in order to get your CLA check to turn green, please have your manager reach out to oscm@axim.org to have you added to our existing entity agreement.

Thank you!

CLA check resolved!

@abhalsod-sonata

Copy link
Copy Markdown
Author

@bradenmacdonald
Can you please review and approve this PR?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

open-source-contribution PR author is not from Axim or 2U

Projects

Status: Needs Tests Run or CLA Signed

Development

Successfully merging this pull request may close these issues.

3 participants