Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

Refine dashboard controls and settings, restore Clips, and shorten zoom holds

webadderall202a359e0d17
diff --git a/docs/pr/project-browser/projects-dark.png b/docs/pr/project-browser/projects-dark.png
index 1492b412..281e9c8d 100644
Binary files a/docs/pr/project-browser/projects-dark.png and b/docs/pr/project-browser/projects-dark.png differ
diff --git a/docs/pr/project-browser/projects.png b/docs/pr/project-browser/projects.png
index 71008fbc..fbbf4e66 100644
Binary files a/docs/pr/project-browser/projects.png and b/docs/pr/project-browser/projects.png differ
diff --git a/docs/pr/project-browser/settings.png b/docs/pr/project-browser/settings.png
index c7822e8c..7455ce8f 100644
Binary files a/docs/pr/project-browser/settings.png and b/docs/pr/project-browser/settings.png differ
diff --git a/docs/pr/project-browser/shortcuts.png b/docs/pr/project-browser/shortcuts.png
new file mode 100644
index 00000000..61982c2d
Binary files /dev/null and b/docs/pr/project-browser/shortcuts.png differ
diff --git a/src/components/video-editor/SettingsPanel.tsx b/src/components/video-editor/SettingsPanel.tsx
index bdb46077..f666690e 100644
--- a/src/components/video-editor/SettingsPanel.tsx
+++ b/src/components/video-editor/SettingsPanel.tsx
@@ -42,7 +42,8 @@ import { loadEditorPreferences, saveEditorPreferences } from "./editorPreference
import { getDefaultBorderRadiusPercent } from "./projectPersistence";
import { SliderControl } from "./SliderControl";
import { WallpaperGrid } from "./WallpaperGrid";
-import { KeyboardShortcutsDialog } from "./TutorialHelp";
+import { useShortcuts } from "@/contexts/ShortcutsContext";
+import { SettingsRow } from "./SettingsRow";
import type {
AnnotationRegion,
AnnotationType,
@@ -1004,6 +1005,7 @@ export function SettingsPanel({
);
const [experimentalUpdatesEnabled, setExperimentalUpdatesEnabled] = useState(false);
const [savingExperimentalUpdates, setSavingExperimentalUpdates] = useState(false);
+ const { openConfig: openShortcutsConfig } = useShortcuts();
const [internalActiveEffectSection] = useState<EditorEffectSection>("scene");
const activeEffectSection = activeEffectSectionProp ?? internalActiveEffectSection;
const removeBackgroundStateRef = useRef<{
@@ -1793,7 +1795,7 @@ export function SettingsPanel({
style={{ scrollbarGutter: "stable" }}
>
<div className="mb-4 flex items-center gap-2">
- <Palette className="w-4 h-4 text-[#2563EB]" />
+ <Palette className="w-4 h-4 text-accent" />
<span className="text-sm font-medium text-foreground">
{tSettings("background.title")}
</span>
@@ -2241,8 +2243,7 @@ export function SettingsPanel({
categories={advanced ? ["general", "motion", "advanced"] : ["general", "motion"]}
>
<SettingsCategory category="general">
- <section className="flex flex-col gap-4">
- <SectionLabel>{t("editor.theme.appearance", "Appearance")}</SectionLabel>
+ <SettingsRow title={t("editor.theme.appearance", "Appearance")} stacked>
<ChoiceGroup
type="single"
aria-label={t("editor.theme.appearance", "Appearance")}
@@ -2264,10 +2265,9 @@ export function SettingsPanel({
{t("editor.theme.system", "System")}
</ChoiceItem>
</ChoiceGroup>
- </section>
+ </SettingsRow>
- <section className="flex flex-col gap-4">
- <SectionLabel>{t("common.app.language", "Language")}</SectionLabel>
+ <SettingsRow title={t("common.app.language", "Language")} stacked>
<Select
value={locale}
onValueChange={(value) => setLocale(value as AppLocale)}
@@ -2283,24 +2283,19 @@ export function SettingsPanel({
))}
</SelectContent>
</Select>
- </section>
+ </SettingsRow>
</SettingsCategory>
<SettingsCategory category="advanced">
{advanced && (
<section className="flex flex-col gap-4">
<SectionLabel>{tSettings("updates.title", "Updates")}</SectionLabel>
- <div className="flex items-center justify-between gap-3 py-2">
- <div>
- <div className="text-sm font-medium text-foreground">
- {tSettings("updates.experimental", "Experimental updates")}
- </div>
- <div className="mt-0.5 text-xs text-muted-foreground/70">
- {tSettings(
- "updates.experimentalDescription",
- "This is the front line of user testing - highly experimental so expect bugs",
- )}
- </div>
- </div>
+ <SettingsRow
+ title={tSettings("updates.experimental", "Experimental updates")}
+ description={tSettings(
+ "updates.experimentalDescription",
+ "This is the front line of user testing - highly experimental so expect bugs",
+ )}
+ >
<Switch
checked={experimentalUpdatesEnabled}
disabled={savingExperimentalUpdates}
@@ -2312,27 +2307,22 @@ export function SettingsPanel({
"Experimental updates",
)}
/>
- </div>
+ </SettingsRow>
</section>
)}
</SettingsCategory>
<SettingsCategory category="motion">
<section className="flex flex-col gap-3">
- <div className="flex items-center justify-between gap-3 py-2">
- <div>
- <div className="text-sm font-medium text-foreground">
- {tSettings(
- "effects.autoApplyFreshRecordingZooms",
- "Auto-apply fresh recording zooms",
- )}
- </div>
- <div className="mt-0.5 text-xs text-muted-foreground/70">
- {tSettings(
- "effects.autoApplyFreshRecordingZoomsDescription",
- "Suggest cursor-follow zooms automatically when you open a new recording.",
- )}
- </div>
- </div>
+ <SettingsRow
+ title={tSettings(
+ "effects.autoApplyFreshRecordingZooms",
+ "Auto-apply fresh recording zooms",
+ )}
+ description={tSettings(
+ "effects.autoApplyFreshRecordingZoomsDescription",
+ "Suggest cursor-follow zooms automatically when you open a new recording.",
+ )}
+ >
<Switch
aria-label={tSettings(
"effects.autoApplyFreshRecordingZooms",
@@ -2341,19 +2331,14 @@ export function SettingsPanel({
checked={autoApplyFreshRecordingAutoZooms}
onCheckedChange={onAutoApplyFreshRecordingAutoZoomsChange}
/>
- </div>
- <div className="flex items-center justify-between gap-3 py-2">
- <div>
- <div className="text-sm font-medium text-foreground">
- {tSettings("effects.connectZooms", "Connect neighboring zooms")}
- </div>
- <div className="mt-0.5 text-xs text-muted-foreground/70">
- {tSettings(
- "effects.connectZoomsDescription",
- "Smooth consecutive zoom regions into a continuous camera move.",
- )}
- </div>
- </div>
+ </SettingsRow>
+ <SettingsRow
+ title={tSettings("effects.connectZooms", "Connect neighboring zooms")}
+ description={tSettings(
+ "effects.connectZoomsDescription",
+ "Smooth consecutive zoom regions into a continuous camera move.",
+ )}
+ >
<Switch
aria-label={tSettings(
"effects.connectZooms",
@@ -2362,7 +2347,7 @@ export function SettingsPanel({
checked={connectZooms}
onCheckedChange={onConnectZoomsChange}
/>
- </div>
+ </SettingsRow>
</section>
<section className="flex flex-col gap-4">
@@ -2375,17 +2360,15 @@ export function SettingsPanel({
</section>
</SettingsCategory>
<SettingsCategory category="general">
- <section className="flex flex-col gap-4">
- <SectionLabel>{t("editor.keyboardShortcuts.title")}</SectionLabel>
- <KeyboardShortcutsDialog
- triggerLabel={t("editor.keyboardShortcuts.customize")}
- triggerClassName="h-9 w-full justify-start rounded-xl border border-foreground/10 bg-foreground/5 px-3 text-sm text-foreground hover:bg-foreground/10 hover:text-foreground"
- />
- </section>
+ <SettingsRow title={t("editor.keyboardShortcuts.title")}>
+ <Button variant="secondary" size="sm" onClick={openShortcutsConfig}>
+ {t("editor.keyboardShortcuts.customize")}
+ </Button>
+ </SettingsRow>
</SettingsCategory>
<SettingsCategory category="advanced">
{advanced && showDevMotionControls ? (
- <section className="flex flex-col gap-4 rounded-xl border border-[#2563EB]/15 bg-[#2563EB]/5 p-3">
+ <section className="flex flex-col gap-4 rounded-xl border border-separator bg-surface-secondary p-3">
<div className="flex items-center justify-between gap-3">
<div>
<SectionLabel>
@@ -2398,7 +2381,7 @@ export function SettingsPanel({
)}
</div>
</div>
- <span className="rounded-full bg-[#2563EB]/10 px-2 py-0.5 text-xs font-medium uppercase tracking-wider text-[#2563EB]">
+ <span className="rounded-full bg-accent-soft px-2 py-0.5 text-xs font-medium uppercase tracking-wider text-accent">
DEV
</span>
</div>
diff --git a/src/components/video-editor/SettingsRow.tsx b/src/components/video-editor/SettingsRow.tsx
new file mode 100644
index 00000000..2ea1fd06
--- /dev/null
+++ b/src/components/video-editor/SettingsRow.tsx
@@ -0,0 +1,29 @@
+import { Label, Description } from "@heroui/react";
+import type { ReactNode } from "react";
+
+/** One spacing and typography contract for editor and dashboard preferences. */
+export function SettingsRow({
+ title,
+ description,
+ children,
+ stacked = false,
+}: {
+ title: ReactNode;
+ description?: ReactNode;
+ children: ReactNode;
+ stacked?: boolean;
+}) {
+ return (
+ <section
+ className={stacked ? "flex flex-col gap-3" : "flex items-center justify-between gap-4"}
+ >
+ <div className="min-w-0 space-y-1">
+ <Label className="text-[13px] font-medium">{title}</Label>
+ {description && (
+ <Description className="text-xs leading-relaxed">{description}</Description>
+ )}
+ </div>
+ <div className={stacked ? "w-full" : "shrink-0"}>{children}</div>
+ </section>
+ );
+}
diff --git a/src/components/video-editor/ShortcutsConfigDialog.tsx b/src/components/video-editor/ShortcutsConfigDialog.tsx
index a7a958d8..15e33d54 100644
--- a/src/components/video-editor/ShortcutsConfigDialog.tsx
+++ b/src/components/video-editor/ShortcutsConfigDialog.tsx
@@ -1,3 +1,4 @@
+import { Kbd, Description, Modal } from "@heroui/react";
import { Keyboard, ArrowCounterClockwise as RotateCcw } from "@/components/ui/icons";
import { useCallback, useEffect, useState } from "react";
import { toast } from "@/components/ui/toast";
@@ -126,108 +127,112 @@ export function ShortcutsConfigDialog() {
if (!open) handleClose();
}}
>
- <DialogContent className="max-w-[460px]">
- <DialogHeader>
- <DialogTitle className="flex items-center gap-2 text-sm">
- <Keyboard className="w-4 h-4 text-[#2563EB]" />
+ <DialogContent className="max-w-lg max-h-[85vh] overflow-hidden">
+ <DialogHeader className="shrink-0">
+ <DialogTitle className="flex items-center gap-2 text-base font-semibold">
+ <Keyboard className="w-4 h-4 text-accent" />
{t("shortcutsConfig.title")}
</DialogTitle>
</DialogHeader>
- <div className="space-y-0.5">
- <p className="text-[10px] text-muted-foreground/70 mb-2 uppercase tracking-wide font-semibold">
- {t("shortcutsConfig.configurable")}
- </p>
- {SHORTCUT_ACTIONS.map((action) => {
- const isCapturing = captureFor === action;
- const hasConflict = conflict?.forAction === action;
- return (
- <div key={action}>
- <div className="flex items-center justify-between py-1.5 px-1 border-b border-foreground/5">
- <span className="text-sm text-muted-foreground">
- {SHORTCUT_LABELS[action]}
- </span>
- <Button
- type="button"
- onClick={() => {
- setConflict(null);
- setCaptureFor(isCapturing ? null : action);
- }}
- title={
- isCapturing
- ? t("shortcutsConfig.pressEscToCancel")
- : t("shortcutsConfig.clickToChange")
- }
- className={[
- "px-2 py-1 text-xs min-w-[90px] text-center select-none",
- isCapturing
- ? "animate-pulse"
- : hasConflict
- ? "text-amber-400"
- : "cursor-pointer",
- ].join(" ")}
- >
- {isCapturing
- ? t("shortcutsConfig.pressAKey")
- : formatBinding(draft[action], isMac)}
- </Button>
- </div>
- {hasConflict && conflict?.conflictWith.type === "configurable" && (
- <div className="flex items-center justify-between px-1 py-1.5 mb-0.5 bg-amber-500/10 border border-amber-500/20 rounded text-xs">
- <span className="text-amber-400">
- {t("shortcutsConfig.alreadyUsedBy", undefined, {
- action: SHORTCUT_LABELS[
- conflict.conflictWith.action
- ],
- })}
+ <Modal.Body className="min-h-0 space-y-6 overflow-y-auto">
+ <div className="space-y-0.5">
+ <p className="mb-3 text-[13px] font-medium text-foreground">
+ {t("shortcutsConfig.configurable")}
+ </p>
+ {SHORTCUT_ACTIONS.map((action) => {
+ const isCapturing = captureFor === action;
+ const hasConflict = conflict?.forAction === action;
+ return (
+ <div key={action}>
+ <div className="flex items-center justify-between gap-4 border-b border-separator py-3">
+ <span className="text-[13px] text-foreground">
+ {SHORTCUT_LABELS[action]}
</span>
- <div className="flex gap-1.5">
- <Button
- variant="ghost"
- type="button"
- onClick={handleSwap}
- className="px-2 py-0.5 text-amber-300"
- >
- {t("shortcutsConfig.swap")}
- </Button>
- <Button
- variant="ghost"
- type="button"
- onClick={handleCancelConflict}
- className="px-2 py-0.5"
- >
- {t("shortcutsConfig.cancel")}
- </Button>
- </div>
+ <Button
+ type="button"
+ variant="secondary"
+ size="sm"
+ aria-label={`Change ${SHORTCUT_LABELS[action]} shortcut`}
+ onClick={() => {
+ setConflict(null);
+ setCaptureFor(isCapturing ? null : action);
+ }}
+ title={
+ isCapturing
+ ? t("shortcutsConfig.pressEscToCancel")
+ : t("shortcutsConfig.clickToChange")
+ }
+ className={[
+ "px-2 py-1 text-xs min-w-[90px] text-center select-none",
+ isCapturing
+ ? "animate-pulse"
+ : hasConflict
+ ? "text-warning"
+ : "cursor-pointer",
+ ].join(" ")}
+ >
+ {isCapturing
+ ? t("shortcutsConfig.pressAKey")
+ : formatBinding(draft[action], isMac)}
+ </Button>
</div>
- )}
+ {hasConflict &&
+ conflict?.conflictWith.type === "configurable" && (
+ <div className="flex items-center justify-between px-1 py-1.5 mb-0.5 bg-warning-soft border border-warning/20 rounded text-xs">
+ <span className="text-warning">
+ {t("shortcutsConfig.alreadyUsedBy", undefined, {
+ action: SHORTCUT_LABELS[
+ conflict.conflictWith.action
+ ],
+ })}
+ </span>
+ <div className="flex gap-1.5">
+ <Button
+ variant="ghost"
+ type="button"
+ onClick={handleSwap}
+ className="px-2 py-0.5 text-warning"
+ >
+ {t("shortcutsConfig.swap")}
+ </Button>
+ <Button
+ variant="ghost"
+ type="button"
+ onClick={handleCancelConflict}
+ className="px-2 py-0.5"
+ >
+ {t("shortcutsConfig.cancel")}
+ </Button>
+ </div>
+ </div>
+ )}
+ </div>
+ );
+ })}
+ </div>
+
+ <div className="space-y-0.5 mt-2">
+ <p className="mb-3 text-[13px] font-medium text-foreground">
+ {t("shortcutsConfig.fixed")}
+ </p>
+ {FIXED_SHORTCUTS.map(({ label, display }) => (
+ <div
+ key={label}
+ className="flex items-center justify-between gap-4 border-b border-separator py-3 last:border-0"
+ >
+ <span className="text-[13px] text-foreground">{label}</span>
+ <Kbd className="min-w-[90px] justify-center">{display}</Kbd>
</div>
- );
- })}
- </div>
-
- <div className="space-y-0.5 mt-2">
- <p className="text-[10px] text-muted-foreground/70 mb-2 uppercase tracking-wide font-semibold">
- {t("shortcutsConfig.fixed")}
- </p>
- {FIXED_SHORTCUTS.map(({ label, display }) => (
- <div
- key={label}
- className="flex items-center justify-between py-1.5 px-1 border-b border-foreground/5 last:border-0"
- >
- <span className="text-sm text-muted-foreground">{label}</span>
- <kbd className="px-2 py-1 bg-foreground/5 border border-foreground/10 rounded text-xs font-mono text-muted-foreground min-w-[90px] text-center">
- {display}
- </kbd>
- </div>
- ))}
- </div>
-
- <p className="text-[10px] text-muted-foreground/70 mt-1">
- {t("shortcutsConfig.instructions")}
- </p>
-
- <DialogFooter className="flex gap-2 sm:justify-between mt-2">
+ ))}
+ </div>
+
+ <Description className="mt-2 text-xs">
+ {t("shortcutsConfig.instructions")}
+ </Description>
+ </Modal.Body>
+
+ <DialogFooter className="flex shrink-0 gap-2 sm:justify-between mt-2">
<Button
title={t("shortcutsConfig.resetToDefaults")}
variant="ghost"
diff --git a/src/components/video-editor/dashboard/DashboardFilters.tsx b/src/components/video-editor/dashboard/DashboardFilters.tsx
index 5aaeb4de..bb1d41a0 100644
--- a/src/components/video-editor/dashboard/DashboardFilters.tsx
+++ b/src/components/video-editor/dashboard/DashboardFilters.tsx
@@ -1,11 +1,14 @@
+import type { DashboardProps } from "./types";
import { Dropdown } from "@heroui/react";
-import { CaretDown, Trash } from "@/components/ui/icons";
+import { CaretDown, Trash, UploadSimple } from "@/components/ui/icons";
import { Button } from "@/components/ui/button";
import type { DashboardModel } from "./useDashboardModel";
export function DashboardFilters({
+ onImportFile,
+ run,
isRaw,
period,
setPeriod,
@@ -19,7 +22,9 @@ export function DashboardFilters({
busy,
setConfirmDelete,
}: Pick<
- DashboardModel,
+ DashboardModel & DashboardProps,
+ | "onImportFile"
+ | "run"
| "isRaw"
| "period"
| "setPeriod"
@@ -35,7 +40,7 @@ export function DashboardFilters({
>) {
return (
<>
- <div className="flex items-center justify-between gap-3 px-7 pb-7 lg:px-10">
+ <div className="flex items-center gap-3 px-7 pb-7 lg:px-10">
<div className="flex gap-2" aria-label="Time filters">
{[
["all", "All"],
@@ -69,38 +74,50 @@ export function DashboardFilters({
<Trash weight="fill" className="size-4" />
</Button>
</div>
- <Dropdown>
- <Button
- variant="ghost"
- size="sm"
- aria-label={isRaw ? "Sort raw files" : "Sort projects"}
- className="h-7 gap-2 text-xs text-muted-foreground"
- >
- {sort === "recent"
- ? isRaw
- ? "Last created"
- : "Last edited"
- : sort === "created"
- ? "Last created"
- : "Name"}
- <CaretDown className="size-3" />
- </Button>
- <Dropdown.Popover>
- <Dropdown.Menu aria-label={isRaw ? "Sort raw files" : "Sort projects"}>
- {!isRaw && (
- <Dropdown.Item id="recent" onAction={() => setSort("recent")}>
- Last edited
+ <Button
+ variant="ghost"
+ size="sm"
+ disabled={busy}
+ onClick={() => void run(onImportFile)}
+ className="h-7 shrink-0 gap-2 text-xs"
+ >
+ <UploadSimple className="size-3.5" />
+ Import
+ </Button>
+ <div className="ml-auto">
+ <Dropdown>
+ <Button
+ variant="ghost"
+ size="sm"
+ aria-label={isRaw ? "Sort raw files" : "Sort projects"}
+ className="h-7 gap-2 text-xs text-muted-foreground"
+ >
+ {sort === "recent"
+ ? isRaw
+ ? "Last created"
+ : "Last edited"
+ : sort === "created"
+ ? "Last created"
+ : "Name"}
+ <CaretDown className="size-3" />
+ </Button>
+ <Dropdown.Popover>
+ <Dropdown.Menu aria-label={isRaw ? "Sort raw files" : "Sort projects"}>
+ {!isRaw && (
+ <Dropdown.Item id="recent" onAction={() => setSort("recent")}>
+ Last edited
+ </Dropdown.Item>
+ )}
+ <Dropdown.Item id="created" onAction={() => setSort("created")}>
+ Last created
+ </Dropdown.Item>
+ <Dropdown.Item id="name" onAction={() => setSort("name")}>
+ Name
</Dropdown.Item>
- )}
- <Dropdown.Item id="created" onAction={() => setSort("created")}>
- Last created
- </Dropdown.Item>
- <Dropdown.Item id="name" onAction={() => setSort("name")}>
- Name
- </Dropdown.Item>
- </Dropdown.Menu>
- </Dropdown.Popover>
- </Dropdown>
+ </Dropdown.Menu>
+ </Dropdown.Popover>
+ </Dropdown>
+ </div>
</div>
{selecting && (
<div className="flex items-center gap-3 px-7 pb-5 text-xs lg:px-10">
diff --git a/src/components/video-editor/dashboard/DashboardSettings.tsx b/src/components/video-editor/dashboard/DashboardSettings.tsx
index f159983c..68f9f43b 100644
--- a/src/components/video-editor/dashboard/DashboardSettings.tsx
+++ b/src/components/video-editor/dashboard/DashboardSettings.tsx
@@ -1,5 +1,6 @@
import { SettingsSections, SettingsCategory } from "../SettingsSections";
import { createContext, useContext, useEffect, useState, type ReactNode } from "react";
+import { SettingsRow } from "../SettingsRow";
import { Switch } from "@/components/ui/switch";
import { supportsHudCaptureProtection } from "@/lib/hudCaptureProtection";
import { Button } from "@/components/ui/button";
@@ -48,30 +49,29 @@ export function DashboardSettings({ onImportFile }: { onImportFile: () => Promis
{settingsContent}
</SettingsCategory>
<SettingsCategory category="files">
- <div className="flex items-center justify-between gap-8">
- <p className="text-sm">Open video or project</p>
+ <SettingsRow title="Open video or project">
<Button
variant="secondary"
+ size="sm"
disabled={busy}
onClick={() => void run(onImportFile)}
>
Open file
</Button>
- </div>
+ </SettingsRow>
</SettingsCategory>
<SettingsCategory category="recording">
- <div className="flex items-center justify-between gap-8">
- <div className="min-w-0">
- <p className="text-sm">Recordings folder</p>
- <p
- className="mt-1 truncate text-xs text-muted-foreground"
- title={recordings}
- >
+ <SettingsRow
+ title="Recordings folder"
+ description={
+ <span className="block truncate" title={recordings}>
{recordings}
- </p>
- </div>
+ </span>
+ }
+ >
<Button
variant="secondary"
+ size="sm"
disabled={busy}
onClick={() =>
void run(async () => {
@@ -86,15 +86,12 @@ export function DashboardSettings({ onImportFile }: { onImportFile: () => Promis
>
Change folder
</Button>
- </div>
+ </SettingsRow>
{captureSupported && (
- <div className="flex items-center justify-between gap-8">
- <div>
- <p className="text-sm">Hide HUD from recordings</p>
- <p className="mt-1 text-xs text-muted-foreground">
- Only while recording. The idle HUD stays visible in captures.
- </p>
- </div>
+ <SettingsRow
+ title="Hide HUD from recordings"
+ description="Only while recording. The idle HUD stays visible in captures."
+ >
<Switch
aria-label="Hide HUD from recordings"
checked={hideHud}
@@ -111,15 +108,15 @@ export function DashboardSettings({ onImportFile }: { onImportFile: () => Promis
})
}
/>
- </div>
+ </SettingsRow>
)}
</SettingsCategory>
<SettingsCategory category="advanced">
{import.meta.env.DEV && (
- <div className="flex items-center justify-between gap-8">
- <p className="text-sm">Preview update UI</p>
+ <SettingsRow title="Preview update UI">
<Button
variant="secondary"
+ size="sm"
disabled={busy}
onClick={() =>
void run(async () => {
@@ -129,24 +126,17 @@ export function DashboardSettings({ onImportFile }: { onImportFile: () => Promis
>
Preview
</Button>
- </div>
+ </SettingsRow>
)}
</SettingsCategory>
<SettingsCategory category="files">
- <div className="flex items-center justify-between gap-8">
- <div>
- <p className="text-sm">Projects folder</p>
- {directory && (
- <p
- className="mt-1 max-w-xs truncate text-xs text-muted-foreground"
- title={directory}
- >
- {directory}
- </p>
- )}
- </div>
+ <SettingsRow
+ title="Projects folder"
+ description={directory || "Named projects save automatically."}
+ >
<Button
variant="secondary"
+ size="sm"
onClick={async () => {
try {
const result = await window.electronAPI.getProjectsDirectory();
@@ -161,7 +151,7 @@ export function DashboardSettings({ onImportFile }: { onImportFile: () => Promis
>
Show folder
</Button>
- </div>
+ </SettingsRow>
<p className="text-xs text-muted-foreground">
Named projects save automatically. Previews refresh when you return to
Projects.
diff --git a/src/components/video-editor/dashboard/DashboardSidebar.tsx b/src/components/video-editor/dashboard/DashboardSidebar.tsx
index 1dab7f8a..21097509 100644
--- a/src/components/video-editor/dashboard/DashboardSidebar.tsx
+++ b/src/components/video-editor/dashboard/DashboardSidebar.tsx
@@ -1,14 +1,6 @@
+import { SidebarCards } from "./SidebarCards";
import { FolderRow } from "./FolderRow";
-import {
- ArrowLeft,
- Cloud,
- File,
- GearSix,
- House,
- Plus,
- UploadSimple,
- UserCircle,
-} from "@/components/ui/icons";
+import { Cloud, File, GearSix, House, Plus, UserCircle } from "@/components/ui/icons";
import { Button } from "@/components/ui/button";
@@ -25,9 +17,6 @@ export function DashboardSidebar({
metadata,
update,
navClass,
- run,
- onImportFile,
- onOpenChange,
onSignIn,
accountLabel,
}: Pick<
@@ -39,9 +28,6 @@ export function DashboardSidebar({
| "metadata"
| "update"
| "navClass"
- | "run"
- | "onImportFile"
- | "onOpenChange"
| "onSignIn"
| "accountLabel"
>) {
@@ -142,22 +128,7 @@ export function DashboardSidebar({
))}
</div>
<div className="space-y-1 pt-6">
- <Button
- variant="ghost"
- className={navClass(false)}
- onClick={() => void run(onImportFile)}
- >
- <UploadSimple className="size-[18px]" />
- Import
- </Button>
- <Button
- variant="ghost"
- className={navClass(false)}
- onClick={() => onOpenChange(false)}
- >
- <ArrowLeft className="size-[18px]" />
- Back to editor
- </Button>
+ <SidebarCards />
<Button
variant="ghost"
className={navClass(section === "settings")}
diff --git a/src/components/video-editor/dashboard/ProjectCard.tsx b/src/components/video-editor/dashboard/ProjectCard.tsx
index 84ae90dd..22688065 100644
--- a/src/components/video-editor/dashboard/ProjectCard.tsx
+++ b/src/components/video-editor/dashboard/ProjectCard.tsx
@@ -1,3 +1,4 @@
+import { ProjectFolderChips } from "./ProjectFolderChips";
import { RawThumbnail } from "./RawRecordings";
import { AccountAvatar } from "@/components/ui/account-avatar";
import { Dropdown } from "@heroui/react";
@@ -148,44 +149,11 @@ export function ProjectCard({
day: "numeric",
})}
</p>
- <div
- aria-label={`Folders for ${entry.name}`}
- className="flex min-w-0 flex-1 items-center gap-1.5"
- >
- {assignedFolders.slice(0, 1).map((item) => (
- <Button
- key={item.id}
- variant="ghost"
- size="sm"
- aria-label={`Remove ${entry.name} from ${item.name}`}
- title={item.name}
- onClick={() => assignFolder(entry.path, item.id)}
- className="h-6 min-w-0 max-w-28 shrink gap-1.5 rounded-full bg-default/40 px-2.5 text-[11px]"
- >
- <FolderSimple
- weight="fill"
- className="size-3 shrink-0"
- style={{ color: item.color }}
- />
- <span className="truncate">{item.name}</span>
- </Button>
- ))}
- {assignedFolders.length > 1 && (
- <span
- className="shrink-0 text-[11px] text-muted-foreground"
- aria-label={`${assignedFolders.length - 1} more folders: ${assignedFolders
- .slice(1)
- .map((item) => item.name)
- .join(", ")}`}
- title={assignedFolders
- .slice(1)
- .map((item) => item.name)
- .join(", ")}
- >
- +{assignedFolders.length - 1}
- </span>
- )}
- </div>
+ <ProjectFolderChips
+ folders={assignedFolders}
+ name={entry.name}
+ onRemove={(id) => assignFolder(entry.path, id)}
+ />
<Dropdown>
<Button
variant="ghost"
diff --git a/src/components/video-editor/dashboard/ProjectFolderChips.tsx b/src/components/video-editor/dashboard/ProjectFolderChips.tsx
new file mode 100644
index 00000000..b34b769d
--- /dev/null
+++ b/src/components/video-editor/dashboard/ProjectFolderChips.tsx
@@ -0,0 +1,101 @@
+import { useLayoutEffect, useRef, useState } from "react";
+import { Button } from "@/components/ui/button";
+import { FolderSimple } from "@/components/ui/icons";
+
+type Folder = { id: string; name: string; color: string };
+export function ProjectFolderChips({
+ folders,
+ name,
+ onRemove,
+}: {
+ folders: Folder[];
+ name: string;
+ onRemove: (id: string) => void;
+}) {
+ const host = useRef<HTMLDivElement>(null);
+ const measurement = useRef<HTMLDivElement>(null);
+ const counter = useRef<HTMLSpanElement>(null);
+ const [visible, setVisible] = useState(folders.length);
+ useLayoutEffect(() => {
+ let active = true;
+ const measure = () => {
+ if (!active || !host.current || !measurement.current) return;
+ const widths = Array.from(
+ measurement.current.children,
+ (node) => node.getBoundingClientRect().width,
+ );
+ const available = host.current.clientWidth;
+ let count = folders.length;
+ while (count > 1) {
+ const used =
+ widths.slice(0, count).reduce((sum, width) => sum + width, 0) +
+ Math.max(0, count - 1) * 6;
+ const more =
+ count < widths.length
+ ? (counter.current?.getBoundingClientRect().width ?? 20) + 6
+ : 0;
+ if (used + more <= available) break;
+ count -= 1;
+ }
+ setVisible(count);
+ };
+ measure();
+ const observer = new ResizeObserver(measure);
+ if (host.current) observer.observe(host.current);
+ void document.fonts.ready.then(measure);
+ return () => {
+ active = false;
+ observer.disconnect();
+ };
+ }, [folders]);
+ const chip = (folder: Folder, measuring = false) => (
+ <Button
+ key={folder.id}
+ variant="ghost"
+ size="sm"
+ tabIndex={measuring ? -1 : undefined}
+ aria-label={`Remove ${name} from ${folder.name}`}
+ title={folder.name}
+ onClick={measuring ? undefined : () => onRemove(folder.id)}
+ className="h-6 min-w-0 max-w-28 shrink gap-1.5 rounded-full bg-default/40 px-2.5 text-[11px]"
+ >
+ <FolderSimple
+ weight="fill"
+ className="size-3 shrink-0"
+ style={{ color: folder.color }}
+ />
+ <span className="truncate">{folder.name}</span>
+ </Button>
+ );
+ const hidden = folders.slice(visible);
+ return (
+ <div
+ ref={host}
+ aria-label={`Folders for ${name}`}
+ className="relative flex min-w-0 flex-1 items-center gap-1.5"
+ >
+ {folders.slice(0, visible).map((folder) => chip(folder))}
+ {hidden.length > 0 && (
+ <span
+ className="shrink-0 text-[11px] text-muted-foreground"
+ aria-label={`${hidden.length} more folders: ${hidden.map((folder) => folder.name).join(", ")}`}
+ title={hidden.map((folder) => folder.name).join(", ")}
+ >
+ +{hidden.length}
+ </span>
+ )}
+ <div
+ aria-hidden="true"
+ inert
+ className="pointer-events-none invisible absolute left-0 top-0 h-0 w-0 overflow-hidden"
+ >
+ <div ref={measurement} className="flex w-max gap-1.5">
+ {folders.map((folder) => chip(folder, true))}
+ </div>
+ <span ref={counter} className="text-[11px]">
+ +{folders.length}
+ </span>
+ </div>
+ </div>
+ );
+}
diff --git a/src/components/video-editor/dashboard/SidebarCards.tsx b/src/components/video-editor/dashboard/SidebarCards.tsx
new file mode 100644
index 00000000..d5a581b5
--- /dev/null
+++ b/src/components/video-editor/dashboard/SidebarCards.tsx
@@ -0,0 +1,64 @@
+import { Card } from "@heroui/react";
+import { Button } from "@/components/ui/button";
+import { toast } from "@/components/ui/toast";
+import { sidebarCardConfig } from "./sidebarCardConfig";
+
+export function SidebarCards() {
+ if (!sidebarCardConfig.enabled || sidebarCardConfig.cards.length === 0) return null;
+ return (
+ <div
+ aria-label="Sidebar announcements"
+ className="mb-4 max-h-[35vh] space-y-3 overflow-y-auto"
+ >
+ {sidebarCardConfig.cards.map((card) => (
+ <Card key={card.id} className="gap-3 overflow-hidden p-3 shadow-none">
+ {card.image && (
+ <img
+ src={
+ /^(https?:|data:)/.test(card.image)
+ ? card.image
+ : `${import.meta.env.BASE_URL}${card.image}`
+ }
+ alt={card.imageAlt ?? ""}
+ className="aspect-video w-full rounded-lg object-cover"
+ />
+ )}
+ <Card.Header className="gap-1 p-0">
+ <Card.Title className="text-[13px]">{card.heading}</Card.Title>
+ {card.subheading && (
+ <Card.Description className="text-xs">
+ {card.subheading}
+ </Card.Description>
+ )}
+ </Card.Header>
+ {card.paragraph && (
+ <Card.Content className="p-0 text-xs leading-relaxed text-muted">
+ {card.paragraph}
+ </Card.Content>
+ )}
+ {card.href && (
+ <Card.Footer className="p-0">
+ <Button
+ size="sm"
+ variant="secondary"
+ onClick={() =>
+ void window.electronAPI
+ .openExternalUrl(card.href!)
+ .then((result) => {
+ if (!result.success)
+ throw new Error(
+ result.error || "Could not open link",
+ );
+ })
+ .catch((error) => toast.error(String(error)))
+ }
+ >
+ {card.linkLabel ?? "Learn more"}
+ </Button>
+ </Card.Footer>
+ )}
+ </Card>
+ ))}
+ </div>
+ );
+}
diff --git a/src/components/video-editor/dashboard/sidebarCardConfig.ts b/src/components/video-editor/dashboard/sidebarCardConfig.ts
new file mode 100644
index 00000000..05b2e882
--- /dev/null
+++ b/src/components/video-editor/dashboard/sidebarCardConfig.ts
@@ -0,0 +1,25 @@
+export type SidebarCard = {
+ id: string;
+ image?: string;
+ imageAlt?: string;
+ heading: string;
+ subheading?: string;
+ paragraph?: string;
+ href?: string;
+ linkLabel?: string;
+};
+
+/** Code-only sidebar content. Empty cards or enabled:false hides this area. */
+export const sidebarCardConfig: { enabled: boolean; cards: SidebarCard[] } = {
+ enabled: true,
+ cards: [
+ {
+ id: "placeholder",
+ image: "announcements/placeholder-1.svg",
+ imageAlt: "Placeholder banner",
+ heading: "Coming soon",
+ subheading: "News from Recordly",
+ paragraph: "A place for updates, tips, and announcements.",
+ },
+ ],
+};
diff --git a/src/components/video-editor/layout/EditorHeader.tsx b/src/components/video-editor/layout/EditorHeader.tsx
index 1099ad50..18ec37b8 100644
--- a/src/components/video-editor/layout/EditorHeader.tsx
+++ b/src/components/video-editor/layout/EditorHeader.tsx
@@ -1,5 +1,6 @@
import {
House,
+ FilmStrip,
ArrowClockwise as Redo2,
ArrowCounterClockwise as Undo2,
} from "@/components/ui/icons";
@@ -19,6 +20,8 @@ import { EditorPresetMenu } from "./EditorPresetMenu";
const SHOW_PRESETS_BUTTON = false;
type Props = {
+ clipsOpen: boolean;
+ onToggleClips: () => void;
t: ReturnType<typeof useI18n>["t"];
headerLeftControlsPaddingClass: string;
project: ReturnType<typeof useProjectState>;
@@ -105,6 +108,16 @@ export function EditorHeader(props: Props) {
className={`editor-header-start flex min-w-0 items-center gap-1 ${headerLeftControlsPaddingClass}`}
style={{ WebkitAppRegion: "no-drag" } as CSSProperties}
>
+ <Button
+ variant="secondary"
+ size="sm"
+ className="mr-2 h-9 shrink-0 gap-2"
+ aria-expanded={props.clipsOpen}
+ onClick={props.onToggleClips}
+ >
+ <FilmStrip weight={props.clipsOpen ? "fill" : "regular"} className="size-4" />
+ Clips
+ </Button>
<Button
ref={projectBrowserTriggerRef}
type="button"
diff --git a/src/components/video-editor/layout/EditorShell.tsx b/src/components/video-editor/layout/EditorShell.tsx
index 0b3c3949..9b3c7845 100644
--- a/src/components/video-editor/layout/EditorShell.tsx
+++ b/src/components/video-editor/layout/EditorShell.tsx
@@ -239,6 +239,8 @@ export function EditorShell(props: Props) {
return (
<div className="flex h-screen flex-col overflow-hidden bg-editor-bg text-foreground selection:bg-accent/20">
<EditorHeader
+ clipsOpen={library.open}
+ onToggleClips={() => library.setOpen((open) => !open)}
t={t}
headerLeftControlsPaddingClass={headerLeftControlsPaddingClass}
project={project}
diff --git a/src/components/video-editor/layout/EditorSidebar.tsx b/src/components/video-editor/layout/EditorSidebar.tsx
index edee811e..207c2a08 100644
--- a/src/components/video-editor/layout/EditorSidebar.tsx
+++ b/src/components/video-editor/layout/EditorSidebar.tsx
@@ -88,10 +88,10 @@ export function EditorSidebar({
}}
>
<Tooltip>
- <ToggleButton id="videos" variant="ghost" isIconOnly aria-label="Videos">
+ <ToggleButton id="videos" variant="ghost" isIconOnly aria-label="Clips">
<File weight={panelContent ? "fill" : "regular"} className="size-5" />
</ToggleButton>
- <Tooltip.Content placement="right">Videos</Tooltip.Content>
+ <Tooltip.Content placement="right">Clips</Tooltip.Content>
</Tooltip>
{sections.map((section) => (
<Tooltip key={section.id}>
@@ -128,7 +128,7 @@ export function EditorSidebar({
</Tooltip>
</nav>
<aside
- aria-label={panelContent ? "Videos" : undefined}
+ aria-label={panelContent ? "Clips" : undefined}
className="editor-inspector [--text-sm:0.8125rem] [--text-base:0.8125rem] flex w-[320px] min-h-0 flex-col"
>
<Card className="min-h-0 flex-1 gap-0 overflow-hidden p-0">
diff --git a/src/components/video-editor/library/RecordingLibraryPanel.tsx b/src/components/video-editor/library/RecordingLibraryPanel.tsx
index c68521f8..43ab0b00 100644
--- a/src/components/video-editor/library/RecordingLibraryPanel.tsx
+++ b/src/components/video-editor/library/RecordingLibraryPanel.tsx
@@ -43,7 +43,7 @@ export function RecordingLibraryPanel({
<section
ref={panelRef}
tabIndex={-1}
- aria-label="Videos library"
+ aria-label="Clips library"
data-recording-library
className="outline-none flex min-h-0 flex-1 flex-col"
onKeyDown={(event) => {
@@ -74,18 +74,18 @@ export function RecordingLibraryPanel({
}}
>
<header className="flex min-h-14 shrink-0 items-center gap-2 px-5 py-3">
- <h2 className="flex-1 text-[14px] font-semibold">Videos</h2>
+ <h2 className="flex-1 text-[14px] font-semibold">Clips</h2>
<Dropdown>
<HeroButton
isIconOnly
variant="ghost"
size="sm"
- aria-label="Video library actions"
+ aria-label="Clip library actions"
>
<DotsThree className="size-5" />
</HeroButton>
<Dropdown.Popover placement="bottom end">
- <Dropdown.Menu aria-label="Video library actions">
+ <Dropdown.Menu aria-label="Clip library actions">
<Dropdown.Item
id="folder"
textValue="Open recordings folder"
@@ -115,7 +115,7 @@ export function RecordingLibraryPanel({
variant="ghost"
size="icon"
className="size-7"
- aria-label="Close Videos"
+ aria-label="Close Clips"
onClick={() => library.setOpen(false)}
>
<X />
diff --git a/src/components/video-editor/videoPlayback/zoomAnimation.test.ts b/src/components/video-editor/videoPlayback/zoomAnimation.test.ts
index 7bb98443..dc31d496 100644
--- a/src/components/video-editor/videoPlayback/zoomAnimation.test.ts
+++ b/src/components/video-editor/videoPlayback/zoomAnimation.test.ts
@@ -11,6 +11,7 @@ import {
type SpringState,
stepSpringValue,
} from "./motionSmoothing";
+import { TRANSITION_WINDOW_MS, ZOOM_IN_TRANSITION_WINDOW_MS } from "./constants";
import { computeRegionStrength, findDominantRegion } from "./zoomRegionUtils";
// ---------------------------------------------------------------------------
@@ -332,12 +333,46 @@ describe("computeRegionStrength", () => {
it("falls smoothly during zoom-out", () => {
// Sample the zoom-out ramp after the animation delay.
- const zoomOutStart = region.endMs - 150;
+ const zoomOutStart = region.endMs - 500;
const s = computeRegionStrength(region, zoomOutStart + 700);
expect(s).toBeGreaterThan(0);
expect(s).toBeLessThan(1);
});
+ it("removes 500ms of hold without changing either ramp", () => {
+ const entranceStart = region.startMs + 1000 - ZOOM_IN_TRANSITION_WINDOW_MS + 500;
+ const exitStart = region.endMs - 500;
+ for (const fraction of [0, 0.25, 0.5, 0.75, 1]) {
+ expect(
+ computeRegionStrength(
+ region,
+ entranceStart + fraction * ZOOM_IN_TRANSITION_WINDOW_MS,
+ ),
+ ).toBeCloseTo(easeOutZoom(fraction));
+ expect(
+ computeRegionStrength(region, exitStart + fraction * TRANSITION_WINDOW_MS),
+ ).toBeCloseTo(1 - easeOutZoom(fraction));
+ }
+ expect(computeRegionStrength(region, exitStart - 1)).toBe(1);
+ });
+
+ it("only removes the available hold for short blocks", () => {
+ const short = { ...region, endMs: 3700 };
+ // The original 200ms plateau is removed; neither ramp is shortened.
+ expect(computeRegionStrength(short, 3500)).toBe(1);
+ expect(computeRegionStrength(short, 3500 + TRANSITION_WINDOW_MS / 2)).toBeCloseTo(
+ 1 - easeOutZoom(0.5),
+ );
+ });
+
+ it("uses the shortened exit for the final zoom in a connected sequence", () => {
+ const first = { ...region, id: "first", startMs: 0, endMs: 2000 };
+ const time = region.endMs - 500 + TRANSITION_WINDOW_MS / 2;
+ expect(
+ findDominantRegion([first, region], time, { connectZooms: true }).strength,
+ ).toBeCloseTo(1 - easeOutZoom(0.5));
+ });
+
it("shifts zoom timing when custom durations are provided", () => {
const defaultStrength = computeRegionStrength(region, region.startMs);
const fasterStrength = computeRegionStrength(region, region.startMs, {
diff --git a/src/components/video-editor/videoPlayback/zoomRegionUtils.ts b/src/components/video-editor/videoPlayback/zoomRegionUtils.ts
index 4f3100fc..51224bc2 100644
--- a/src/components/video-editor/videoPlayback/zoomRegionUtils.ts
+++ b/src/components/video-editor/videoPlayback/zoomRegionUtils.ts
@@ -13,6 +13,7 @@ const CONNECTED_ZOOM_PAN_DURATION_MS = 1000;
const ZOOM_IN_OVERLAP_MS = 1000;
// Playback offset relative to timeline blocks; positive values delay the animation.
const ZOOM_ANIMATION_DELAY_MS = 500;
+const ZOOM_HOLD_REDUCTION_MS = 500;
type DominantRegionOptions = {
connectZooms?: boolean;
@@ -35,14 +36,12 @@ type ConnectedPanTransition = {
endScale: number;
};
-export function computeRegionStrength(
+function getRegionTiming(
region: ZoomRegion,
- timeMs: number,
options: Pick<DominantRegionOptions, "zoomInDurationMs" | "zoomOutDurationMs"> = {},
) {
const zoomInDurationMs = Math.max(1, options.zoomInDurationMs ?? ZOOM_IN_TRANSITION_WINDOW_MS);
const zoomOutDurationMs = Math.max(1, options.zoomOutDurationMs ?? TRANSITION_WINDOW_MS);
- const adjustedTimeMs = timeMs - ZOOM_ANIMATION_DELAY_MS;
const leadInStart = region.startMs + ZOOM_IN_OVERLAP_MS - ZOOM_IN_TRANSITION_WINDOW_MS;
let zoomOutStart = region.endMs - ZOOM_OUT_EARLY_START_MS;
let zoomInEnd = leadInStart + zoomInDurationMs;
@@ -53,6 +52,19 @@ export function computeRegionStrength(
zoomOutStart = midpoint;
}
+ // Consume only the plateau: keep both animation durations and the entrance fixed.
+ zoomOutStart = Math.max(zoomInEnd, zoomOutStart - ZOOM_HOLD_REDUCTION_MS);
+ return { leadInStart, zoomInEnd, zoomOutStart, zoomInDurationMs, zoomOutDurationMs };
+}
+
+export function computeRegionStrength(
+ region: ZoomRegion,
+ timeMs: number,
+ options: Pick<DominantRegionOptions, "zoomInDurationMs" | "zoomOutDurationMs"> = {},
+) {
+ const { leadInStart, zoomInEnd, zoomOutStart, zoomInDurationMs, zoomOutDurationMs } =
+ getRegionTiming(region, options);
+ const adjustedTimeMs = timeMs - ZOOM_ANIMATION_DELAY_MS;
const leadOutEnd = zoomOutStart + zoomOutDurationMs;
if (adjustedTimeMs < leadInStart || adjustedTimeMs > leadOutEnd) {
@@ -116,8 +128,7 @@ function getActiveRegion(
}
const zoomOutStart =
- outgoingPair.currentRegion.endMs -
- ZOOM_OUT_EARLY_START_MS +
+ getRegionTiming(outgoingPair.currentRegion, options).zoomOutStart +
ZOOM_ANIMATION_DELAY_MS;
if (timeMs >= zoomOutStart) {
return { region, strength: 1 };
@@ -131,8 +142,7 @@ function getActiveRegion(
}
const nextRegionZoomOutStart =
- incomingPair.nextRegion.endMs -
- ZOOM_OUT_EARLY_START_MS +
+ getRegionTiming(incomingPair.nextRegion, options).zoomOutStart +
ZOOM_ANIMATION_DELAY_MS;
if (timeMs < nextRegionZoomOutStart) {
return { region, strength: 1 };
diff --git a/tests/ui/project-dashboard.spec.ts b/tests/ui/project-dashboard.spec.ts
index 388bad36..21454998 100644
--- a/tests/ui/project-dashboard.spec.ts
+++ b/tests/ui/project-dashboard.spec.ts
@@ -137,7 +137,8 @@ test("home dashboard explains an empty library", async ({ page }) => {
await page.goto("/?windowType=editor");
await page.getByRole("button", { name: "Home", exact: true }).click();
await expect(page.getByText("No projects yet")).toBeVisible();
- await page.getByRole("button", { name: "Back to editor" }).click();
+ await expect(page.getByRole("button", { name: "Back to editor" })).toHaveCount(0);
+ await page.keyboard.press("Escape");
await expect(page.getByRole("button", { name: "Rename project" })).toBeVisible();
});
@@ -326,8 +327,8 @@ test("dashboard supports creation sort, independent folders, shared settings and
});
});
await page.goto("/?windowType=editor");
- await page.getByRole("radio", { name: "Videos", exact: true }).click();
- await expect(page.getByRole("complementary", { name: "Videos" })).toBeVisible();
+ await page.getByRole("radio", { name: "Clips", exact: true }).click();
+ await expect(page.getByRole("complementary", { name: "Clips" })).toBeVisible();
await page.getByRole("button", { name: "Home", exact: true }).click();
const home = page.getByRole("dialog", { name: "Projects dashboard" });
await expect(home.getByLabel("Announcements", { exact: true })).toHaveCount(0);
@@ -339,7 +340,8 @@ test("dashboard supports creation sort, independent folders, shared settings and
await home.getByRole("button", { name: "Add folder to Old" }).click();
await page.getByRole("menuitem", { name: "Personal", exact: true }).click();
await expect(home.getByRole("button", { name: "Remove Old from Work" })).toBeVisible();
- await expect(home.locator('[aria-label="1 more folders: Personal"]')).toBeVisible();
+ await expect(home.getByRole("button", { name: "Remove Old from Personal" })).toBeVisible();
+ await expect(home.locator('[aria-label="1 more folders: Personal"]')).toHaveCount(0);
const membership = await page.evaluate(() =>
JSON.parse(localStorage.getItem("recordly.project-folders.v1") || "[]"),
);
@@ -433,7 +435,7 @@ test("Solar navigation selection, circular initials, and Raw sources are consist
});
await page.goto("/?windowType=editor");
const scene = page.getByRole("radio", { name: "Scene", exact: true });
- const videos = page.getByRole("radio", { name: "Videos", exact: true });
+ const videos = page.getByRole("radio", { name: "Clips", exact: true });
await expect(scene).toBeChecked();
await expect(scene.locator("svg")).toHaveAttribute("data-icon-style", "bold");
await videos.click();
@@ -650,8 +652,67 @@ test("folder actions stay inside narrow project cards without clipping", async (
});
expect(bounds).toEqual({ inside: true, fullWidth: true, reachable: true });
}
+ await card.evaluate((element) => {
+ element.style.width = "600px";
+ });
+ await expect(
+ card.getByRole("button", { name: "Remove Project 1 from Work", exact: true }),
+ ).toBeVisible();
+ await expect(card.locator('[aria-label="1 more folders: Work"]')).toHaveCount(0);
+ await card.evaluate((element) => {
+ element.style.width = "340px";
+ });
+ await expect(card.locator('[aria-label="1 more folders: Work"]')).toBeVisible();
await add.click();
await expect(page.getByRole("menuitem", { name: "Work", exact: true })).toBeVisible();
await page.keyboard.press("Escape");
await page.screenshot({ path: "test-results/folder-actions.png", animations: "disabled" });
});
+
+test("sidebar cards, separate Import, and shortcut settings use the dashboard flow", async ({
+ page,
+}) => {
+ await installDesktopBridge(page);
+ await page.goto("/?windowType=editor");
+ await page.getByRole("button", { name: "Home", exact: true }).click();
+ const home = page.getByRole("dialog", { name: "Projects dashboard" });
+ const sidebar = home.getByRole("complementary", { name: "Library navigation" });
+ await expect(sidebar.getByRole("button", { name: "Import", exact: true })).toHaveCount(0);
+ const banner = sidebar.getByRole("img", { name: "Placeholder banner" });
+ await expect
+ .poll(() => banner.evaluate((image: HTMLImageElement) => image.naturalWidth))
+ .toBeGreaterThan(0);
+ const settings = sidebar.getByRole("button", { name: "Settings", exact: true });
+ expect((await banner.boundingBox())!.y).toBeLessThan((await settings.boundingBox())!.y);
+ const importButton = home.getByRole("button", { name: "Import", exact: true });
+ const all = home.getByRole("button", { name: "All", exact: true });
+ expect(
+ Math.abs((await importButton.boundingBox())!.y - (await all.boundingBox())!.y),
+ ).toBeLessThan(2);
+ expect(await all.evaluate((element) => element.parentElement!.textContent)).not.toContain(
+ "Import",
+ );
+ await settings.click();
+ await home.getByRole("button", { name: "Customize", exact: true }).click();
+ const shortcuts = page.getByRole("dialog", { name: "Keyboard Shortcuts", exact: true });
+ await expect(shortcuts).toBeVisible();
+ const change = shortcuts.getByRole("button", { name: "Change Add Zoom shortcut", exact: true });
+ await change.click();
+ await page.keyboard.press("j");
+ await expect(change).toHaveText("J");
+ await shortcuts.getByRole("button", { name: "Save", exact: true }).scrollIntoViewIfNeeded();
+ await page.screenshot({ path: "test-results/dashboard-shortcuts.png", animations: "disabled" });
+ await shortcuts.getByRole("button", { name: "Save", exact: true }).click();
+ await expect(shortcuts).not.toBeVisible();
+ await home.getByRole("button", { name: "Customize", exact: true }).click();
+ await expect(change).toHaveText("J");
+ await page.setViewportSize({ width: 800, height: 600 });
+ await expect(shortcuts.getByRole("button", { name: "Save", exact: true })).toBeInViewport();
+ await expect(
+ shortcuts.getByRole("heading", { name: "Keyboard Shortcuts", exact: true }),
+ ).toBeInViewport();
+ await page.screenshot({
+ path: "test-results/dashboard-shortcuts-compact.png",
+ animations: "disabled",
+ });
+});
diff --git a/tests/ui/videos-library.spec.ts b/tests/ui/videos-library.spec.ts
index 1fc9627b..9829a64d 100644
--- a/tests/ui/videos-library.spec.ts
+++ b/tests/ui/videos-library.spec.ts
@@ -53,17 +53,17 @@ async function setup(page: Page) {
});
await expect(page.locator('[data-variant="clip"] img').first()).toBeVisible();
await expect(page.getByLabel("Loading preview")).toHaveCount(0);
- await page.getByRole("button", { name: "Videos", exact: true }).click();
+ await page.getByRole("button", { name: "Clips", exact: true }).click();
await expect(page.getByLabel("Select first.mp4")).toBeVisible();
}
-test("Videos supports selection, remove all, undo and real timeline drag insertion", async ({
+test("Clips supports selection, remove all, undo and real timeline drag insertion", async ({
page,
}) => {
const errors: string[] = [];
page.on("pageerror", (error) => errors.push(error.message));
await setup(page);
- const panel = page.getByRole("complementary", { name: "Videos" });
+ const panel = page.getByRole("complementary", { name: "Clips" });
await expect(panel.locator("video")).toHaveCount(0);
await expect(panel.getByRole("img", { name: "Preview of first.mp4" })).toBeVisible();
await expect
@@ -74,7 +74,7 @@ test("Videos supports selection, remove all, undo and real timeline drag inserti
)
.toBeGreaterThan(0);
await expect(panel.getByText("first.mp4", { exact: true })).toBeVisible();
- const videosButton = page.getByRole("button", { name: "Videos", exact: true });
+ const videosButton = page.getByRole("button", { name: "Clips", exact: true });
expect((await videosButton.boundingBox())!.x).toBeLessThan(
(await page.getByRole("button", { name: "Home", exact: true }).boundingBox())!.x,
);
@@ -88,7 +88,7 @@ test("Videos supports selection, remove all, undo and real timeline drag inserti
await expect(page.getByLabel("Select first.mp4")).toHaveCount(0);
await page.keyboard.press("Meta+z");
await expect(page.getByLabel("Select first.mp4")).toBeVisible();
- await panel.getByRole("button", { name: "Video library actions", exact: true }).click();
+ await panel.getByRole("button", { name: "Clip library actions", exact: true }).click();
await page.getByRole("menuitem", { name: "Move all to Trash", exact: true }).click();
await expect(panel.getByText("Your recordings appear here")).toBeVisible();
await page.keyboard.press("Control+z");
@@ -192,7 +192,7 @@ test("preview recovers once when a local video URL fails to load", async ({ page
await expect(page.getByText(/Failed to load video/)).toHaveCount(0);
});
-test("HUD project list fits its popover and scrolls only vertically", async ({ page }) => {
+test("dashboard project list scrolls vertically with long names", async ({ page }) => {
await page.setViewportSize({ width: 980, height: 600 });
await installDesktopBridge(page);
await installDesktopBridgeOverrides(page, () => {
@@ -209,21 +209,16 @@ test("HUD project list fits its popover and scrolls only vertically", async ({ p
})),
});
});
- await page.goto("/?windowType=hud-overlay");
- await page.getByRole("button", { name: /More/ }).click();
- await page
- .getByRole("dialog", { name: "Options" })
- .getByRole("button", { name: "Open project", exact: true })
- .click();
- const entry = page.getByRole("button", { name: /An extremely long project/ });
+ await page.goto("/?windowType=editor");
+ await page.getByRole("button", { name: "Home", exact: true }).click();
+ const home = page.getByRole("dialog", { name: "Projects dashboard" });
+ const entry = home.getByRole("button", { name: /^An extremely long project/ });
await expect(entry).toHaveCount(30);
- const content = entry.first().locator("xpath=../..");
+ const content = home.getByRole("main");
expect(await content.evaluate((node) => node.scrollWidth <= node.clientWidth)).toBe(true);
- expect(await content.evaluate((node) => getComputedStyle(node).overflowX)).toBe("hidden");
- expect(await content.evaluate((node) => getComputedStyle(node).scrollbarWidth)).toBe("thin");
await entry.last().scrollIntoViewIfNeeded();
- await expect(entry.last()).toBeVisible();
- await page.screenshot({ path: "test-results/hud-projects-vertical.png" });
+ await expect(entry.last()).toBeInViewport();
+ await page.screenshot({ path: "test-results/dashboard-projects-vertical.png" });
});
test("HUD source controls have no default gray fill or outline", async ({ page }) => {
@@ -244,7 +239,7 @@ test("HUD source controls have no default gray fill or outline", async ({ page }
await expect(row).toHaveCSS("background-color", "rgba(0, 0, 0, 0)");
});
-test("Videos shows original filenames and truncates long names beside real still previews", async ({
+test("Clips shows original filenames and truncates long names beside real still previews", async ({
page,
}) => {
await setup(page);
@@ -263,10 +258,10 @@ test("Videos shows original filenames and truncates long names beside real still
})),
});
});
- const toggle = page.getByRole("button", { name: "Videos", exact: true });
+ const toggle = page.getByRole("button", { name: "Clips", exact: true });
await toggle.click();
await toggle.click();
- const panel = page.getByRole("complementary", { name: "Videos" });
+ const panel = page.getByRole("complementary", { name: "Clips" });
await expect(panel.getByText("recording-1789866953739.mp4", { exact: true })).toBeVisible();
const name = panel.getByText("client-onboarding-walkthrough-with-a-very-long-file-name.mp4", {
exact: true,
@@ -306,7 +301,7 @@ for (const enabled of [true, false]) {
}, enabled);
await page.reload();
await expect(page.locator('[data-variant="clip"]')).toHaveCount(1);
- await page.getByRole("button", { name: "Videos", exact: true }).click();
+ await page.getByRole("button", { name: "Clips", exact: true }).click();
await page.evaluate(() => {
let count = 0;
window.electronAPI.importRecording = async (current, path) => {
@@ -333,7 +328,7 @@ for (const enabled of [true, false]) {
],
});
});
- const panel = page.getByRole("complementary", { name: "Videos" });
+ const panel = page.getByRole("complementary", { name: "Clips" });
await panel.locator('[data-slot="checkbox-control"]').first().click();
await expect(page.getByLabel("Select first.mp4")).toBeChecked();
await expect(page.getByLabel("Select second.mp4")).toBeChecked();
@@ -390,7 +385,7 @@ test("cancelling a batch keeps completed clips and stops the remaining import",
return { success: true };
};
});
- const panel = page.getByRole("complementary", { name: "Videos" });
+ const panel = page.getByRole("complementary", { name: "Clips" });
await panel.locator('[data-slot="checkbox-control"]').first().click();
await panel
.locator('[data-recording-path="/recordings/second.mp4"]')