Skip to content
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

Why using an already deprecated version of CodeMirror (v5) when a newer (v6) is available? #7

Open
vemonet opened this issue Dec 12, 2024 · 2 comments

Comments

@vemonet
Copy link

vemonet commented Dec 12, 2024

Development on this project seems to have started a few weeks ago. Why are you already using an older and deprecated version of CodeMirror (v5) https://github.com/OP-TED/ted-open-data/blob/develop/index.html#L332 when a newer, much better, v6 version is available? cf. https://codemirror.net/ v5 is using old CommonJS, while v6 uses modern EcmaScript Modules (ESM), which is much better for code optimization and just overall better to build an application ready for the future.

If you wanted to use CodeMirror v5 why not just reusing the popular YASGUI interface and configure it? (https://github.com/zazuko/Yasgui, or https://github.com/sib-swiss/sparql-editor for a YASGUI with custom autocomplete based on a SPARQL endpoint predicates and classes)

It would have saved you development time while giving your users more features.

@rousso
Copy link
Contributor

rousso commented Dec 16, 2024

Dear @vemonet,

Thank you for your suggestions and your interest in our work.

We chose CodeMirror 5 because it is a stable tool that meets our current needs. At this point, it provides all the functionality we require, and its simplicity is an advantage. While we initially considered customizing the Monaco editor, we decided to defer the decision to adopt a more feature-rich SPARQL editor until it becomes necessary. Switching from one editor to another involves only a few lines of code, so it does not significantly impact our development process.

Our current priority is to build a comprehensive query library and explore the potential for further improvements. As we progress, we will certainly consider upgrading to CodeMirror 6, YASGUI, or Monaco to enhance the user experience.

We have recently added syntax checking with basic error highlighting in CodeMirror. Our next goal is to explore options for autocomplete. When we reach that stage, we will evaluate the benefits of using a more advanced SPARQL editor.

Thank you again for your input.

Best regards,
Yannis

@vemonet
Copy link
Author

vemonet commented Dec 18, 2024

Ok, but if you start to spend time implementing autocomplete and other features for CM5, it will be harder and take more time to migrate to CM6 (which has quite a different API). And the devs behind code mirror are already warning about the fact CM6 is better maintained in the CM5 repository

NOTE: CodeMirror 6 exists, and is more mobile-friendly, more accessible, better designed, and much more actively maintained.

Note that someone has already started implementing a sparql-editor for CodeMirror6: https://github.com/aatauil/sparql-editor with SPARQL syntax available here: https://github.com/aatauil/codemirror-lang-sparql

So getting basic support for SPARQL on CM6 should not be harder than on CM5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants