Merged
Conversation
There was a problem hiding this comment.
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.darkThemeconfiguration plumbing frombook.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.
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.
No description provided.