Allow diffing with @codemirror/merge
#6
Merged
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.
Expand the current functionality with a new command to allow creating diffs on the frontend via
@codemirror/merge
: https://github.com/codemirror/mergeWith
@codemirror/merge
, we don't need to rely onnbdime
running on the server to produce a diff.It may also open the door for deeper integration with the existing notebook code cells (partial diff acceptance, reuse of JupyterLab codemirror extensions...).
For now, maybe we can still keep both since the two views have different styling, and the commands are meant to be used programmatically by other extensions. And
nbdime
could diff whole notebooks.codemirror
ornbdime
codemirror
diff view@codemirror/merge
jupyterlab-cell-diff-codemirror.mp4
nbdime
jupyterlab-cell-diff-nbdime-2.mp4
To test
Example command: