Skip to content

fix(captions): position presets you can click, sliders that reach the true edge - #471

Merged
EtienneLescot merged 5 commits into
mainfrom
claude/subtitles-presets-positioning-12ce2c
Aug 22, 2026
Merged

fix(captions): position presets you can click, sliders that reach the true edge#471
EtienneLescot merged 5 commits into
mainfrom
claude/subtitles-presets-positioning-12ce2c

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Aug 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Caption placement gets legible presets: Top/Middle/Bottom (existing) plus a new Left/Center/Right band-position row, alongside the existing free-position sliders — no more starting from a bare "offset" number.
  • A preset lights up only while its axis' offset is exactly that preset's value; dragging a slider clears the highlight, clicking a preset snaps the slider back. No new stored field — it's derived from the existing offsetX/offsetY, so old projects open unchanged.
  • The new Left/Center/Right row is band position, kept visually distinct (icon buttons + its own section) from the existing, unchanged Left/Center/Right text-align row, which now also gets a "Text align" label separating it from "Position" (previously unlabeled, silently grouped together).
  • offsetX/offsetY already reached the true frame edge ([Bug]: captions are placed relative to the footage rect, not the frame — and can't be nudged to the edges #396); this changes how presets and sliders talk to each other, not the reachable range.
  • All 13 locales updated in the same commit (new positionLeft/Center/Right + textAlign keys, "offset" → "position" wording) so a cherry-pick can't ship the new UI in English-only.
  • Second commit is docs-only (a stale line-anchor + a short description of the new derivation) — kept separate since the release branch's cherry-pick lane is fix-only.

Targets main; per request this is meant to be cherry-picked onto release/v1.10.0 afterward as a self-contained fix.

Test plan

  • npx vitest --run src/lib/ai-edition/captions src/components/ai-edition/CaptionsPane.placement.test.tsx — 55 passed, including new preset-derivation and preset/slider-interaction tests
  • npm run test (full suite) — 181 files / 2160 tests passed
  • npm run i18n:check and the localeParity vitest suite — all 13 locales pass
  • npx tsc --noEmit and npx tsc -p tsconfig.test.json --noEmit — clean
  • npm run lint — clean
  • npm run docs:check — clean
  • Manually verified in a live browser (seeded a project via the dev store, since ?windowType=editor needs one): clicking Top/Middle/Bottom and the new Position left/center/right icons sets the store's offsetX/offsetY to the exact expected value and highlights the right button; dragging either slider clears every preset in that row; the new row disables exactly when the band is full-width, matching the existing horizontal slider

🤖 Generated with Claude Code

… true edge

The offset sliders shipped in #396 let a caption band reach every position but
gave users no legible way to say "put it at the top" short of finding the right
number. Presets (top/middle/bottom, and a new left/center/right band position)
are now the everyday path; a preset button is highlighted only while its axis'
offset is exactly the value that preset would set — so dragging a slider away
silently clears the highlight, and clicking a preset snaps the slider back to
a clean value, with no separate "active preset" state to keep in sync.

The new left/center/right row is band position, not text alignment — kept
visually distinct from the existing (unchanged) text-align row with its own
section label and icon buttons, since the two would otherwise read as the same
control. offsetX/offsetY already reached the true frame edge (that was #396);
this only changes how presets and sliders talk to each other.
…d anchor

settings.ts:217,262 was already stale before this change; the new preset
helpers land right above getCaptionSettings/patchCaptionSettings and shift it
further, to :279,324. Kept separate from the fix commit: docs-only changes
aren't part of what the release branch's cherry-pick lane accepts.
@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@EtienneLescot, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 33 minutes

Limit details: You’ve used all 4 included reviews currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

Wait for the limit to reset, then comment @coderabbitai review or push new commits to the PR.

An organization admin can change what happens after included review limits in Billing.

How do review limits work?

CodeRabbit enforces per-developer PR review limits within each organization.

For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d9237980-bbc0-4096-8a09-b3fc01c5ef80

📥 Commits

Reviewing files that changed from the base of the PR and between ee62822 and fce7b88.

📒 Files selected for processing (19)
  • src/components/ai-edition/CaptionsPane.placement.test.tsx
  • src/components/ai-edition/CaptionsPane.tsx
  • src/i18n/locales/ar/settings.json
  • src/i18n/locales/en/settings.json
  • src/i18n/locales/es/settings.json
  • src/i18n/locales/fr/settings.json
  • src/i18n/locales/it/settings.json
  • src/i18n/locales/ja-JP/settings.json
  • src/i18n/locales/ko-KR/settings.json
  • src/i18n/locales/pt-BR/settings.json
  • src/i18n/locales/ru/settings.json
  • src/i18n/locales/tr/settings.json
  • src/i18n/locales/vi/settings.json
  • src/i18n/locales/zh-CN/settings.json
  • src/i18n/locales/zh-TW/settings.json
  • src/lib/ai-edition/captions/captions.test.ts
  • src/lib/ai-edition/captions/index.ts
  • src/lib/ai-edition/captions/settings.ts
  • technical-documentation/architecture/transcription-and-captions.md

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ecked

activeHorizontalPositionPreset checked "is this centered?" before "is this
flush left/right?" — fine normally, but as width approaches 100 the whole
reachable range shrinks toward 0 right along with it, so a band sitting
exactly at the true left/right edge could fall inside the center check's
epsilon too and get reported as centered. Comparing all three candidates and
keeping the nearest one is correct regardless of how narrow the range gets.

Found via code review (CodeRabbit hit its OSS rate limit on the PR, so this
ran as a subagent review instead). Reachable today only through a hand-edited
or externally-generated project file — legacyEditor.captions has no schema
validation — not through the shipped integer-stepped width slider.
@EtienneLescot

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 22, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@EtienneLescot
EtienneLescot merged commit a7536fd into main Aug 22, 2026
17 checks passed
EtienneLescot added a commit that referenced this pull request Aug 22, 2026
The anchor redesign's doc rewrite rode along with the guide-overlay commit,
which is add-then-revert within the PR and was therefore skipped here. This
carries the surviving half: the settings table, and the sections that described
the fixed band, the overhang and the preset machinery — none of which exists any
more.

Applied as one commit rather than cherry-picked because this branch's copy of the
file never received #471's docs commit (docs are excluded from the cherry-pick
lane), so its lineage differs from main's and the patch does not apply.
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