Skip to content

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

feat(editor): merge the background facet into video effects

Etienne Lescot348be6f20cc3
diff --git a/scripts/check-docs.mjs b/scripts/check-docs.mjs
index fc798edb2..65119765e 100644
--- a/scripts/check-docs.mjs
+++ b/scripts/check-docs.mjs
@@ -26,6 +26,7 @@ const LEGACY = [
"Bottombar",
"Titlebar",
"TranscriptEditor",
+ "BackgroundPane",
"ai-edition-roadmap",
"ai-edition-collision-analysis",
"openscreen-inventory",
diff --git a/src/components/ai-edition/NewEditorShell.module.css b/src/components/ai-edition/NewEditorShell.module.css
index 833dda366..4afd78cc3 100644
--- a/src/components/ai-edition/NewEditorShell.module.css
+++ b/src/components/ai-edition/NewEditorShell.module.css
@@ -1050,6 +1050,50 @@
box-shadow: 0 0 0 2px color-mix(in oklab, var(--brand), transparent 70%);
}
+/* ─── background picker (collapsed trigger + floating panel) ───── */
+/* The trigger paints the CURRENT background as its own surface, so the pane shows what is
+ selected without spending the ~300px the inline swatch grid used to cost. */
+.bgTrigger {
+ display: flex;
+ align-items: flex-end;
+ justify-content: flex-end;
+ height: 52px;
+ margin: 0 var(--sp-4) 12px;
+ padding: 6px;
+ border: 1px solid var(--border);
+ border-radius: 10px;
+ background: var(--surface-2);
+ cursor: pointer;
+ overflow: hidden;
+ transition: border-color 150ms ease;
+}
+.bgTrigger:hover { border-color: var(--brand); }
+/* Sits ON an arbitrary photo, so it carries its own ground rather than trusting contrast. */
+.bgTriggerChip {
+ display: inline-flex;
+ align-items: center;
+ gap: 4px;
+ padding: 3px 7px;
+ border-radius: 999px;
+ background: color-mix(in oklab, var(--bg), transparent 10%);
+ color: var(--fg);
+ font: 500 var(--fs-app-sm)/1 var(--font-body);
+}
+.bgPopover {
+ width: 300px;
+ padding-top: 4px;
+ border: 1px solid var(--border);
+ border-radius: 12px;
+ background: var(--surface-1);
+ box-shadow: var(--elev-pop);
+ /* Tall content (18 swatches, or the gradient editor) scrolls itself instead of running
+ off-screen on a short window. */
+ max-height: min(70vh, 460px);
+ overflow-y: auto;
+ scrollbar-width: thin;
+ scrollbar-color: var(--border) transparent;
+}
+
/* ─── toggle (switch) ──────────────────────────────────────────── */
.toggle {
width: 36px;
diff --git a/src/components/ai-edition/RightPanes.i18n.test.tsx b/src/components/ai-edition/RightPanes.i18n.test.tsx
index 36cfd8c80..51441b255 100644
--- a/src/components/ai-edition/RightPanes.i18n.test.tsx
+++ b/src/components/ai-edition/RightPanes.i18n.test.tsx
@@ -6,12 +6,12 @@
// localized text is what actually reaches the DOM.
import "@testing-library/jest-dom";
-import { cleanup, render, screen } from "@testing-library/react";
+import { cleanup, fireEvent, render, screen } from "@testing-library/react";
import type { ReactElement } from "react";
import { afterEach, beforeEach, describe, expect, it } from "vitest";
import { I18nProvider } from "@/contexts/I18nContext";
import { LOCALE_STORAGE_KEY } from "@/i18n/config";
-import { BackgroundPane, CursorPane, LayoutPane, VideoEffectsPane } from "./RightPanes";
+import { CursorPane, LayoutPane, VideoEffectsPane } from "./RightPanes";
function renderIn(locale: string, ui: ReactElement) {
localStorage.setItem(LOCALE_STORAGE_KEY, locale);
@@ -28,10 +28,21 @@ afterEach(() => {
});
describe("right-rail panes are localized", () => {
- it("renders the background pane in French", () => {
- renderIn("fr", <BackgroundPane />);
- expect(screen.getByRole("heading", { name: "Arrière-plan" })).toBeInTheDocument();
+ it("renders the background section of the effects pane in French", () => {
+ // Background stopped being its own pane when the two facets merged; it is a section
+ // of the effects pane now, so the same strings must survive under the new heading.
+ renderIn("fr", <VideoEffectsPane />);
+ expect(screen.getByRole("heading", { name: "Effets vidéo" })).toBeInTheDocument();
+ expect(screen.getByText("Arrière-plan")).toBeInTheDocument();
expect(screen.getByRole("button", { name: "Aide" })).toBeInTheDocument();
+ });
+
+ it("renders the floating background picker in French once it is opened", () => {
+ // The picker collapsed into a popover so the frame sliders stay above the fold, so
+ // its strings are only in the DOM after the trigger is clicked — the assertion has
+ // to open it, or it would pass on an empty document forever.
+ renderIn("fr", <VideoEffectsPane />);
+ fireEvent.click(screen.getByRole("button", { name: "Arrière-plan" }));
expect(screen.getByRole("button", { name: "Téléverser une image" })).toBeInTheDocument();
// wallpaper swatches interpolate their index through the catalog
expect(screen.getByRole("button", { name: "Fond 1" })).toBeInTheDocument();
@@ -42,6 +53,9 @@ describe("right-rail panes are localized", () => {
expect(screen.getByRole("heading", { name: "Efectos de video" })).toBeInTheDocument();
expect(screen.getByText("Desenfoque de movimiento")).toBeInTheDocument();
expect(screen.getByText("Sombra")).toBeInTheDocument();
+ // the merged pane's own section headers
+ expect(screen.getByText("Marco")).toBeInTheDocument();
+ expect(screen.getByText("Movimiento")).toBeInTheDocument();
});
it("renders the layout pane in Japanese", () => {
diff --git a/src/components/ai-edition/RightPanes.tsx b/src/components/ai-edition/RightPanes.tsx
index 554a77a7e..988ad0e18 100644
--- a/src/components/ai-edition/RightPanes.tsx
+++ b/src/components/ai-edition/RightPanes.tsx
@@ -7,17 +7,18 @@
import {
AudioLines,
+ ChevronDown,
FileText,
HelpCircle,
Layout as LayoutIcon,
Loader2,
MousePointerClick,
- Palette,
Sliders,
Trash2,
} from "lucide-react";
import {
type ChangeEvent,
+ type CSSProperties,
type FormEvent,
memo,
type ClipboardEvent as ReactClipboardEvent,
@@ -34,6 +35,7 @@ import {
import { toast } from "sonner";
import defaultCursorPreviewUrl from "@/assets/cursors/Cursor=Default.svg";
import GradientEditor, { type GradientEditorState } from "@/components/ui/gradient-editor";
+import { Popover, PopoverContent, PopoverTrigger } from "@/components/ui/popover";
import { useScopedT } from "@/contexts/I18nContext";
import type {
AxcutAsset,
@@ -62,7 +64,12 @@ import { resolveWebcamLayoutPreset, supportsWebcamReactiveZoom } from "@/lib/com
import { supportsCursorClickEffects } from "@/lib/cursor/cursorCapabilities";
import { CURSOR_THEMES, DEFAULT_CURSOR_THEME_ID } from "@/lib/cursor/cursorThemes";
import { buildGradientFromEditor } from "@/lib/gradientBuilder";
-import { resolveImageWallpaperUrl, WALLPAPER_PATHS, WALLPAPER_THUMB_PATHS } from "@/lib/wallpaper";
+import {
+ classifyWallpaper,
+ resolveImageWallpaperUrl,
+ WALLPAPER_PATHS,
+ WALLPAPER_THUMB_PATHS,
+} from "@/lib/wallpaper";
import { isNativeCompositorActive, setNativeParam } from "@/native";
import styles from "./NewEditorShell.module.css";
@@ -123,7 +130,7 @@ function Pane({ title, icon, helpText, children }: PaneProps) {
);
}
-// ─── Background ────────────────────────────────────────────────────
+// ─── Background (section of the Effects pane) ──────────────────────
// keep the gradient palette small and curated — every block renders
// in the picker and gets serialized to legacyEditor on save.
@@ -201,10 +208,15 @@ export function isSupportedBackgroundImage(type: string, fileName: string): bool
// in the v2 editor: gradient strings stay as-is, colors as `#hex`, and image
// paths are restricted to `/wallpapers/...` or the user's own data: URLs from
// the upload custom flow.
-export function BackgroundPane() {
+function BackgroundSection() {
const ts = useScopedT("settings");
const { settings, set, setLive, commit, hasDocument } = useEditorSettings();
- const [tab, setTab] = useState<"image" | "color" | "gradient">("image");
+ const [pickerOpen, setPickerOpen] = useState(false);
+ // Seeded from what the project is actually using, so the picker opens on the tab the
+ // user is already in rather than always on Image.
+ const [tab, setTab] = useState<"image" | "color" | "gradient">(
+ () => classifyWallpaper(settings.wallpaper).kind,
+ );
const fileInputRef = useRef<HTMLInputElement | null>(null);
const customUrls = useMemoCustomWallpapers(settings.wallpaper);
@@ -267,109 +279,177 @@ export function BackgroundPane() {
};
return (
- <Pane
- title={ts("background.title")}
- icon={<Palette size={14} />}
- helpText={ts("background.help")}
- >
- <div className={styles.paneTabs} role="tablist">
- <button
- type="button"
- className={tab === "image" ? styles.isActive : ""}
- onClick={() => handleTabChange("image")}
- >
- {ts("background.image")}
- </button>
- <button
- type="button"
- className={tab === "color" ? styles.isActive : ""}
- onClick={() => handleTabChange("color")}
- >
- {ts("background.color")}
- </button>
- <button
- type="button"
- className={tab === "gradient" ? styles.isActive : ""}
- onClick={() => handleTabChange("gradient")}
- >
- {ts("background.gradient")}
- </button>
- </div>
- {tab === "image" ? (
- <>
+ <>
+ <div className={styles.sectionLabel}>{ts("background.title")}</div>
+ {/* The picker FLOATS instead of sitting inline. Inline, the 18-swatch grid was
+ ~300px of the pane on its own and pushed padding/roundness/shadow — the
+ controls #84 is actually about — below the fold on a laptop window. A user
+ who opened the one appearance tab saw wallpapers and nothing else, which is
+ the same failure the facet merge set out to fix, one level down. Same
+ trade the aspect-ratio menu makes in the timeline toolbar: big choice,
+ small trigger. */}
+ <Popover open={pickerOpen} onOpenChange={setPickerOpen}>
+ <PopoverTrigger asChild>
<button
type="button"
- className={styles.uploadBtn}
- disabled={!hasDocument}
- onClick={handlePickFile}
+ className={styles.bgTrigger}
+ style={backgroundSwatchStyle(settings.wallpaper)}
+ // Deliberately NOT gated on hasDocument: opening the picker mutates
+ // nothing, and the swatches inside carry their own gate. The inline grid
+ // was browsable with no project open; collapsing it should not take that
+ // away, only the space it used.
+ aria-label={ts("background.title")}
>
- {ts("background.uploadCustom")}
+ <span className={styles.bgTriggerChip}>
+ {ts(`background.${classifyWallpaper(settings.wallpaper).kind}`)}
+ <ChevronDown size={11} />
+ </span>
</button>
- <input
- ref={fileInputRef}
- type="file"
- accept={IMAGE_ACCEPT}
- style={{ display: "none" }}
- onChange={handleFileSelected}
- />
- <div className={styles.bgGrid}>
- {customUrls.map((url) => (
+ </PopoverTrigger>
+ <PopoverContent
+ align="start"
+ sideOffset={6}
+ animated={false}
+ className="w-auto border-0 bg-transparent p-0 shadow-none"
+ >
+ <div className={styles.bgPopover}>
+ <div className={styles.paneTabs} role="tablist">
<button
type="button"
- key={`custom-${url.slice(-32)}`}
- className={`${styles.bgThumb} ${isSelected(url) ? styles.isActive : ""}`}
- style={{ background: `center/cover no-repeat url(${url})` }}
- aria-label={ts("background.customWallpaper")}
- disabled={!hasDocument}
- onClick={() => void set({ wallpaper: url })}
- />
- ))}
- {WALLPAPER_PATHS.map((path, i) => {
- // Grid swatch paints the small pre-generated thumbnail (see
- // WALLPAPER_THUMB_PATHS) — selecting it still stores/applies `path`,
- // the full-res original, unchanged.
- const previewUrl = resolveImageWallpaperUrl(WALLPAPER_THUMB_PATHS[i]);
- return (
+ className={tab === "image" ? styles.isActive : ""}
+ onClick={() => handleTabChange("image")}
+ >
+ {ts("background.image")}
+ </button>
+ <button
+ type="button"
+ className={tab === "color" ? styles.isActive : ""}
+ onClick={() => handleTabChange("color")}
+ >
+ {ts("background.color")}
+ </button>
+ <button
+ type="button"
+ className={tab === "gradient" ? styles.isActive : ""}
+ onClick={() => handleTabChange("gradient")}
+ >
+ {ts("background.gradient")}
+ </button>
+ </div>
+ {tab === "image" ? (
+ <>
<button
type="button"
- key={path}
- className={`${styles.bgThumb} ${isSelected(path) ? styles.isActive : ""}`}
- style={{ background: `center/cover no-repeat url(${previewUrl})` }}
- aria-label={ts("background.imageLabel", { index: i + 1 })}
+ className={styles.uploadBtn}
disabled={!hasDocument}
- onClick={() => void set({ wallpaper: path })}
- />
- );
- })}
- </div>
- </>
- ) : tab === "color" ? (
- <BackgroundColorTab
- value={settings.wallpaper}
- hasDocument={hasDocument}
- isSelected={isSelected}
- onPick={(color) => void set({ wallpaper: color })}
- />
- ) : (
- <>
- <div className={styles.bgGrid}>
- {GRAD_PRESETS.map((bg, i) => (
- <button
- type="button"
- key={bg}
- className={`${styles.bgThumb} ${isSelected(bg) ? styles.isActive : ""}`}
- style={{ background: bg }}
- aria-label={ts("background.gradientLabel", { index: i + 1 })}
- disabled={!hasDocument}
- onClick={() => void set({ wallpaper: bg })}
+ onClick={handlePickFile}
+ >
+ {ts("background.uploadCustom")}
+ </button>
+ <div className={styles.bgGrid}>
+ {customUrls.map((url) => (
+ <button
+ type="button"
+ key={`custom-${url.slice(-32)}`}
+ className={`${styles.bgThumb} ${isSelected(url) ? styles.isActive : ""}`}
+ style={{ background: `center/cover no-repeat url(${url})` }}
+ aria-label={ts("background.customWallpaper")}
+ disabled={!hasDocument}
+ onClick={() => void set({ wallpaper: url })}
+ />
+ ))}
+ {WALLPAPER_PATHS.map((path, i) => {
+ // Grid swatch paints the small pre-generated thumbnail (see
+ // WALLPAPER_THUMB_PATHS) — selecting it still stores/applies `path`,
+ // the full-res original, unchanged.
+ const previewUrl = resolveImageWallpaperUrl(WALLPAPER_THUMB_PATHS[i]);
+ return (
+ <button
+ type="button"
+ key={path}
+ className={`${styles.bgThumb} ${isSelected(path) ? styles.isActive : ""}`}
+ style={{ background: `center/cover no-repeat url(${previewUrl})` }}
+ aria-label={ts("background.imageLabel", { index: i + 1 })}
+ disabled={!hasDocument}
+ onClick={() => void set({ wallpaper: path })}
+ />
+ );
+ })}
+ </div>
+ </>
+ ) : tab === "color" ? (
+ <BackgroundColorTab
+ value={settings.wallpaper}
+ hasDocument={hasDocument}
+ isSelected={isSelected}
+ onPick={(color) => void set({ wallpaper: color })}
/>
- ))}
+ ) : (
+ <>
+ <div className={styles.bgGrid}>
+ {GRAD_PRESETS.map((bg, i) => (
+ <button
+ type="button"
+ key={bg}
+ className={`${styles.bgThumb} ${isSelected(bg) ? styles.isActive : ""}`}
+ style={{ background: bg }}
+ aria-label={ts("background.gradientLabel", { index: i + 1 })}
+ disabled={!hasDocument}
+ onClick={() => void set({ wallpaper: bg })}
+ />
+ ))}
+ </div>
+ {hasDocument ? <GradientEditor onChange={handleGradientChange} /> : null}
+ </>
+ )}
</div>
- {hasDocument ? <GradientEditor onChange={handleGradientChange} /> : null}
- </>
- )}
- </Pane>
+ </PopoverContent>
+ </Popover>
+ {/* Stays mounted OUTSIDE the popover: opening the OS file dialog takes focus,
+ which closes the popover and would unmount the input mid-pick, dropping the
+ file. It has no layout to cost us here. */}
+ <input
+ ref={fileInputRef}
+ type="file"
+ accept={IMAGE_ACCEPT}
+ style={{ display: "none" }}
+ onChange={handleFileSelected}
+ />
+ {/* Reads in the order it acts: pick a background, then blur it. Lived under
+ "Effects" while that was a separate facet, which is how a control named
+ "Blur BG" ended up in the tab that doesn't say background. */}
+ <div className={styles.paneRow}>
+ <span className={styles.label}>{ts("effects.blurBg")}</span>
+ <Toggle
+ checked={settings.showBlur}
+ disabled={!hasDocument}
+ onChange={(v) => {
+ void set({ showBlur: v });
+ if (isNativeCompositorActive()) {
+ setNativeParam("backgroundBlur", v);
+ }
+ }}
+ />
+ </div>
+ </>
+ );
+}
+
+/**
+ * The CSS `background` shorthand that paints a wallpaper value as a swatch — the same
+ * painting the grid thumbs do, hoisted out so the collapsed trigger shows exactly what the
+ * grid would show as selected. Bundled wallpapers resolve to their small pre-generated
+ * thumbnail; colours and gradients are their own literal; a custom `data:` URL passes
+ * through `resolveImageWallpaperUrl` untouched.
+ */
+function backgroundSwatchStyle(value: string): CSSProperties {
+ const classified = classifyWallpaper(value);
+ if (classified.kind !== "image") return { background: classified.value };
+ const bundled = WALLPAPER_PATHS.indexOf(classified.path);
+ const url = resolveImageWallpaperUrl(
+ bundled >= 0 ? WALLPAPER_THUMB_PATHS[bundled] : classified.path,
);
+ return { background: `center/cover no-repeat url(${url})` };
}
// keep the user's last data: URL after they switch tabs so the Image
@@ -1361,55 +1441,44 @@ export type { AxcutWord };
// ─── Video Effects ─────────────────────────────────────────────────
+/**
+ * One pane for everything that shapes the composition.
+ *
+ * Background and Effects used to be two facets, and four of Effects' five controls were
+ * background controls in disguise: the blur blurs the background, the shadow falls ON the
+ * background, and roundness and padding exist only to let it show through. So a user who
+ * wanted no background at all opened "Background", found nothing but wallpapers, and filed
+ * #84. The split had no seam to sit on — it just hid the answer in the tab that doesn't say
+ * "background".
+ *
+ * Merged, the sections read as what they are: pick a background, decide how the recording
+ * sits on it, then the one control that is about neither.
+ */
export function VideoEffectsPane() {
const ts = useScopedT("settings");
- const { settings, set, setLive, commit, hasDocument } = useEditorSettings();
+ const { settings, setLive, commit, hasDocument } = useEditorSettings();
- // Push the current frame-styling settings into the native D3D compositor
- // view whenever it becomes active (or the settings change while it's up).
- // The onChange handlers above already push per-control diffs; this effect
- // also covers the "user tweaked a setting before the native view was
- // mounted" case so the view doesn't render with stale defaults.
// Le rayon natif = rayon de base de la fixture (~24px @1920) × cette échelle. Diviser la
// valeur px de l'UI par ce même rayon de base fait que le coin natif ≈ les px affichés
// (au lieu de plafonner à ~24px comme avec /64).
const NATIVE_SCREEN_BASE_RADIUS_PX = 24;
- // La synchro initiale de ces params vit desormais dans NativeCompositorOverlay
+ // La synchro initiale de ces params vit dans NativeCompositorOverlay
// (`pushAllNativeParams`) : l'inspecteur n'affiche qu'un panneau a la fois, donc
// un effet de montage ici ne poussait rien tant que ce panneau precis n'avait pas
// ete ouvert. Les handlers par controle ci-dessous poussent toujours leurs diffs.
return (
- <Pane title={ts("effects.title")} icon={<Sliders size={14} />} helpText={ts("effects.help")}>
- <div className={styles.paneRow}>
- <span className={styles.label}>{ts("effects.blurBg")}</span>
- <Toggle
- checked={settings.showBlur}
- disabled={!hasDocument}
- onChange={(v) => {
- void set({ showBlur: v });
- if (isNativeCompositorActive()) {
- setNativeParam("backgroundBlur", v);
- }
- }}
- />
- </div>
+ <Pane
+ title={ts("effects.title")}
+ icon={<Sliders size={14} />}
+ // Two complete sentences, one per merged half, rather than a third string to
+ // translate 13 times — both already exist in every locale and neither is a
+ // fragment of the other, so joining them survives translation and RTL alike.
+ helpText={`${ts("background.help")} ${ts("effects.help")}`}
+ >
+ <BackgroundSection />
+ <div className={styles.sectionLabel}>{ts("effects.frame")}</div>
<div className={styles.sliderGrid}>
- <SliderCell
- label={ts("effects.motionBlur")}
- value={settings.motionBlurAmount * 100}
- min={0}
- max={100}
- suffix="%"
- disabled={!hasDocument}
- onChange={(v) => {
- setLive({ motionBlurAmount: v / 100 });
- if (isNativeCompositorActive()) {
- setNativeParam("motionBlur", v / 100);
- }
- }}
- onCommit={() => void commit()}
- />
<SliderCell
label={ts("effects.shadow")}
value={settings.shadowIntensity * 100}
@@ -1457,6 +1526,28 @@ export function VideoEffectsPane() {
onCommit={() => void commit()}
/>
</div>
+ {/* Alone in its section, and correctly so: this blurs the RECORDING as it moves
+ (zooms, layout changes) — see `effects.motion_blur` driving the tap count in
+ frame_geometry.rs. It is the one control here that never touches the
+ background, so it does not belong under "Frame" either. */}
+ <div className={styles.sectionLabel}>{ts("effects.motion")}</div>
+ <div className={styles.sliderGrid}>
+ <SliderCell
+ label={ts("effects.motionBlur")}
+ value={settings.motionBlurAmount * 100}
+ min={0}
+ max={100}
+ suffix="%"
+ disabled={!hasDocument}
+ onChange={(v) => {
+ setLive({ motionBlurAmount: v / 100 });
+ if (isNativeCompositorActive()) {
+ setNativeParam("motionBlur", v / 100);
+ }
+ }}
+ onCommit={() => void commit()}
+ />
+ </div>
</Pane>
);
}
diff --git a/src/components/ai-edition/backgroundImageUpload.test.tsx b/src/components/ai-edition/backgroundImageUpload.test.tsx
index bf2d95694..e118172dc 100644
--- a/src/components/ai-edition/backgroundImageUpload.test.tsx
+++ b/src/components/ai-edition/backgroundImageUpload.test.tsx
@@ -6,7 +6,7 @@
import { cleanup, fireEvent, render } from "@testing-library/react";
import { afterEach, describe, expect, it, vi } from "vitest";
import { I18nProvider } from "@/contexts/I18nContext";
-import { BackgroundPane, isSupportedBackgroundImage } from "./RightPanes";
+import { isSupportedBackgroundImage, VideoEffectsPane } from "./RightPanes";
const toastError = vi.hoisted(() => vi.fn());
vi.mock("sonner", () => ({ toast: { error: toastError, success: vi.fn(), info: vi.fn() } }));
@@ -55,7 +55,7 @@ describe("a rejected upload tells the user", () => {
function pick(file: File) {
const { container } = render(
<I18nProvider>
- <BackgroundPane />
+ <VideoEffectsPane />
</I18nProvider>,
);
const input = container.querySelector('input[type="file"]');
diff --git a/src/components/ai-edition/v4/FloatingInspector.tsx b/src/components/ai-edition/v4/FloatingInspector.tsx
index 2caca6d72..2d3651a15 100644
--- a/src/components/ai-edition/v4/FloatingInspector.tsx
+++ b/src/components/ai-edition/v4/FloatingInspector.tsx
@@ -3,7 +3,6 @@ import {
Captions as CaptionsIcon,
ChevronRight,
FileText,
- Image as ImageIcon,
Layout as LayoutIcon,
Maximize2,
MousePointer2,
@@ -44,7 +43,6 @@ import { CaptionsPane } from "../CaptionsPane";
import { ColorField } from "../ColorField";
import {
AudioPane,
- BackgroundPane,
CursorPane,
LayoutPane,
SliderCell,
@@ -56,17 +54,11 @@ import styles from "./EditorShellV4.module.css";
type TimelineApi = ReturnType<typeof useTimeline>;
-export type Facet =
- | "background"
- | "effects"
- | "layout"
- | "audio"
- | "cursor"
- | "captions"
- | "transcript";
+export type Facet = "effects" | "layout" | "audio" | "cursor" | "captions" | "transcript";
-const FACETS: Array<{ id: Facet; labelKey: string; icon: typeof ImageIcon }> = [
- { id: "background", labelKey: "background.title", icon: ImageIcon },
+const FACETS: Array<{ id: Facet; labelKey: string; icon: typeof SlidersHorizontal }> = [
+ // Background is a SECTION of this facet now, not a facet of its own — see
+ // VideoEffectsPane for why the split had nowhere to sit.
{ id: "effects", labelKey: "effects.title", icon: SlidersHorizontal },
{ id: "layout", labelKey: "layout.title", icon: LayoutIcon },
{ id: "audio", labelKey: "audio.title", icon: AudioLines },
@@ -1062,7 +1054,6 @@ function FacetBody({
</button>
);
- if (facet === "background") return wrap(collapse, <BackgroundPane />);
if (facet === "effects") return wrap(collapse, <VideoEffectsPane />);
if (facet === "layout") return wrap(collapse, <LayoutPane />);
if (facet === "audio") return wrap(collapse, <AudioPane />);
diff --git a/src/i18n/locales/ar/settings.json b/src/i18n/locales/ar/settings.json
index 664131e1d..a185fcdf4 100644
--- a/src/i18n/locales/ar/settings.json
+++ b/src/i18n/locales/ar/settings.json
@@ -74,6 +74,8 @@
"shadow": "ظل",
"roundness": "الاستدارة",
"padding": "المسافة البادئة",
+ "frame": "الإطار",
+ "motion": "الحركة",
"help": "تنسيق إطار التسجيل: ضبابية الخلفية، والظل، وضبابية الحركة، واستدارة الزوايا، والحشو حول الفيديو."
},
"background": {
diff --git a/src/i18n/locales/en/settings.json b/src/i18n/locales/en/settings.json
index 4569adbba..83cec83a3 100644
--- a/src/i18n/locales/en/settings.json
+++ b/src/i18n/locales/en/settings.json
@@ -80,6 +80,8 @@
"shadow": "Shadow",
"roundness": "Roundness",
"padding": "Padding",
+ "frame": "Frame",
+ "motion": "Motion",
"help": "Frame styling for the recording: background blur, drop shadow, motion blur, corner radius, and padding around the video."
},
"background": {
diff --git a/src/i18n/locales/es/settings.json b/src/i18n/locales/es/settings.json
index 1386e1e1d..0536d1846 100644
--- a/src/i18n/locales/es/settings.json
+++ b/src/i18n/locales/es/settings.json
@@ -73,6 +73,8 @@
"shadow": "Sombra",
"roundness": "Redondez",
"padding": "Relleno",
+ "frame": "Marco",
+ "motion": "Movimiento",
"on": "activado",
"help": "Estilo del marco de la grabación: desenfoque de fondo, sombra, desenfoque de movimiento, radio de esquinas y margen alrededor del vídeo."
},
diff --git a/src/i18n/locales/fr/settings.json b/src/i18n/locales/fr/settings.json
index ad3dc0dff..31dff449b 100644
--- a/src/i18n/locales/fr/settings.json
+++ b/src/i18n/locales/fr/settings.json
@@ -73,6 +73,8 @@
"shadow": "Ombre",
"roundness": "Arrondi",
"padding": "Marge",
+ "frame": "Cadre",
+ "motion": "Mouvement",
"on": "activé",
"help": "Mise en forme du cadre de l'enregistrement : flou d'arrière-plan, ombre portée, flou de mouvement, arrondi des coins et marge autour de la vidéo."
},
diff --git a/src/i18n/locales/it/settings.json b/src/i18n/locales/it/settings.json
index 206d40bbb..b4b519fc2 100644
--- a/src/i18n/locales/it/settings.json
+++ b/src/i18n/locales/it/settings.json
@@ -74,6 +74,8 @@
"shadow": "Ombra",
"roundness": "Arrotondamento",
"padding": "Spaziatura",
+ "frame": "Cornice",
+ "motion": "Movimento",
"help": "Stile della cornice della registrazione: sfocatura dello sfondo, ombra, sfocatura di movimento, raggio degli angoli e margine attorno al video."
},
"background": {
diff --git a/src/i18n/locales/ja-JP/settings.json b/src/i18n/locales/ja-JP/settings.json
index 8d999dc79..8eae995c7 100644
--- a/src/i18n/locales/ja-JP/settings.json
+++ b/src/i18n/locales/ja-JP/settings.json
@@ -73,6 +73,8 @@
"shadow": "影",
"roundness": "丸み",
"padding": "余白",
+ "frame": "フレーム",
+ "motion": "モーション",
"on": "オン",
"help": "録画フレームのスタイル設定: 背景ぼかし、ドロップシャドウ、モーションブラー、角丸、動画まわりの余白。"
},
diff --git a/src/i18n/locales/ko-KR/settings.json b/src/i18n/locales/ko-KR/settings.json
index cbbc77ada..75cb2584d 100644
--- a/src/i18n/locales/ko-KR/settings.json
+++ b/src/i18n/locales/ko-KR/settings.json
@@ -74,6 +74,8 @@
"shadow": "그림자",
"roundness": "모서리 둥글기",
"padding": "여백",
+ "frame": "프레임",
+ "motion": "모션",
"help": "녹화 프레임 스타일: 배경 흐림, 그림자, 모션 블러, 모서리 둥글기, 영상 주변 여백."
},
"background": {
diff --git a/src/i18n/locales/pt-BR/settings.json b/src/i18n/locales/pt-BR/settings.json
index 68a4112c3..54cf659af 100644
--- a/src/i18n/locales/pt-BR/settings.json
+++ b/src/i18n/locales/pt-BR/settings.json
@@ -74,6 +74,8 @@
"shadow": "Sombra",
"roundness": "Arredondamento",
"padding": "Espaçamento",
+ "frame": "Moldura",
+ "motion": "Movimento",
"help": "Estilo do quadro da gravação: desfoque de fundo, sombra, desfoque de movimento, raio dos cantos e margem em volta do vídeo."
},
"background": {
diff --git a/src/i18n/locales/ru/settings.json b/src/i18n/locales/ru/settings.json
index a6798b666..829fb2cf0 100644
--- a/src/i18n/locales/ru/settings.json
+++ b/src/i18n/locales/ru/settings.json
@@ -74,6 +74,8 @@
"shadow": "Тень",
"roundness": "Скругление",
"padding": "Отступ",
+ "frame": "Рамка",
+ "motion": "Движение",
"help": "Оформление кадра записи: размытие фона, тень, размытие движения, скругление углов и отступ вокруг видео."
},
"background": {
diff --git a/src/i18n/locales/tr/settings.json b/src/i18n/locales/tr/settings.json
index c2ab5477a..57668b5d3 100644
--- a/src/i18n/locales/tr/settings.json
+++ b/src/i18n/locales/tr/settings.json
@@ -73,6 +73,8 @@
"shadow": "Gölge",
"roundness": "Yuvarlaklık",
"padding": "Dolgu",
+ "frame": "Çerçeve",
+ "motion": "Hareket",
"on": "açık",
"help": "Kayıt çerçevesinin biçimi: arka plan bulanıklığı, gölge, hareket bulanıklığı, köşe yuvarlaklığı ve videonun çevresindeki boşluk."
},
diff --git a/src/i18n/locales/vi/settings.json b/src/i18n/locales/vi/settings.json
index d65c801f1..aa2599571 100644
--- a/src/i18n/locales/vi/settings.json
+++ b/src/i18n/locales/vi/settings.json
@@ -73,6 +73,8 @@
"shadow": "Bóng đổ",
"roundness": "Độ bo tròn",
"padding": "Phần đệm",
+ "frame": "Khung",
+ "motion": "Chuyển động",
"on": "bật",
"help": "Kiểu khung của bản ghi: làm mờ nền, đổ bóng, mờ chuyển động, bo góc và khoảng đệm quanh video."
},
diff --git a/src/i18n/locales/zh-CN/settings.json b/src/i18n/locales/zh-CN/settings.json
index 3fd503d24..7050a58b8 100644
--- a/src/i18n/locales/zh-CN/settings.json
+++ b/src/i18n/locales/zh-CN/settings.json
@@ -73,6 +73,8 @@
"shadow": "阴影",
"roundness": "圆角",
"padding": "内边距",
+ "frame": "画框",
+ "motion": "运动",
"on": "开",
"help": "录制画面的边框样式:背景模糊、投影、运动模糊、圆角半径以及视频四周的内边距。"
},
diff --git a/src/i18n/locales/zh-TW/settings.json b/src/i18n/locales/zh-TW/settings.json
index 4a124525d..6e8f63cc9 100644
--- a/src/i18n/locales/zh-TW/settings.json
+++ b/src/i18n/locales/zh-TW/settings.json
@@ -74,6 +74,8 @@
"shadow": "陰影",
"roundness": "圓角",
"padding": "內邊距",
+ "frame": "外框",
+ "motion": "動態",
"on": "開",
"help": "錄製畫面的外框樣式:背景模糊、陰影、動態模糊、圓角半徑,以及影片四周的內距。"
},
diff --git a/technical-documentation/architecture/decisions.md b/technical-documentation/architecture/decisions.md
index e6cd04614..96d97bff1 100644
--- a/technical-documentation/architecture/decisions.md
+++ b/technical-documentation/architecture/decisions.md
@@ -54,5 +54,6 @@ behaviour lives now.
| `Titlebar.tsx`, `Bottombar.tsx` | `src/components/ai-edition/v4/EditorTopBar.tsx` |
| `RightPanelStack.tsx` | `src/components/ai-edition/v4/FloatingInspector.tsx` |
| `TranscriptEditor.tsx` | `src/components/ai-edition/CaptionsPane.tsx` + `src/lib/ai-edition/captions/` |
+| `BackgroundPane`, and the `"background"` inspector facet | the **Background** section of `VideoEffectsPane` (`src/components/ai-edition/RightPanes.tsx`). Four of the five "effects" controls were background controls — the blur blurs it, the shadow falls on it, roundness and padding exist to let it show through — so the split put the answer to "how do I remove the background" in the tab that doesn't say background ([#84](https://github.com/getopenscreen/openscreen/issues/84)). |
| The browser-based exporter | the native compositor export path — see [export-pipeline.md](export-pipeline.md) |
| CTranslate2 speech-to-text | whisper.cpp — see [transcription-and-captions.md](transcription-and-captions.md) |
diff --git a/technical-documentation/architecture/editor-shell.md b/technical-documentation/architecture/editor-shell.md
index eed79f8f6..6b9b549c1 100644
--- a/technical-documentation/architecture/editor-shell.md
+++ b/technical-documentation/architecture/editor-shell.md
@@ -38,7 +38,7 @@ flowchart TD
Stage -- "mode === 'media'" --> Media
Stage -- "mode === 'rec'" --> Rec
- Inspector -- "FacetBody" --> RightPanes["BackgroundPane / VideoEffectsPane /<br/>LayoutPane / CursorPane /<br/>TranscriptPane / CaptionsPane<br/>(RightPanes.tsx · CaptionsPane.tsx)"]
+ Inspector -- "FacetBody" --> RightPanes["VideoEffectsPane / LayoutPane /<br/>AudioPane / CursorPane /<br/>TranscriptPane / CaptionsPane<br/>(RightPanes.tsx · CaptionsPane.tsx)"]
```
The shell is the single owner of mode, transport (`playing`/`currentTimeSec` come
@@ -84,17 +84,17 @@ export type EditorMode = "media" | "edit" | "rec";
### Facet (`v4/FloatingInspector.tsx:57`)
```ts
-export type Facet = "background" | "effects" | "layout" | "cursor" | "captions" | "transcript";
+export type Facet = "effects" | "layout" | "audio" | "cursor" | "captions" | "transcript";
```
| Facet | Body component | Purpose |
|---|---|---|
-| `"background"` | `BackgroundPane` (`src/components/ai-edition/RightPanes.tsx:178`) | Wallpaper, shadow intensity, blur, motion blur, corner radius, padding — all read out of `document.legacyEditor`. |
-| `"effects"` | `VideoEffectsPane` (`RightPanes.tsx:1218`) | Per-clip / per-document video effects that aren't zoom / speed / annotation (cursor zoom, etc.). |
-| `"layout"` | `LayoutPane` (`RightPanes.tsx:1376`) | Webcam layout (PiP / side / full / off), mask shape, mirroring — all also from `legacyEditor`. |
-| `"cursor"` | `CursorPane` (`RightPanes.tsx:1544`) | Cursor smoothing, theme, click ring, halo. |
+| `"effects"` | `VideoEffectsPane` (`src/components/ai-edition/RightPanes.tsx`) | Everything that shapes the composition, in three sections: **Background** (a swatch trigger opening the wallpaper / colour / gradient picker in a popover, plus the background blur), **Frame** (shadow, roundness, padding) and **Motion** (motion blur). All read out of `document.legacyEditor`. The picker floats so the frame sliders stay above the fold — inline, its 18-swatch grid alone was two thirds of the pane's height. |
+| `"layout"` | `LayoutPane` (`RightPanes.tsx`) | Webcam layout (PiP / side / full / off), mask shape, mirroring — all also from `legacyEditor`. |
+| `"audio"` | `AudioPane` (`RightPanes.tsx`) | Output gain. |
+| `"cursor"` | `CursorPane` (`RightPanes.tsx`) | Cursor smoothing, theme, click ring, halo. |
| `"captions"` | `CaptionsPane` (`CaptionsPane.tsx`) | Caption appearance (font, size, background, animation) and translations. The pane owns the `transcribe` action — it's the only place that runs it from the shell. |
-| `"transcript"` | `TranscriptPane` (`RightPanes.tsx:475`) | Editable view of the transcript words / segments. Writes back to the document. |
+| `"transcript"` | `TranscriptPane` (`RightPanes.tsx`) | Editable view of the transcript words / segments. Writes back to the document. |
Selecting a region on the timeline supersedes the current facet body: the
inspector opens (if it was closed) and renders the `SelectionPane` for that