Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(rec): hide the auto-zoom row under the system cursor

EtienneLescotac8e623fbc6a
diff --git a/src/components/ai-edition/v4/EditorShellV4.module.css b/src/components/ai-edition/v4/EditorShellV4.module.css
index dd7898777..dc37056a1 100644
--- a/src/components/ai-edition/v4/EditorShellV4.module.css
+++ b/src/components/ai-edition/v4/EditorShellV4.module.css
@@ -956,19 +956,6 @@
dropdown can't push the On/Off toggle off the panel edge (issue #624). */
min-width: 0;
}
-/* A row that has to explain itself wraps its reason onto a second line. Only the
- auto-zoom row does this today, and only while the system cursor is selected. */
-.recRowWithHint {
- flex-wrap: wrap;
- row-gap: 6px;
-}
-.recRowHint {
- flex-basis: 100%;
- margin: 0;
- color: var(--muted);
- font-size: 12px;
- line-height: 1.4;
-}
.recRowMuted {
display: inline-flex;
align-items: center;
diff --git a/src/components/ai-edition/v4/RecStage.test.tsx b/src/components/ai-edition/v4/RecStage.test.tsx
index 175bb0fa5..8844459e0 100644
--- a/src/components/ai-edition/v4/RecStage.test.tsx
+++ b/src/components/ai-edition/v4/RecStage.test.tsx
@@ -168,28 +168,26 @@ describe("RecStage controls", () => {
});
// The system cursor writes no telemetry sidecar, so there is no dwell to place a
- // zoom from. The row says Off and cannot be clicked rather than offering a choice
- // that would silently do nothing.
- it("reads off and stays inert while the system cursor is capturing", async () => {
- const { getRecordingPrefs, setRecordingPrefs } = stubRecordingPrefs({
+ // zoom from: the row is not offered at all, and the stored choice is left alone.
+ it("hides the auto-zoom row while the system cursor is capturing", async () => {
+ const { setRecordingPrefs } = stubRecordingPrefs({
micEnabled: false,
cursorCaptureMode: "system",
autoZoomEnabled: true,
});
renderRecStage();
- await waitFor(() => expect(getRecordingPrefs).toHaveBeenCalled());
-
- const button = screen.getByTestId("rec-auto-zoom-button");
- await waitFor(() => expect(button).toBeDisabled());
- expect(button).toHaveAttribute("aria-pressed", "false");
- // A disabled button takes no focus and shows no tooltip, so the reason is a line
- // in the row, tied to the button, rather than a title nobody on a keyboard reaches.
- const hint = screen.getByText("rec.autoZoomNeedsEditableCursor");
- expect(button).toHaveAttribute("aria-describedby", hint.id);
- await act(async () => {
- button.click();
- });
- expect(setRecordingPrefs).not.toHaveBeenCalled();
+ await waitFor(() => expect(screen.queryByTestId("rec-auto-zoom-button")).toBeNull());
+ expect(screen.queryByText("rec.autoZoom")).toBeNull();
+
+ const cursorLabel = screen.getByText("rec.cursorHighlight");
+ if (!cursorLabel.parentElement) throw new Error("cursor highlight row is missing");
+ fireEvent.click(within(cursorLabel.parentElement).getByRole("button", { name: "rec.off" }));
+ expect(await screen.findByTestId("rec-auto-zoom-button")).toHaveAttribute(
+ "aria-pressed",
+ "true",
+ );
+ expect(setRecordingPrefs).toHaveBeenCalledTimes(1);
+ expect(setRecordingPrefs).toHaveBeenCalledWith({ cursorCaptureMode: "editable-overlay" });
});
// The durable value is what the import path reads back, so a panel left showing Off
diff --git a/src/components/ai-edition/v4/RecStage.tsx b/src/components/ai-edition/v4/RecStage.tsx
index aa2b612d6..ba0ea0dbc 100644
--- a/src/components/ai-edition/v4/RecStage.tsx
+++ b/src/components/ai-edition/v4/RecStage.tsx
@@ -49,9 +49,6 @@ const DEFAULT_PREFS: RecordingPrefsState = {
autoZoomEnabled: true,
};
-/** Ties the disabled toggle to the line that explains why it is disabled. */
-const AUTO_ZOOM_HINT_ID = "rec-auto-zoom-hint";
-
function normalizedRecordingPrefs(prefs: Partial<RecordingPrefsState>): RecordingPrefsState {
return {
...DEFAULT_PREFS,
@@ -242,7 +239,6 @@ export function RecStage({
const visibleSources = sourceTab === "screen" ? screenSources : windowSources;
const cursorHighlight = prefs.cursorCaptureMode === "editable-overlay";
- const autoZoom = prefs.autoZoomEnabled && cursorHighlight;
// macOS leaves the icons out of the capture; Windows covers them for the take. Linux
// records through the portal, which offers neither, so the row would do nothing there.
const platform = getPlatform();
@@ -476,35 +472,25 @@ export function RecStage({
</button>
</div>
- {/* Auto-zoom rides on the cursor telemetry the editable-overlay mode writes,
- so the system cursor leaves nothing to place zooms from — the row reads
- Off and is inert there rather than promising a choice that cannot apply.
- Why it is inert is a second line in the row, not a title on the button:
- a disabled button takes no focus and shows no tooltip to a keyboard or
- screen-reader user, so a title would be the one explanation they cannot
- reach. */}
- <div className={`${styles.recRow}${cursorHighlight ? "" : ` ${styles.recRowWithHint}`}`}>
- <div className={styles.recRowLabel}>
- <ZoomIn size={15} />
- {t("rec.autoZoom")}
+ {/* Auto-zoom places zooms from the cursor telemetry the editable-overlay mode
+ writes. The system cursor writes none, so the row is not offered there. */}
+ {cursorHighlight ? (
+ <div className={styles.recRow}>
+ <div className={styles.recRowLabel}>
+ <ZoomIn size={15} />
+ {t("rec.autoZoom")}
+ </div>
+ <button
+ type="button"
+ data-testid="rec-auto-zoom-button"
+ className={`${styles.recToggleBtn}${prefs.autoZoomEnabled ? ` ${styles.on}` : ""}`}
+ aria-pressed={prefs.autoZoomEnabled}
+ onClick={() => updatePrefs({ autoZoomEnabled: !prefs.autoZoomEnabled })}
+ >
+ {prefs.autoZoomEnabled ? t("rec.on") : t("rec.off")}
+ </button>
</div>
- <button
- type="button"
- data-testid="rec-auto-zoom-button"
- className={`${styles.recToggleBtn}${autoZoom ? ` ${styles.on}` : ""}`}
- aria-pressed={autoZoom}
- disabled={!cursorHighlight}
- aria-describedby={cursorHighlight ? undefined : AUTO_ZOOM_HINT_ID}
- onClick={() => updatePrefs({ autoZoomEnabled: !prefs.autoZoomEnabled })}
- >
- {autoZoom ? t("rec.on") : t("rec.off")}
- </button>
- {cursorHighlight ? null : (
- <p id={AUTO_ZOOM_HINT_ID} className={styles.recRowHint}>
- {t("rec.autoZoomNeedsEditableCursor")}
- </p>
- )}
- </div>
+ ) : null}
{desktopIconsHint ? (
<div className={styles.recRow}>
diff --git a/src/i18n/locales/ar/editor.json b/src/i18n/locales/ar/editor.json
index 9070edb26..26794c5fe 100644
--- a/src/i18n/locales/ar/editor.json
+++ b/src/i18n/locales/ar/editor.json
@@ -113,7 +113,6 @@
"camera": "الكاميرا",
"cursorHighlight": "إبراز المؤشر",
"autoZoom": "تكبير تلقائي بعد التسجيل",
- "autoZoomNeedsEditableCursor": "التكبير التلقائي يحتاج إلى المؤشر القابل للتحرير. بدّل وضع المؤشر للتفعيل.",
"hideDesktopIcons": "إخفاء أيقونات سطح المكتب",
"hideDesktopIconsHintMac": "يستبعد أيقونات سطح المكتب من تسجيلات الشاشة. تبقى على سطح المكتب لديك.",
"hideDesktopIconsHintWindows": "يغطي أيقونات سطح المكتب بخلفية الشاشة أثناء تسجيل الشاشة. تعود عند انتهاء التسجيل.",
diff --git a/src/i18n/locales/cs/editor.json b/src/i18n/locales/cs/editor.json
index 09042c5ad..2395728cf 100644
--- a/src/i18n/locales/cs/editor.json
+++ b/src/i18n/locales/cs/editor.json
@@ -113,7 +113,6 @@
"camera": "Kamera",
"cursorHighlight": "Zvýraznění kurzoru",
"autoZoom": "Automatické přiblížení po nahrávání",
- "autoZoomNeedsEditableCursor": "Automatické přiblížení vyžaduje editovatelný kurzor. Přepněte režim kurzoru.",
"hideDesktopIcons": "Skrýt ikony na ploše",
"hideDesktopIconsHintMac": "Vynechá ikony na ploše ze záznamů obrazovky. Na ploše vám zůstanou.",
"hideDesktopIconsHintWindows": "Během nahrávání obrazovky zakryje ikony na ploše tapetou. Po skončení nahrávání se vrátí.",
diff --git a/src/i18n/locales/de/editor.json b/src/i18n/locales/de/editor.json
index aab7776c8..87f566c5c 100644
--- a/src/i18n/locales/de/editor.json
+++ b/src/i18n/locales/de/editor.json
@@ -113,7 +113,6 @@
"camera": "Kamera",
"cursorHighlight": "Cursor hervorheben",
"autoZoom": "Auto-Zoom nach der Aufnahme",
- "autoZoomNeedsEditableCursor": "Auto-Zoom benötigt den bearbeitbaren Cursor. Wechseln Sie den Cursor-Modus.",
"hideDesktopIcons": "Schreibtischsymbole ausblenden",
"hideDesktopIconsHintMac": "Lässt die Schreibtischsymbole in Bildschirmaufnahmen weg. Auf deinem Schreibtisch bleiben sie.",
"hideDesktopIconsHintWindows": "Deckt die Desktopsymbole während einer Bildschirmaufnahme mit deinem Hintergrundbild ab. Nach der Aufnahme sind sie wieder da.",
diff --git a/src/i18n/locales/en/editor.json b/src/i18n/locales/en/editor.json
index 7b4b5975e..efb05622f 100644
--- a/src/i18n/locales/en/editor.json
+++ b/src/i18n/locales/en/editor.json
@@ -113,7 +113,6 @@
"camera": "Camera",
"cursorHighlight": "Cursor highlight",
"autoZoom": "Auto-zoom after recording",
- "autoZoomNeedsEditableCursor": "Auto-zoom needs the editable cursor. Switch cursor mode to enable.",
"hideDesktopIcons": "Hide desktop icons",
"hideDesktopIconsHintMac": "Leaves the desktop icons out of screen recordings. They stay on your desktop.",
"hideDesktopIconsHintWindows": "Covers the desktop icons with your wallpaper while a screen is recording. They come back when recording stops.",
diff --git a/src/i18n/locales/es/editor.json b/src/i18n/locales/es/editor.json
index ed23ee66c..6189814bd 100644
--- a/src/i18n/locales/es/editor.json
+++ b/src/i18n/locales/es/editor.json
@@ -113,7 +113,6 @@
"camera": "Cámara",
"cursorHighlight": "Resaltar cursor",
"autoZoom": "Zoom automático tras grabar",
- "autoZoomNeedsEditableCursor": "El zoom automático necesita el cursor editable. Cambia el modo del cursor para activarlo.",
"hideDesktopIcons": "Ocultar iconos del escritorio",
"hideDesktopIconsHintMac": "Deja fuera los iconos del escritorio en las grabaciones de pantalla. Siguen en tu escritorio.",
"hideDesktopIconsHintWindows": "Cubre los iconos del escritorio con tu fondo de pantalla mientras se graba una pantalla. Vuelven al terminar la grabación.",
diff --git a/src/i18n/locales/fr/editor.json b/src/i18n/locales/fr/editor.json
index d94e40668..599971a2b 100644
--- a/src/i18n/locales/fr/editor.json
+++ b/src/i18n/locales/fr/editor.json
@@ -113,7 +113,6 @@
"camera": "Caméra",
"cursorHighlight": "Curseur en surbrillance",
"autoZoom": "Zoom automatique après l'enregistrement",
- "autoZoomNeedsEditableCursor": "Le zoom automatique nécessite le curseur modifiable. Changez le mode du curseur pour l'activer.",
"hideDesktopIcons": "Masquer les icônes du bureau",
"hideDesktopIconsHintMac": "Retire les icônes du bureau des enregistrements d'écran. Elles restent sur votre bureau.",
"hideDesktopIconsHintWindows": "Recouvre les icônes du bureau avec votre fond d'écran pendant l'enregistrement d'un écran. Elles reviennent à la fin de l'enregistrement.",
diff --git a/src/i18n/locales/it/editor.json b/src/i18n/locales/it/editor.json
index 5522af666..13a8c76e1 100644
--- a/src/i18n/locales/it/editor.json
+++ b/src/i18n/locales/it/editor.json
@@ -113,7 +113,6 @@
"camera": "Fotocamera",
"cursorHighlight": "Evidenzia cursore",
"autoZoom": "Zoom automatico dopo la registrazione",
- "autoZoomNeedsEditableCursor": "Lo zoom automatico richiede il cursore modificabile. Cambia la modalità del cursore per attivarlo.",
"hideDesktopIcons": "Nascondi icone della scrivania",
"hideDesktopIconsHintMac": "Esclude le icone della scrivania dalle registrazioni dello schermo. Restano sulla tua scrivania.",
"hideDesktopIconsHintWindows": "Copre le icone del desktop con lo sfondo durante la registrazione di uno schermo. Tornano al termine della registrazione.",
diff --git a/src/i18n/locales/ja-JP/editor.json b/src/i18n/locales/ja-JP/editor.json
index a12ffb118..f8bcbb8b6 100644
--- a/src/i18n/locales/ja-JP/editor.json
+++ b/src/i18n/locales/ja-JP/editor.json
@@ -113,7 +113,6 @@
"camera": "カメラ",
"cursorHighlight": "カーソルの強調表示",
"autoZoom": "録画後に自動ズーム",
- "autoZoomNeedsEditableCursor": "自動ズームには編集可能なカーソルが必要です。カーソルモードを切り替えてください。",
"hideDesktopIcons": "デスクトップアイコンを隠す",
"hideDesktopIconsHintMac": "画面収録からデスクトップアイコンを除外します。デスクトップ上には残ります。",
"hideDesktopIconsHintWindows": "画面の収録中、デスクトップアイコンを壁紙で覆います。収録を止めると元に戻ります。",
diff --git a/src/i18n/locales/ko-KR/editor.json b/src/i18n/locales/ko-KR/editor.json
index 1e3fcd563..1bd3e8029 100644
--- a/src/i18n/locales/ko-KR/editor.json
+++ b/src/i18n/locales/ko-KR/editor.json
@@ -113,7 +113,6 @@
"camera": "카메라",
"cursorHighlight": "커서 강조",
"autoZoom": "녹화 후 자동 확대",
- "autoZoomNeedsEditableCursor": "자동 확대는 편집 가능한 커서가 필요합니다. 커서 모드를 전환하세요.",
"hideDesktopIcons": "바탕화면 아이콘 숨기기",
"hideDesktopIconsHintMac": "화면 녹화에서 바탕화면 아이콘을 제외합니다. 바탕화면에는 그대로 남아 있습니다.",
"hideDesktopIconsHintWindows": "화면을 녹화하는 동안 바탕화면 아이콘을 배경 화면으로 가립니다. 녹화를 멈추면 다시 나타납니다.",
diff --git a/src/i18n/locales/pt-BR/editor.json b/src/i18n/locales/pt-BR/editor.json
index c9af942d2..35cd9df27 100644
--- a/src/i18n/locales/pt-BR/editor.json
+++ b/src/i18n/locales/pt-BR/editor.json
@@ -113,7 +113,6 @@
"camera": "Câmera",
"cursorHighlight": "Destaque do cursor",
"autoZoom": "Zoom automático após a gravação",
- "autoZoomNeedsEditableCursor": "O zoom automático precisa do cursor editável. Alterne o modo do cursor para ativar.",
"hideDesktopIcons": "Ocultar ícones da área de trabalho",
"hideDesktopIconsHintMac": "Deixa os ícones da área de trabalho fora das gravações de tela. Eles continuam na sua área de trabalho.",
"hideDesktopIconsHintWindows": "Cobre os ícones da área de trabalho com o seu papel de parede enquanto uma tela é gravada. Eles voltam quando a gravação termina.",
diff --git a/src/i18n/locales/ru/editor.json b/src/i18n/locales/ru/editor.json
index 7766804df..50e37fe18 100644
--- a/src/i18n/locales/ru/editor.json
+++ b/src/i18n/locales/ru/editor.json
@@ -113,7 +113,6 @@
"camera": "Камера",
"cursorHighlight": "Подсветка курсора",
"autoZoom": "Автомасштабирование после записи",
- "autoZoomNeedsEditableCursor": "Автомасштабирование требует редактируемый курсор. Переключите режим курсора.",
"hideDesktopIcons": "Скрыть значки рабочего стола",
"hideDesktopIconsHintMac": "Убирает значки рабочего стола из записи экрана. На рабочем столе они остаются.",
"hideDesktopIconsHintWindows": "Закрывает значки рабочего стола обоями, пока идёт запись экрана. После записи они вернутся.",
diff --git a/src/i18n/locales/tr/editor.json b/src/i18n/locales/tr/editor.json
index 7814d8b29..4c4ddf7f4 100644
--- a/src/i18n/locales/tr/editor.json
+++ b/src/i18n/locales/tr/editor.json
@@ -113,7 +113,6 @@
"camera": "Kamera",
"cursorHighlight": "İmleç vurgusu",
"autoZoom": "Kayıttan sonra otomatik yakınlaştırma",
- "autoZoomNeedsEditableCursor": "Otomatik yakınlaştırma düzenlenebilir imleç ister. Etkinleştirmek için imleç modunu değiştirin.",
"hideDesktopIcons": "Masaüstü simgelerini gizle",
"hideDesktopIconsHintMac": "Masaüstü simgelerini ekran kayıtlarının dışında bırakır. Masaüstünüzde kalırlar.",
"hideDesktopIconsHintWindows": "Bir ekran kaydedilirken masaüstü simgelerini duvar kağıdınızla örter. Kayıt bitince geri gelirler.",
diff --git a/src/i18n/locales/vi/editor.json b/src/i18n/locales/vi/editor.json
index 2c009f6fe..9d952a874 100644
--- a/src/i18n/locales/vi/editor.json
+++ b/src/i18n/locales/vi/editor.json
@@ -113,7 +113,6 @@
"camera": "Máy ảnh",
"cursorHighlight": "Làm nổi bật con trỏ",
"autoZoom": "Tự động phóng to sau khi ghi",
- "autoZoomNeedsEditableCursor": "Tự động phóng to cần con trỏ chỉnh sửa được. Hãy đổi chế độ con trỏ.",
"hideDesktopIcons": "Ẩn biểu tượng màn hình nền",
"hideDesktopIconsHintMac": "Loại các biểu tượng màn hình nền khỏi bản ghi màn hình. Chúng vẫn ở trên màn hình nền của bạn.",
"hideDesktopIconsHintWindows": "Che các biểu tượng màn hình nền bằng hình nền trong khi ghi màn hình. Chúng sẽ trở lại khi dừng ghi.",
diff --git a/src/i18n/locales/zh-CN/editor.json b/src/i18n/locales/zh-CN/editor.json
index 50fd04222..b4a877346 100644
--- a/src/i18n/locales/zh-CN/editor.json
+++ b/src/i18n/locales/zh-CN/editor.json
@@ -113,7 +113,6 @@
"camera": "摄像头",
"cursorHighlight": "光标高亮",
"autoZoom": "录制后自动缩放",
- "autoZoomNeedsEditableCursor": "自动缩放需要可编辑光标。请先切换光标模式。",
"hideDesktopIcons": "隐藏桌面图标",
"hideDesktopIconsHintMac": "在屏幕录制中去掉桌面图标。它们仍保留在你的桌面上。",
"hideDesktopIconsHintWindows": "录制屏幕时用壁纸遮住桌面图标。停止录制后会恢复。",
diff --git a/src/i18n/locales/zh-TW/editor.json b/src/i18n/locales/zh-TW/editor.json
index fd66cb4fb..9ddf71a9c 100644
--- a/src/i18n/locales/zh-TW/editor.json
+++ b/src/i18n/locales/zh-TW/editor.json
@@ -113,7 +113,6 @@
"camera": "攝影機",
"cursorHighlight": "游標醒目提示",
"autoZoom": "錄製後自動縮放",
- "autoZoomNeedsEditableCursor": "自動縮放需要可編輯游標。請先切換游標模式。",
"hideDesktopIcons": "隱藏桌面圖示",
"hideDesktopIconsHintMac": "在螢幕錄製中略去桌面圖示。它們仍會留在你的桌面上。",
"hideDesktopIconsHintWindows": "錄製螢幕時以桌布遮住桌面圖示。停止錄製後就會恢復。",