feat(subtitle): add shadow/outline adjustments, expand fonts selection, and fix YouTube API error handling#1660
feat(subtitle): add shadow/outline adjustments, expand fonts selection, and fix YouTube API error handling#1660Ckrvxr wants to merge 6 commits into
Conversation
|
Contributor trust score12/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: 386c81c7ff
ℹ️ 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".
| export const THEME_STORAGE_KEY = "theme" | ||
| export const DEFAULT_DETECTED_CODE = "eng" as const | ||
| export const CONFIG_SCHEMA_VERSION = 75 | ||
| export const CONFIG_SCHEMA_VERSION = 76 |
There was a problem hiding this comment.
Add the v75→v76 migration before bumping schema
When an installed user upgrades from schema 75, this bump makes initializeConfig call runMigration(76, ...), but repo-wide search of src/utils/config/migration-scripts shows the latest script is v074-to-v075.ts and there is no v075-to-v076.ts. runMigration therefore throws, the loop advances anyway, and the stricter subtitle schema rejects the old config because fontShadowIntensity and fontStrokeWidth are missing, causing the extension to fall back to DEFAULT_CONFIG and lose the user's settings; migrateConfig paths such as Google Drive sync/import will throw the missing-migration error directly.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 432e0d2983
ℹ️ 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".
| export const THEME_STORAGE_KEY = "theme" | ||
| export const DEFAULT_DETECTED_CODE = "eng" as const | ||
| export const CONFIG_SCHEMA_VERSION = 75 | ||
| export const CONFIG_SCHEMA_VERSION = 76 |
There was a problem hiding this comment.
Add v076 migration example data
When this schema bump is present, all-migrations.test.ts derives latestVersionStr from CONFIG_SCHEMA_VERSION and imports src/utils/config/__tests__/example/v076.ts, but repo-wide inspection of src/utils/config/__tests__/example shows the newest fixture is still v075.ts. As a result, the migration test suite fails before validating the new v75→v76 script; add a v076 fixture (with the new subtitle style fields) alongside the migration.
Useful? React with 👍 / 👎.
|
|
有些 shadow 如果是不明显的话,或许可以直接加上 shadow,但是不要暴露选项。就是尽量希望选项少一些,不要让用户看到吓人。具体由你来定啦 @taiiiyang 。 有一些如果不是所有人都需要的样式的话,可以后面做一个类似翻译样式的,用户可以直接用 CSS 来写,这样既满足了自定义,又不会让选项多的吓人(很多选项大部分人根本不会用到)。 |
|
收到建议,现在已经有数值膨胀的苗头了。。。之前用隔壁沉浸式翻译就有眼花缭乱的感觉。确实"傻瓜"一些会好好很多。 |
我觉得有一些样式好的话,可以直接默认加进去,比如这个 shadow。然后之后 PR 在做自定义 css。具体怎么判断,可能要 @taiiiyang 来看看 PR。 |


PR Title
Sorry about the previous mess—I wasn't familiar with the workflow and ended up pushing a huge bunch of unrelated changes. It triggered the anti-spam/security policy by mistake, sorry for the trouble!
抱歉之前不熟悉流程,直接推送了一大坨过来,触发了风控,麻烦你们了。之前两个PR 忽略即可。
feat(subtitle): add shadow/outline adjustments, expand fonts selection, and fix YouTube API error handlingDescription
📝 Type of Changes
📖 Description
This PR introduces granular style controls for video subtitles, adds more localized font options, improves API stability for YouTube subtitles, and upgrades development dependencies.
Key Changes:
shadowIntensityandstrokeWidth) allowing users to fine-tune subtitle visibility.textShadowandWebkitTextStroketo render smooth text effects.v075-to-v076) to seamlessly port existing user settings without breaking changes.MiSans,IBM Plex, andTsukuARdGothic Stdacross multilingual options.YoutubeSubtitlesFetcherby validating empty responses text before parsing JSON, preventing unexpected crashes when YouTube returns an empty subtitle payload.cross-envintopackage.jsonscript hooks to ensure seamless environment variable injection across different OS environments (e.g., Windows).@ai-sdk/providerandreselectdependencies.🔗 Related Issue
None, Personaly Feature.
🧪 How Has This Been Tested?
📋 Checklist
Fearture Preview