Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/components/video-editor/editorDefaults.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ export const DEFAULT_EDITOR_APPEARANCE_SETTINGS: {
motionBlurAmount: number;
borderRadius: number;
} = {
shadowIntensity: 0,
// Keep in sync with `DEFAULT_EDITOR_SETTINGS` (lib/ai-edition/store/editorSettings.ts),
// which is what the mounted v4 shell reads — see the rationale there.
shadowIntensity: 0.2,
showBlur: false,
motionBlurAmount: 0,
borderRadius: 0,
motionBlurAmount: 0.2,
borderRadius: 40,
};

export const DEFAULT_EDITOR_LAYOUT_SETTINGS: {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/ai-edition/store/editorSettings.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe("getEditorSettings", () => {
const snap = getEditorSettings(baseDoc);
expect(snap.wallpaper).toBe(DEFAULT_EDITOR_SETTINGS.wallpaper);
expect(snap.aspectRatio).toBe("16:9");
expect(snap.shadowIntensity).toBe(0);
expect(snap.shadowIntensity).toBe(DEFAULT_EDITOR_SETTINGS.shadowIntensity);
expect(snap.showBlur).toBe(false);
expect(snap.webcamLayoutPreset).toBe(DEFAULT_WEBCAM_LAYOUT_PRESET);
expect(snap.webcamMaskShape).toBe(DEFAULT_WEBCAM_MASK_SHAPE);
Expand Down Expand Up @@ -91,7 +91,7 @@ describe("patchEditorSettings", () => {
const next = patchEditorSettings(baseDoc, { showBlur: true });
const snap = getEditorSettings(next);
expect(snap.showBlur).toBe(true);
expect(snap.shadowIntensity).toBe(0);
expect(snap.shadowIntensity).toBe(DEFAULT_EDITOR_SETTINGS.shadowIntensity);
expect(snap.cropRegion).toEqual(DEFAULT_CROP_REGION);
});

Expand Down
11 changes: 8 additions & 3 deletions src/lib/ai-edition/store/editorSettings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,15 @@ export interface EditorSettingsSnapshot {
export const DEFAULT_EDITOR_SETTINGS: EditorSettingsSnapshot = {
wallpaper: DEFAULT_WALLPAPER,
aspectRatio: "16:9",
shadowIntensity: 0,
// Opinionated by default: the wallpaper and the padding were already on, but
// with square corners and no shadow the recording read as a rectangle pasted
// onto the background rather than a window floating above it (#271 reported
// the symptom and blamed the padding). These three are the rest of that look;
// shipping the background without them was shipping half a composition.
shadowIntensity: 0.2,
showBlur: false,
motionBlurAmount: 0,
borderRadius: 0,
motionBlurAmount: 0.2,
borderRadius: 40,
padding: 50,
cropRegion: DEFAULT_CROP_REGION,
webcamLayoutPreset: DEFAULT_WEBCAM_LAYOUT_PRESET,
Expand Down
Loading