Skip to content

Custom editor theme#8

Merged
MR-Addict merged 10 commits intomainfrom
custom-editor-theme
Mar 18, 2026
Merged

Custom editor theme#8
MR-Addict merged 10 commits intomainfrom
custom-editor-theme

Conversation

@MR-Addict
Copy link
Copy Markdown
Owner

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates mdbook-repl to support configurable Ace editor themes (light/dark) passed from book.toml through the backend-generated iframe markup into the frontend editor, along with some bundling and Lua-worker adjustments.

Changes:

  • Add editor.theme / editor.darkTheme configuration plumbing from book.toml → backend HTML attributes → iframe postMessage → frontend editor theme selection.
  • Extend frontend editor/theme support (Ace theme imports, theme selection logic) and adjust Vite Rollup chunking for Ace/React-Ace.
  • Update docs/config examples and bump version to 0.2.9 (frontend + backend).

Reviewed changes

Copilot reviewed 13 out of 14 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
frontend/vite.config.ts Adds Rollup manualChunks rules to split Ace-related bundles.
frontend/src/workers/lua-worker.js Refactors Lua worker formatting and print binding; retains/introduces duplicate “finished” emission.
frontend/src/types/editor.ts Adds optional editorTheme / editorDarkTheme to editor schema.
frontend/src/contexts/AppProvider.tsx Minor formatting change in workers map (Lua worker entry).
frontend/src/components/Editor/Editor.tsx Imports many Ace themes and selects theme based on new editor fields.
frontend/package.json Bumps frontend version to 0.2.9.
docs/src/usage.md Updates configuration docs for iframe URL + editor themes; adds Lua extension entry.
docs/src/for-developers.md Updates documented embed URL (removes trailing slash).
docs/book.toml Updates docs site config example with editor theme keys and embed URL.
backend/src/repl.rs Refactors language regex building; adds replacement tokens for editor theme fields and updates default embed URL.
backend/Cargo.toml Bumps backend crate version to 0.2.9.
backend/Cargo.lock Updates lockfile version entry.
backend/assets/script.html Reads editor theme attributes and includes them in iframe init message (currently with an attribute-name mismatch).
backend/assets/repl.html Adds data-editor-theme / data-editor-dark-theme attributes to generated repl container.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread backend/assets/script.html Outdated
Comment thread backend/src/repl.rs Outdated
Comment thread frontend/src/workers/lua-worker.js
Comment thread docs/src/usage.md
Comment thread docs/src/usage.md Outdated
Comment thread frontend/src/components/Editor/Editor.tsx
@MR-Addict MR-Addict merged commit b3203c7 into main Mar 18, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants