Repository navigation
Conversation
The transcript language menu in the video editor listed every language with no height limit, so scrolling moved the page instead of the list. Cap it at 275px (matching the Files & Videos language picker) and keep scrolling contained in the menu. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…picker The transcript language selector chose between "upload" and "change language" using its local UI state, which a selection updates even when the file picker is then cancelled. The next selection on the still-unset transcript took the change-language path and the picker never reopened. Decide from the saved language instead; local state now only remembers which language the next upload is for. Also clear the shared file input's value after each selection so picking the same file again (e.g. after a failed upload) starts a new upload. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Rename localLang state to pendingUploadLang to reflect its only job. - Assert the exact before/after languages dispatched on language change. - Split the cancel-then-same-language test and drop incidental asserts so each test checks one behavior. - Use @src/testUtils render/userEvent/initializeMocks in FileInput tests. - Note that the 275px menu height matches the Files & Videos picker. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…l stylesheet Reuse the existing VideoSettingsModal/index.scss instead of a dedicated LanguageSelector.scss file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Author
|
Superseded by openedx#3331. |
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.
Summary
Fixes two problems in the video editor's Transcripts section: the language dropdown scrolled the whole page, and an unset transcript stopped accepting uploads once the author cancelled the file picker.
The dropdown scrolls inside itself, using the same height as the Files & Videos language picker:
Choosing a language now checks the saved language to decide between "upload" and "change language", instead of local UI state that changes even when the upload is cancelled:
Before the fix, after a cancel, the next choice took the "change language" path. It fetched a transcript that didn't exist, failed quietly, and the picker never reopened.
The shared
FileInputalso clears its value after each selection, so picking the same.srtagain after a failed upload starts a new upload.Evidence
Before:
After:
Before:
LanguageSelectortest failed (picker opened 1 time, expected 2)After: passes
Before:
FileInputtest failed (input value stayedC:\fakepath\captions.srt)After: passes; the value is
''after an upload, and picking the same file again callsonAddFileagainRegression guard: changing the language of an uploaded transcript still dispatches
updateTranscriptLanguage({ newLanguageCode, languageBeforeChange })with the right languages.npm test -- src/editorsandnpm run typespass. Lint passes on the touched files. The repo-widenpm run lintalready reportsno-floating-promiseserrors onmaster, all indata/apiHooks.tsfiles this PR doesn't touch.Merge Danger
Door: two-way
No data, API or Redux changes. Reverting the PR restores the old behavior.
Blast Radius: small
FileInputalso affects the transcript "Replace" action (TranscriptActionMenu): replacing a transcript with the same file twice now works. Handout, Thumbnail and image uploads renderFileInputbut use their own hooks, so they're unaffected.LanguageSelector.jsxandFileInput/index.jsxare still legacy.jsxwithpropTypes. Converting them is left for a follow-up.Role affected: Course Author
🤖 Generated with Claude Code