Support blur subtitle with interaction - #1558
Conversation
|
Contributor trust score14/100 — New contributor This score estimates contributor familiarity with Outcome
Score breakdown
Signals used
Policy
Updated automatically when the PR changes or when a maintainer reruns the workflow. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3d0dcb5d2a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| const subtitle = useAtomValue(currentSubtitleAtom) | ||
| const { style } = useAtomValue(configFieldsAtomMap.videoSubtitles) | ||
| const { displayMode, translationPosition, container } = style | ||
| const { blurMain, blurTranslation } = computeSubtitleBlurState(subtitleBlurModeSchema.enum.blurAll, useBlurKey()) |
There was a problem hiding this comment.
Respect configured subtitle blur mode
SubtitlesContent computes blur state with subtitleBlurModeSchema.enum.blurAll unconditionally, so the new videoSubtitles.blurMode config (including the default blurOnlyTranslation) is never applied at runtime. This makes persisted/user-selected blur behavior impossible and forces all users into blur-all cycling logic regardless of config.
Useful? React with 👍 / 👎.
| } | ||
|
|
||
| function handler(e: KeyboardEvent) { | ||
| if (e.key !== "e" || ["INPUT", "TEXTAREA"].includes((e.target as HTMLElement).tagName)) { |
There was a problem hiding this comment.
Avoid hijacking key presses in contenteditable fields
The keydown filter only exempts INPUT and TEXTAREA, so when focus is in rich-text editors (contenteditable elements), pressing e still triggers blur toggling and preventDefault(). In pages like comment/chat editors this blocks typing the letter e while subtitles are active.
Useful? React with 👍 / 👎.
|
This PR has been inactive for 14 days and is now marked as stale. |
|
等待 @taiiiyang 和 @oskkas 一起完成 #1448 所以这个 PR 我就先关了 |
Type of Changes
Description
Draft PR for the blur subtitle interaction. Use to demonstrate for the #1448
Related Issue
#1554
How Has This Been Tested?
Screenshots
Checklist
Additional Information