Skip to content

Add the code editor - #852

Merged
SharonStrats merged 4 commits into
stagingfrom
move-editor
Aug 9, 2026
Merged

Add the code editor #852
SharonStrats merged 4 commits into
stagingfrom
move-editor

Conversation

@SharonStrats

Copy link
Copy Markdown
Contributor

Moved the code editor from source pane so it can be used in other panes.

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Introduces a reusable CodeEditor utility (based on CodeMirror 6) and exposes it from the library’s public entrypoint so it can be used across panes instead of being tied to a single pane implementation.

Changes:

  • Added a new CodeEditor class with initialization, content replacement, read-only toggling, language switching, and dirty-state tracking.
  • Exported the new module via src/lib/code-editor and re-exported it from src/index.ts.
  • Added CodeMirror-related runtime dependencies and a unit test covering basic initialization and operations.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
FileDescription
test/unit/codeEditor.test.jsAdds unit tests and CodeMirror mocks for the new CodeEditor.
src/lib/code-editor/index.tsPublic barrel export for the code editor module.
src/lib/code-editor/CodeEditor.tsImplements the reusable CodeMirror-backed CodeEditor class.
src/index.tsRe-exports lib/code-editor from the package entrypoint.
package.jsonBumps package version and adds CodeMirror/theme dependencies.
package-lock.jsonLocks newly added CodeMirror/theme dependency tree.

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

Comment threadsrc/lib/code-editor/CodeEditor.ts Outdated
Comment threadsrc/lib/code-editor/CodeEditor.ts
Comment threadtest/unit/codeEditor.test.js
@SharonStrats
SharonStrats merged commit 4d701e4 into stagingAug 9, 2026
9 checks passed
@SharonStrats
SharonStrats deleted the move-editor branch August 9, 2026 02:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants

@SharonStrats@bourgeoa