Spike: Investigate CodeMirror as a replacement for Monaco
Problem to solve
Monaco has served us well as a foundation for the Source Editor for the past couple of years. But some changes to our overall tech stack and the direction of our other categories warrant re-visiting the underlying editor for Source Editor.
Specifically, three factors are driving this issue:
- Monaco continues to lack basic support for touchscreen devices. As we look to implement Source Editor elsewhere in the GitLab application, this becomes a limiting factor. If we want Source Editor to be used everywhere raw code is being written - including comments - we need at least basic mobile support.
- The Content Editor is maturing and the underlying combination of Tiptap and ProseMirror is proving to be a viable foundation for future development. We are looking to increase the usage of Content Editor in 2023 and it's possible that adopting CodeMirror could simplify the transition between the two editors in places where they co-exist.
- The Web IDE Beta has moved away from Monaco in favor of a custom fork of VS Code. Without the need for the Source Editor to power this more demanding area of the product, we should re-consider what it needs to do everywhere else and determine which platform best meets our needs.
Goal
Understand the pros and cons of moving to CodeMirror as the underlying editor in Source Editor and the investment needed to implement the change.
Focus on:
- Usability (in particular on mobile devices)
- Scalability
- Maintainability
- Community and project velocity
- Interoperability with Content Editor
Edited by Eric Schurter