LiveCodes editor themes#987
Conversation
✅ Deploy Preview for livecodes ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
|
Size Change: +9.19 kB (+0.85%) Total Size: 1.1 MB 📦 View Changed
ℹ️ View Unchanged
|
WalkthroughThe PR adds two new built-in themes—livecodes-dark and livecodes-light—across the three supported code editors. Type definitions are updated to permit the new theme names, then CodeJar, CodeMirror, and Monaco each receive corresponding CSS or styling definitions, theme registrations, and default fallback mappings. ChangesNew editor themes
🎯 2 (Simple) | ⏱️ ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/livecodes/editor/codemirror/codemirror-themes.ts`:
- Line 460: Replace the typo'd selector string '& tube > li[aria-selected]' in
the light-theme CSS block with the correct selector '& > ul > li[aria-selected]'
so the autocomplete widget selection styling matches the dark theme; locate the
selector within the Codemirror theme object in codemirror-themes.ts (the same
block that mirrors the dark-theme rules around the earlier section) and update
the selector to '& > ul > li[aria-selected]'.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 9b3f3961-86f3-4d51-aba5-dfb6197a7081
📒 Files selected for processing (7)
src/livecodes/editor/codejar/codejar.tssrc/livecodes/editor/codejar/prism-themes.tssrc/livecodes/editor/codemirror/codemirror-themes.tssrc/livecodes/editor/codemirror/codemirror.tssrc/livecodes/editor/monaco/monaco-themes.tssrc/livecodes/editor/monaco/monaco.tssrc/sdk/models.ts
| backgroundColor: '#ffffff', | ||
| }, | ||
| '.cm-tooltip-autocomplete': { | ||
| '& tube > li[aria-selected]': { |
There was a problem hiding this comment.
Fix CSS selector typo.
The selector '& tube > li[aria-selected]' contains a typo. It should be '& > ul > li[aria-selected]' to match the autocomplete list structure (consistent with the dark theme at Line 354).
This typo will prevent the autocomplete widget from applying the correct selection background color in light theme.
🐛 Proposed fix
'.cm-tooltip-autocomplete': {
- '& tube > li[aria-selected]': {
+ '& > ul > li[aria-selected]': {
backgroundColor: '`#0073a81f`',
color: '`#0a2433`',
},📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| '& tube > li[aria-selected]': { | |
| '.cm-tooltip-autocomplete': { | |
| '& > ul > li[aria-selected]': { | |
| backgroundColor: '`#0073a81f`', | |
| color: '`#0a2433`', | |
| }, |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/livecodes/editor/codemirror/codemirror-themes.ts` at line 460, Replace
the typo'd selector string '& tube > li[aria-selected]' in the light-theme CSS
block with the correct selector '& > ul > li[aria-selected]' so the autocomplete
widget selection styling matches the dark theme; locate the selector within the
Codemirror theme object in codemirror-themes.ts (the same block that mirrors the
dark-theme rules around the earlier section) and update the selector to '& > ul
> li[aria-selected]'.


What type of PR is this? (check all applicable)
Description
This PR adds editor themes for monaco, codemirror and codejar (prism) that are similar to each other and consistent with the new brand colors, with dark and light variants
Related Tickets & Documents
Mobile & Desktop Screenshots/Recordings
Summary by CodeRabbit
Release Notes