LearnNewsExamplesServices
Frontmatter
id8845
titleSync Monaco Editor Theme in Portal
stateClosed
labels
enhancementai
assigneestobiu
createdAtJan 21, 2026, 11:39 AM
updatedAtJan 21, 2026, 12:08 PM
githubUrlhttps://github.com/neomjs/neo/issues/8845
authortobiu
commentsCount1
parentIssue8727
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtJan 21, 2026, 12:07 PM

Sync Monaco Editor Theme in Portal

Closed v11.23.0 enhancementai
tobiu
tobiu commented on Jan 21, 2026, 11:39 AM

Update the Monaco Editor instances in the Portal App to match the selected Neo theme (Dark/Light).

Requirements:

  1. Mapping:
    • neo-theme-neo-dark -> vs-dark
    • neo-theme-neo-light -> vs
  2. Implementation:
    • Update src/component/wrapper/MonacoEditor.mjs.
    • Implement afterSetTheme to update the internal editorTheme config based on the new Neo theme.
    • This leverages the recursive theme propagation in Neo.container.Base.
tobiu added the enhancement label on Jan 21, 2026, 11:39 AM
tobiu added the ai label on Jan 21, 2026, 11:39 AM
tobiu added parent issue #8727 on Jan 21, 2026, 11:40 AM
tobiu referenced in commit e630637 - "feat: Sync Monaco Editor Theme in Portal (#8845)" on Jan 21, 2026, 11:52 AM
tobiu
tobiu Jan 21, 2026, 12:05 PM

Input from Gemini 3 Pro:

✦ I have implemented the automatic theme synchronization for the Monaco Editor wrapper.

Changes:

  1. New Config: Added useThemeAwareness_ (Boolean, default true) to src/component/wrapper/MonacoEditor.mjs. This allows developers to opt-out of automatic theme mapping if they need a specific, fixed editor theme regardless of the application theme.
  2. Theme Mapping Logic: Implemented afterSetTheme. It detects changes to the inherited theme config (propagated by container.Base), maps it (dark -> vs-dark, light -> vs), and updates the editorTheme config accordingly. This ensures both initial rendering and runtime switches are handled correctly.
  3. Dynamic Toggling: Implemented afterSetUseThemeAwareness to immediately apply the current theme if the feature is enabled at runtime.

This solution provides a "batteries-included" experience for the Portal App and all other Neo.mjs applications using this wrapper, while maintaining flexibility.

tobiu closed this issue on Jan 21, 2026, 12:07 PM
tobiu assigned to @tobiu on Jan 21, 2026, 12:08 PM