-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Drop the CodeEditor
abstraction
#10380
Comments
Thanks for opening this. Several people in the meeting also said we should move directly to CodeMirror 6 in 4.0, and that it is pretty stable at this point. |
👍 @vidartf I know that CM author decided to not port the merge view feature of CodeMirror 5 to 6: codemirror/dev#327 This will presumably require some efforts to get nbdime and jupyterlab-git compatible with 4.0. But this is not a blocker. |
Definitely a big 👍 on CM6. I think if we fully engage with it, there will be some good opportunities for using things like DecorationSet to make huge challenges of jupyterlab-lsp just... disappear. And the accessibility impact cannot be overstated. However: while we're taking a breath... I would posit that ProseMirror document editor (esp. the code editor and track changes examples) show depth of integration (and composability) on top of a more-broadly-familiar UI (e.g. word processing) that we might really not want to try to re-build. Indeed, this Document-first view might end up being what a lot of different audiences might want first, and by default, even for notebooks that were authored in a traditional cell view. If these could be made to fit the existing API, then So you'd basically know, "i have a line/column-focused source editor", but not necessarily know whether that editor is rich text or plain text (or currently be rendered as both for e.g. math. My thinking is:
|
ProseMirror indeed provides a very nice abstraction over rich-text content. If you want to express complex content like tables and if you want to make sure that your content conforms to some schema, then ProseMirror is awesome. But it also has a very steep learning curve. Currently, Jupyter Notebooks only consist of a list of markdown, code, and raw cells + output. It doesn't require rich-text support (markdown != rich-text) and we don't necessarily need a complex abstraction over the different cell types. Actually, we just created a very handy abstraction that extension authors can work agains: the With the |
A few thoughts on removing the codeeditor package: while I think we should definitely drop the
|
In the weekly dev meeting yesterday, we discussed whether we should drop the
CodeEditor
abstraction. The overall sentiment was positive, with ~15 people in the call.This would be a 4.0 change.
Some core packages already rely on editors being Codemirror editors, for example the debugger extension.
Focusing on a single code editor (Codemirror) would make it easier to fully leverage all the available APIs.
Related: #10370
@jupyterlab/committers, extension authors and anyone else: feel free to leave a 👍 or 👎 to get a clear idea of the general sentiment. Thanks!
The text was updated successfully, but these errors were encountered: