-
-
Notifications
You must be signed in to change notification settings - Fork 23
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
Replace Ace Editor with CodeMirror 6 #4970
Conversation
This reverts commit 98c93fe.
When testing, this seems to work on both Mestra and Naos, so I am not entirely sure why it didn't work in production. |
The potential problem might be dynamic loading of javascript If codemirror loads certain packages only if the language requires them, it needs to use the correct paths. I remember you also saying that on the broken pages there was a javascript fetch error |
confirmed bug to be related to #5082 So fix might have fixed this |
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.
-
Autocomplete doesn't seem to work. E.g. html autocomplete in the docs https://codemirror.net/examples/autocompletion/ vs on https://naos.dodona.be/nl/activities/1412931994/
-
Font size is a little bigger, but not sure if this is a problem.
-
We seem to miss the highlighting of functions compared to ace.
-
Ace had basic linting (in javascript), this is missing now. Not sure if this is a problem (since the linting messages could be different from the ones in the judge and thus confusing), but maybe mention it in the PR.
-
I also think the python indentation is different (or at least not very smart). In a solution that used 4 spaces, it added just 2 when adding a new line.
-
The active line isn't marked anymore.
Changes:
|
This reverts commit 98c93fe, and thus re-introduces #4933.
This pull request replaces the Ace Editor with CodeMirror (which is a commonly-used text editing component for the web).
Feature-wise, codemirror is mostly equivalent. There are some changes:
There are a number of other benefits:
On the other hand, it does need a bit more code to:
Closes #4585 as a side effect.