Skip to content

fix(editor): keep the camera preset labels inside their button - #614

Merged
EtienneLescot merged 1 commit into
mainfrom
fix/webcam-mode-label-overflow
Sep 5, 2026
Merged

fix(editor): keep the camera preset labels inside their button#614
EtienneLescot merged 1 commit into
mainfrom
fix/webcam-mode-label-overflow

Conversation

@EtienneLescot

@EtienneLescot EtienneLescot commented Sep 5, 2026

Copy link
Copy Markdown
Collaborator

Les libellés des presets caméra (forme et arrière-plan) débordaient de leur bouton et venaient coller le cadre vert de la cellule active.

Cause. .cursorCell a été dessiné pour la grille de curseurs : une cellule carrée, icône seule. Les deux rangées « forme de la webcam » et « arrière-plan de la caméra » la réutilisent avec un libellé sous l'icône. L'inspecteur fait 300 px, la rangée fait quatre pistes, donc 61 px par cellule et 43 px utiles. « Personnalisé » demande ~65 px en 11 px : il peint hors de sa bordure. minmax(0, 1fr) et minWidth: 0 empêchaient déjà le texte de pousser la piste, rien ne l'empêchait de sortir du bouton.

Correctif.

  • .cursorCell > span clippé en ellipsis, une fois, pour les deux rangées et toute cellule libellée à venir. Ce n'est pas un problème de traduction française : es « Personalizado », it « Personalizzato », ru « Пользовательский » débordent pareil, et en « Original » est pile à la limite.
  • Padding latéral 8 px → 4 px : 8 px de libellé récupérés, donc seuls les libellés vraiment trop longs atteignent l'ellipsis.
  • title sur le libellé pour lire la chaîne complète au survol quand elle est tronquée.

Vérification. Repro isolée à la largeur réelle de l'inspecteur (300 px, tokens du thème sombre) : avant, « Détouré » et « Personnalisé » sortent de leur cadre ; après, « Original / Détouré / Flouté » tiennent en entier et « Personnalisé » se tronque proprement. Les tests n'ont pas été lancés, node_modules de ce clone est incomplet (vitest absent) ; le changement est du CSS plus un attribut title, les requêtes getByText existantes restent valides.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Bug Fixes

    • Prevented long, localized labels from overflowing or crowding neighboring cells.
    • Improved handling of webcam shape and background mode controls so labels remain readable within their buttons.
  • Style

    • Adjusted button spacing for a more consistent layout.
    • Added hover text for webcam controls to clarify each option.

`.cursorCell` was drawn for the cursor grid: a square, icon-only cell. The
camera shape and camera background rows reuse it with a label under the icon,
and the label does not fit. The inspector is 300 px, the row is four tracks
wide, so each cell gets 61 px and 43 px of inner width. "Personnalisé" needs
about 65 px at 11 px, so it spilled over its own border and crowded the green
ring of the active cell next to it. `minmax(0, 1fr)` and `minWidth: 0` had
already stopped the text from pushing the grid track; nothing stopped it from
painting outside the button.

Not a French problem: es "Personalizado", it "Personalizzato" and ru
"Пользовательский" overflow the same way, and en "Original" sits right on the
limit. So the clip goes on `.cursorCell > span` once, where both rows and any
future labelled cell pick it up, rather than on a per-locale hope that the
strings stay short.

Side padding drops from 8 px to 4 px, which buys back 8 px of label room: only
the genuinely oversized labels reach the ellipsis now, and `title` carries the
full string for those.
@coderabbitai

coderabbitai Bot commented Sep 5, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Team

Run ID: 2ff1ddde-7c6d-4993-a2d1-37f3ca80851c

📥 Commits

Reviewing files that changed from the base of the PR and between 83c5bad and 944b876.

📒 Files selected for processing (2)
  • src/components/ai-edition/NewEditorShell.module.css
  • src/components/ai-edition/RightPanes.tsx

Included review availability: Your plan provides up to 8 included reviews per hour; 6 remain after this review.


📝 Walkthrough

Walkthrough

The editor now truncates long cursor-cell labels. Camera shape and background mode buttons use narrower horizontal padding and expose localized labels through title attributes.

Changes

Editor label layout

Layer / File(s) Summary
Label sizing and tooltip updates
src/components/ai-edition/NewEditorShell.module.css, src/components/ai-edition/RightPanes.tsx
Cursor-cell labels now hide overflow with ellipsis. Camera shape and background mode buttons use 8px 4px padding and localized title attributes.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to 944b8

Camera preset labels now remain within their controls, with full localized text available on hover. The change is limited to editor presentation behavior and has no identified merge-blocking risk.

Suggested reviewers: my-denia

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description explains the cause, fix, affected labels, visual verification, and test limitation, but it does not follow the required template and omits the related issue, change type, release impac… Use the required section headings. Add the related issue entry, select the applicable change type, release impact, and desktop impact, and include screenshots or video for this visual change. Keep the existing testing details under the Test…
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 … Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: preventing camera preset labels from overflowing their buttons.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check

Explanation

The description explains the cause, fix, affected labels, visual verification, and test limitation, but it does not follow the required template and omits the related issue, change type, release impact, desktop impact, and screenshots or video sections.

Resolution

Use the required section headings. Add the related issue entry, select the applicable change type, release impact, and desktop impact, and include screenshots or video for this visual change. Keep the existing testing details under the Testing section.

Full details: Docstring Coverage

Explanation

Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/webcam-mode-label-overflow

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.

@EtienneLescot
EtienneLescot merged commit 5bd7fba into main Sep 5, 2026
18 checks passed
@EtienneLescot
EtienneLescot deleted the fix/webcam-mode-label-overflow branch September 5, 2026 08:13
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