-
Notifications
You must be signed in to change notification settings - Fork 377
Plain text diff #406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Plain text diff #406
Conversation
b1b71f1 to
11b04aa
Compare
11b04aa to
cdb8fb9
Compare
7d732d3 to
5880d25
Compare
5880d25 to
ae7189e
Compare
b3a359d to
451211e
Compare
|
@telamonian would you be willing to review this PR? |
|
ahh, I see you have another short PR for me, @fcollonval :) I actually already started going over this PR last weekend, so I'll get through it |
First version using CodeMirror First good looking Restructure CSS + improve look and feel Add gutters Remove `less` call Use message in lower case Rebase on master + comment
451211e to
2979bee
Compare
telamonian
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A note requesting a future PR, a question, and a couple of minor import sorting niggles. Nothing blocking, so LGTM!
@fcollonval Are you the one who wrote mergeview.ts, or did you get from somewhere else? I'm mostly asking out of curiosity/being impressed. It's supposed to be a Typescript translation of https://github.com/codemirror/CodeMirror/blob/master/addon/merge/merge.js, right?
|
Thanks for the review @telamonian As you have started creating follow-up issues, I'll merge this one. Feel free to open a new issue, if you think the diff theme for the dark them needs improvements.
I have not much credit. I copied the original JS file you referenced and modified it to get a Typescript file without too many |
|
@fcollonval @telamonian this is on master but not released yet, am I right? in general, Is the milestone associated with the PRs/issues a reliable way to follow the status quo? Should I look into other documents besides the roadmap? Thanks! |
fixes #352, fixes #446
This build on #388 but using CodeMirror instead of Monaco. The reason to switch to CodeMirror is to fit better with the visual identity of JupyterLab and nbdime that both use CodeMirror to show code. But the diff are highlighted following a style closer to Monaco than the default CodeMirror addon.
Here is a preview:
The remaining tasks:
mergeview.tscodemirrorsettings changed signal with diff widget to improve integration within jupyterlabThe diff/merge code comes from the merge addon of CodeMirror. This will allow to implement at low cost a plain text merge interface.
The major modification to the original code is the usage of
diff-match-patchnpm package and the default view for the two panels case is to set the old text on the left panel and the current one in the right panel.