Last modified: 2014-08-09 11:06:06 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T50826, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 48826 - CodeEditor: Migrate from Ace to CodeMirror
CodeEditor: Migrate from Ace to CodeMirror
Status: REOPENED
Product: MediaWiki extensions
Classification: Unclassified
CodeEditor (Other open bugs)
unspecified
All All
: Normal enhancement with 1 vote (vote)
: ---
Assigned To: Brion Vibber
:
Depends on:
Blocks: 48828
  Show dependency treegraph
 
Reported: 2013-05-26 08:25 UTC by Yuvi Panda
Modified: 2014-08-09 11:06 UTC (History)
8 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments
RTL word selecting compare (17.44 KB, image/png)
2013-10-29 20:15 UTC, [no longer active user]
Details

Description Yuvi Panda 2013-05-26 08:25:08 UTC
Has more features, is lighter(?) and has much better support for Unicode / BiDi text rendering (see http://codemirror.net/demo/bidi.html).

Plus Brion likes it :)
Comment 1 Brion Vibber 2013-05-26 09:27:38 UTC
Current Ace editor widget assumes a monospace font, which fails horribly on bidi, Indic texts, CJK text, combining characters, surrogate pairs etc. Since comments and strings are often in non-English languages, this is crappy to work on code in those languages.

CodeMirror seems to handle these much better.
Comment 2 Rainer Rillke @commons.wikimedia 2013-09-14 18:24:17 UTC
Strong oppose! Now you have deployed Ace Could editor with its API, its functionality and its keyboard shortcuts can can't turn 180°.
Comment 3 Yuvi Panda 2013-09-14 18:27:39 UTC
Hmm, what particular API? All of ACE?
Comment 4 Rainer Rillke @commons.wikimedia 2013-09-14 18:34:44 UTC
See for example https://de.wikipedia.org/wiki/Wikipedia:Technik/Text/Edit/CodeEditor#Code:_CodeEditor_deaktivieren and http://ace.c9.io/#nav=api&api=editor -- one usually does deploy something if one is sure it is relatively stable but I cannot understand why CodeEditor was deployed despite this bug.
Comment 5 Brion Vibber 2013-09-14 19:30:01 UTC
Software that's broken gets replaced with working software all the time. reopening.
Comment 6 MZMcBride 2013-09-14 19:35:16 UTC
(In reply to comment #2)
> Strong oppose! Now you have deployed Ace Could editor with its API, its
> functionality and its keyboard shortcuts can can't turn 180°.

Part of this bug would be figuring out what interfaces are exposed currently, what it would cost to port those interfaces over (if any), and figuring out the other potential consequences of making this switch.

Plus, if Ace is falling short, it would be good to evaluate whether we can hack on it to make it better (and figure out whether fixing up Ace is a better approach to take rather than switching completely).

I don't think we have enough info yet to say whether this is a wontfix or not. I agree that we ought to strive for some level of stability in tools we deploy. Breaking changes should be avoided if possible. Time is finite, developer time even more so.
Comment 7 Rainer Rillke @commons.wikimedia 2013-09-14 20:14:07 UTC
(In reply to comment #5)
> Software that's broken gets replaced with working software all the time.
And regarding deployment of unstable software, certain WMF Engineers and developers seem have a leading role recently.
Comment 8 Rainer Rillke @commons.wikimedia 2013-09-14 20:40:29 UTC
(In reply to comment #6)
> Part of this bug would be figuring out what interfaces are exposed currently,
The whole Ace editor interface:

mw.util.$content.find( "#wpTextbox1" ).data( "wikiEditor-context" ).codeEditor
( http://ace.c9.io/#nav=api&api=editor )
Comment 9 Brion Vibber 2013-09-14 21:25:34 UTC
OK let's try bug 54136 before trying a total editor switch...
Comment 10 Isarra 2013-09-22 21:26:02 UTC
The problems I've run into with ace suggest that what it needs is a complete rework of its interface - issues include things such as poor contrast, hardcoded styling (preventing effective user-side fixing of stuff like the contrast, fonts, etc), dependency on wikieditor (including forced reenabling for anyone who's turned it off), a lack of support for system-side advanced clipboards or even moving around text by dragging it...

CodeMirror only has some of these issues.
Comment 11 Rainer Rillke @commons.wikimedia 2013-09-22 23:20:31 UTC
> moving around text by dragging it
This is possible with ACE. You can even config the delay after which the drag&drop starts. CodeMirror is also not able to drag to outside the editor.
> poor contrast
Please look at the demo: http://ace.c9.io/#nav=about&api=editor
I also don't know why the background is blue in MediaWiki by default.
Comment 12 Rainer Rillke @commons.wikimedia 2013-09-22 23:27:35 UTC
(In reply to comment #10)
> hardcoded styling
http://ace.c9.io/#nav=api&api=editor .setStyle() allows you adding a class, .setFontSize() the font size and with that it isn't possible to overcome the issue?
> dependency on wikieditor
I doubt this dependency is required. I also do not like it a lot.

BTW, did you check out the Default-Keyboard-Shortcuts?
https://github.com/ajaxorg/ace/wiki/Default-Keyboard-Shortcuts
Comment 13 Isarra 2013-10-06 22:45:45 UTC
(In reply to comment #11)
> > moving around text by dragging it
> This is possible with ACE. You can even config the delay after which the
> drag&drop starts. CodeMirror is also not able to drag to outside the editor.

Doesn't work consistently cross-browser, then.

> > poor contrast
> Please look at the demo: http://ace.c9.io/#nav=about&api=editor
> I also don't know why the background is blue in MediaWiki by default.

That page just didn't load at all, but is somewhat reassuring. Requiring users to know js and other weird stuff to configure it, however, is decidedly poor practice, especially when it's drastically changing defaults and overriding browser and system settings. Perhaps these are issues specifically with the extension, however.
Comment 14 [no longer active user] 2013-10-29 19:32:38 UTC
I guess with switching to CodeMirror these will be fixed Bug 55422, Bug 45876 and it doesn't need indirect find in page I guess.
Comment 15 [no longer active user] 2013-10-29 20:15:50 UTC
Created attachment 13621 [details]
RTL word selecting compare

And CodeMirror is acting better then Ace on RTL text selecting.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links