Page MenuHomePhabricator

Use NWE + CodeMirror for JS/CSS pages
Closed, DeclinedPublic

Description

Currently, even with NWE enabled, editing a JS/CSS page will take you to OWE (with syntaxhighlighting). Now that CodeMirror provides a way to use syntaxhighlighting in NWE it would increase consistency of the editing surface if NWE + CodeMirror would be used for JS/CSS pages as well in this case.
Though I should actually be used to it, I always get a bit surprised when I edit a JS page and suddenly don't see my favourite editor, but am taken to that ugly, small, old editbox.

Related Objects

StatusSubtypeAssignedTask
DeclinedNone
OpenNone

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Probably needs further discussion/consensus before anyone does this.

Don't you see Ace/Code editor on those pages? (https://www.mediawiki.org/wiki/Extension:CodeEditor)

Ace editor has some nice features than NWE+CodeMirror can't/won't have. Auto-indenting, bracket-matching, dynamic error detection with proper handling of error message etc.

Bringing the same features to NWE+CodeMirror will take a significant developer time and effort and it doesn't seem worth it to me personally.

Don't you see Ace/Code editor on those pages? (https://www.mediawiki.org/wiki/Extension:CodeEditor)

I do see it, but that's not my problem with this.
What I don't like is the fact that the old editor, even with CodeEditor, looks and works differently from NWE, which is my default editor. So when I edit a JS page, the editing area is much smaller than on other pages, the buttons to save are in a different place, etc. So I'd like to have a consistent editing experience on all pages, and for my part I'd even prefer this over the additional features CodeMirror doesn't provide.

I understand the notion of having a consistent editing experience, but in my opinion, the disadvantages far outweigh the few, if any, advantages we might get out of this. Ace editor catches errors which we use to prevent the user from saving incorrect JS/CSS. CodeMirror can possibly do that but the amount of work that will go into doing this doesn't seem to be worth the few aesthetic improvements we will get out of this.

Maybe would just help changing a Code editor appearance (by additional stylesheets) and leave the functionality as is. Just make it visually similar, but on top of Ace's core

Niharika lowered the priority of this task from Medium to Low.Nov 7 2017, 11:51 PM
TBolliger subscribed.

CommTech will not be doing this.

From my personal 2¢: Ace editor is already a satisfactory and performant IDE

Deskana lowered the priority of this task from Low to Lowest.Feb 19 2018, 4:23 PM
Deskana subscribed.

The Editing team has no plans to work on this either.

I'mg going to be bold and close this task. We can reopen if there's a bigger demand for it. For now, we have another wishlist to tackle. :)

If somebody comes here because he like me wants to use the same editor for all edits, https://de.wikipedia.org/wiki/Benutzer:Schnark/js/veCode.js enables NWE for JS/CSS, too. A documentation (German only, sorry) is on https://de.wikipedia.org/wiki/Benutzer:Schnark/js/veCode.