Conversation
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Size Change: +575 B (+0.06%) Total Size: 1.02 MB
ℹ️ View Unchanged
|
WalkthroughAdds view-transition-aware theme switching: Changes
Sequence Diagram(s)mermaid Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 🧹 Recent nitpick comments
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/livecodes/core.ts`:
- Around line 1984-1992: The error comes from using document.startViewTransition
which isn't in TS DOM types; update runViewTransition to use a safe type
assertion or add a declaration so TS knows about startViewTransition. Either:
add a global interface Document declaration that defines startViewTransition?:
(cb: () => void | Promise<void>) => unknown in a .d.ts file, or change the check
in runViewTransition to cast document as any or as unknown as {
startViewTransition?: Function } before accessing startViewTransition, keeping
the existing logic in runViewTransition(fn: () => void | Promise<void>).
🧹 Nitpick comments (1)
src/livecodes/core.ts (1)
4066-4083:transitionThemeruns on every editor settings change, even when theme hasn't changed.
changeEditorSettingshandles changes like font family, editor type, etc. The view transition animation will fire even when only non-theme settings change, which adds unnecessary visual flicker. Consider guarding:♻️ Suggested guard
setUserConfig(newConfig); const updatedConfig = getConfig(); - transitionTheme(updatedConfig.theme, updatedConfig.editorTheme); + if (newConfig.theme != null || newConfig.editorTheme != null) { + transitionTheme(updatedConfig.theme, updatedConfig.editorTheme); + } else { + setTheme(updatedConfig.theme, updatedConfig.editorTheme); + }
Deploying livecodes with
|
| Latest commit: |
cb1ca63
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://f4f9a69e.livecodes.pages.dev |
| Branch Preview URL: | https://theme-transition.livecodes.pages.dev |
|



use transition animation when changing theme
Summary by CodeRabbit
New Features
Style
Chores