Skip to content

Add Custom Monaco Editor Theme Matching AlgoForge Design System #24

Description

@Rishabhworkspace

Description

The Monaco editor in ProblemWorkspace.tsx defaults to the built-in vs-dark theme, which uses a #1e1e1e background. This clashes with AlgoForge's #141414 deep dark background and #a088ff / #63e3ff purple/cyan accent palette, creating a visually inconsistent coding environment.

Monaco supports fully custom themes via monaco.editor.defineTheme, which can be registered through the beforeMount prop of @monaco-editor/react.

Requirements

  • Define a custom algoforge-dark theme matching the app's color palette.
  • Register the theme using beforeMount on the <Editor> component.
  • Set algoforge-dark as the default theme.
  • Keep the light theme toggle functional (switch to vs-light).

Expected Behavior

Default State (Dark Mode) — Editor background matches #141414. Keywords and operators use #a088ff (purple accent). Strings use #63e3ff (cyan accent). Comments are muted (#4a4a6a or similar).

Light Toggle — Editor switches to Monaco's built-in vs-light theme.

Tasks

  • Define the algoforge-dark theme object following Monaco's IStandaloneThemeData schema.
  • Map token types: keywords → #a088ff, strings → #63e3ff, comments → muted gray, editor background → #141414.
  • Use the beforeMount prop on the <Editor> component to call monaco.editor.defineTheme(...).
  • Set the default theme state to 'algoforge-dark'.
  • Verify the light theme toggle still switches to vs-light correctly.

Acceptance Criteria

  • The custom algoforge-dark theme is applied by default.
  • Editor background matches #141414.
  • Keywords and strings use the AlgoForge accent colors.
  • Light theme toggle still works correctly.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions