[Enhancement] Migrate app-language-runner playgrounds (C#/Python/JS) from CodeMirror (@acrodata/code-editor) to Monaco — feature parity #24

Closed
opened 2026-04-28 23:01:19 +00:00 by spikerj · 1 comment
Owner

Background

Code surfaces today rely on @acrodata/code-editor, wrapping CodeMirror 6 and @codemirror/language-data — not a separate “Codewarrior” product; this migration targets that stack.

Goal

Migrate app-language-runner (spikersoft-angular/libraries/tools/src/components/language-runner/) from CodeMirror-backed code-editor to Monaco Editor, preserving behavioral and UX parity with today’s playgrounds.

Scope

  • Shared playground used by C#, Python, and JavaScript shells (csharp-runner, python-runner, javascript-runner routers only compose <app-language-runner>).
  • Single‑file and advanced multi‑file sandbox modes, lesson mode, placeholders, [theme], [lineWrapping], language selector + syntax highlighting.

Feature parity checklist

  • Syntax highlighting / language IDs aligned with languages we expose today (languages/language inputs, @codemirror/language-data equivalents → Monaco Monarch / built‑in loaders).
  • Light/dark themes match product expectations (styled for glass/UI shell).
  • Line wrapping, placeholders, focus/scroll behaviors acceptable on desktop + handset breakpoints.
  • ngModel / programmatic updates remain reliable for submission, grading, offline flows.
  • Advanced sandbox: switching active file/tab updates Monaco model without losing unsaved edits; project size behaviors unchanged.
  • Intro guided tours: stable selectors (data-tour / equivalent) — update selectors if DOM changes.
  • Performance: bundle footprint documented; acceptable lazy-loading strategy.

References

Existing editor rationale in language-runner.ts (CodeMirror vs Monaco bundle note). Extend or supersede once Monaco lands.

## Background Code surfaces today rely on **`@acrodata/code-editor`**, wrapping **CodeMirror 6** and `@codemirror/language-data` — not a separate “Codewarrior” product; this migration targets that stack. ## Goal Migrate **`app-language-runner`** (`spikersoft-angular/libraries/tools/src/components/language-runner/`) from CodeMirror-backed `code-editor` to **Monaco Editor**, preserving **behavioral and UX parity** with today’s playgrounds. ## Scope - Shared playground used by **C#**, **Python**, and **JavaScript** shells (`csharp-runner`, `python-runner`, `javascript-runner` routers only compose `<app-language-runner>`). - Single‑file and **advanced** multi‑file sandbox modes, lesson mode, placeholders, `[theme]`, `[lineWrapping]`, language selector + syntax highlighting. ## Feature parity checklist - [ ] **Syntax highlighting / language IDs** aligned with languages we expose today (`languages`/`language` inputs, `@codemirror/language-data` equivalents → Monaco Monarch / built‑in loaders). - [ ] **Light/dark themes** match product expectations (styled for glass/UI shell). - [ ] **Line wrapping**, placeholders, focus/scroll behaviors acceptable on desktop + handset breakpoints. - [ ] **`ngModel` / programmatic updates** remain reliable for submission, grading, offline flows. - [ ] **Advanced sandbox**: switching active file/tab updates Monaco model without losing unsaved edits; project size behaviors unchanged. - [ ] **Intro guided tours**: stable selectors (`data-tour` / equivalent) — update selectors if DOM changes. - [ ] **Performance**: bundle footprint documented; acceptable lazy-loading strategy. ## References Existing editor rationale in `language-runner.ts` (CodeMirror vs Monaco bundle note). Extend or supersede once Monaco lands.
Author
Owner

Related component-scoped tickets for the same CodeMirror (@acrodata/code-editor) → Monaco effort:

  • #25 lib-blockly generated code pane
  • #26 lib-diagram code panel
  • #27 lib-tools-json-to-csharp (QuickType)
  • #28 lib-tools-difference (DiffEditor → Monaco Diff)
  • #29 lib-csv-to-json
  • #30 lib-json-to-csv
  • #31 Clue-for-SQL

Note: Thin shells app-csharp-runner, app-python-runner, app-javascript-runner only compose this issue’s app-language-runner — no separate editor tickets.

Related component-scoped tickets for the **same CodeMirror (@acrodata/code-editor) → Monaco** effort: - #25 **`lib-blockly`** generated code pane - #26 **`lib-diagram`** code panel - #27 **`lib-tools-json-to-csharp` (QuickType)** - #28 **`lib-tools-difference`** (DiffEditor → Monaco Diff) - #29 **`lib-csv-to-json`** - #30 **`lib-json-to-csv`** - #31 **Clue-for-SQL** **Note:** Thin shells `app-csharp-runner`, `app-python-runner`, `app-javascript-runner` only compose this issue’s **`app-language-runner`** — no separate editor tickets.
Sign in to join this conversation.