feat(editor): turn on roundness, shadow and motion blur by default - #273
Merged
Conversation
The wallpaper and a 50% padding were already on out of the box, but roundness, shadow and motion blur all defaulted to 0. The result was a hard-edged rectangle pasted onto a decorative background: the padding looked like wasted space rather than a deliberate margin, which is what issue #271 reported before blaming the padding for it. Ship the rest of the look instead of removing the half that was there: roundness 40px, shadow 20%, motion blur 20% (values picked on Windows). Padding stays at 50. Projects where the user already moved one of these sliders keep their value -- `legacyEditor` only stores keys that were explicitly patched -- so only projects that never touched them pick up the new look. Closes #271
📝 WalkthroughWalkthroughThe editor now defaults to nonzero shadow intensity, motion blur, and border radius. Mounted editor defaults document synchronization with shared settings. Tests use the shared shadow default. ChangesEditor appearance defaults
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #271 — by doing the opposite of what it asked, and here is why.
The defaults were internally inconsistent
wallpaper1.jpg(on)50→ content block at 80% of the frame#271 argues on friction: the padding is one more slider to reset on every new project. But a neutral default isn't the direction here — the point is that the app hands you the best-looking result without you opening the effects panel at all. Today it doesn't quite: we ship a decorative background and a margin, then draw the recording into it as a hard-edged rectangle with no shadow. That is half a composition.
Setting padding to 0 would also hide the wallpaper completely behind the screen, i.e. remove the background feature by way of a default. So this PR ships the missing half instead of dropping the half we had.
Values
Picked by eye on Windows: roundness 40px, shadow 20%, motion blur 20%. The rendering reference already assumed non-zero roundness —
NATIVE_SCREEN_BASE_RADIUS_PXinsrc/native/paramUnits.tsis documented as "the fixture's screen corner radius", and the compositor goldens render withshadowwell above 0. Only the app shipped zeros.Existing projects
legacyEditoris a sparse store:patchEditorSettingsonly writes keys the user actually changed. So a project where someone moved the roundness slider keeps its value, while a project that never touched these picks up the new look on reopen. That is deliberate — the point of an opinionated default is that people who never opened the panel get the better result.Testing
vitest --runon the affected suites: 229 passed (editorSettings,migrate,editorDefaults,projectPersistence,sceneDescription,nativeCompositorStore,compositeLayout,WebcamOverlay).electron/recording/webm-seek-index.test.ts(identical with and without this change).tsc -p tsconfig.test.json --noEmitandbiome checkclean.Two assertions in
editorSettings.test.tshardcoded0where they meant "the default"; they now referenceDEFAULT_EDITOR_SETTINGS.Follow-up, not in this PR
The legitimate need behind #271 — a flush, full-frame output to embed in a doc — deserves a one-click "Full frame" preset. There is no effects preset mechanism today, only webcam layout presets. Worth its own issue if it comes up again.