Remove source editor and use from solid-ui - #218
Open
SharonStrats wants to merge 2 commits into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR removes the in-repo CodeMirror-based source editor implementation and switches SourceEditorCard to use the CodeEditor provided by solid-ui, reducing direct editor implementation and dependency surface in this package.
Changes:
- Replaced dynamic import/instantiation of the local
SourceEditorwithsolid-ui’sCodeEditorinSourceEditorCard. - Removed the local
SourceEditorimplementation and its dedicated unit test. - Dropped direct CodeMirror-related dependencies from
package.jsonand updated the lockfile accordingly; bumped package version.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/sourceEditor.test.js | Removes tests for the deleted local SourceEditor. |
| src/components/source-editor-card/SourceEditorCard.ts | Switches editor initialization from local SourceEditor to solid-ui CodeEditor. |
| src/components/source-editor-card/SourceEditor.ts | Removes the local CodeMirror-based editor implementation. |
| package.json | Bumps version and removes direct CodeMirror-related dependencies. |
| package-lock.json | Removes CodeMirror-related transitive packages (but needs version alignment with package.json). |
Suppressed comments (1)
src/components/source-editor-card/SourceEditorCard.ts:130
- Switching from the local
SourceEditortosolid-ui'sCodeEditorchanges the editor initialization behavior (module import path, constructor, initialize signature, dirty callback wiring), but the current unit tests don’t assert that this initialization runs successfully or that thedirtycallback updatesfileExplorerContext.edit.updateDirtyState. Consider adding a test that mockssolid-ui'sCodeEditorand verifiesinitialize(...)is called with the expected args and that invoking the provided dirty callback updates the dirty state.
const { CodeEditor } = await import('solid-ui')
this._originalContent = sourceContext.originalContent
this._originalContentType = sourceContext.editorMetadata.contentType
this._editor = new CodeEditor()
const { content, contentType } = await this._getViewContent()
await this._editor.initialize(sourcePaneEditor, content, contentType, 'dark', dirty => {
this.updateDirtyState(dirty)
})
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
SharonStrats
force-pushed
the
move-editor
branch
from
August 5, 2026 22:31
49ec461 to
6627556
Compare
…istry@3.1.2-2 solid-ui@3.1.3-15) (latest: rdflib@2.4.0)
bourgeoa
approved these changes
Aug 6, 2026
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.
Remove the source editor and use the one from solid-ui.
Blocking: this needs to go in first SolidOS/solid-ui#852