Deploy CodeMirror extension to beta cluster
Closed, DeclinedPublic

Description

MobileFrontend recently implemented the support for a CodeMirror supported wikitext editor (https://gerrit.wikimedia.org/r/195995/). This would allow to highlight wikitext syntax in our mobile editor in beta mode.

One of the german Wikipedia's Top 20 wishes is a way to edit wikitext, where syntax is highlighted, see T101246: Highlighted wikisyntax while editing articles [AOI]

Some thoughts from @kaldari:

  • The CodeEditor extension uses the ACE engine, but currently doesn't support syntax highlighting for WikiText (as far as I know).
  • The developers of the CodeEditor extension are considering switching from ACE to the CodeMirror engine (T50826).
  • ACE only supports monospace fonts (https://github.com/ajaxorg/ace/issues/460) which is a blocker for using it for article editing on many projects.
  • According to JamesF, deployment of the new WikiText editor will be a very gradual process and will probably not be the default for a while yet.
  • According to JamesF, syntax highlighing in the new WikiText editor has been prioritized as a "Nice to have", but won't be in the first deployment.
  • Dot's syntax highlighter only supports changing the background color behind code (as it inserts a mirror div underneath the textarea). It doesn't support changing the display of the actual code itself, which is probably more useful.

Requirements:

  • Create a tracking bug for the extension's deployment to Wikimedia wikis. This bug should only concern deployment itself, any sub-issues (that block deployment) should be separate bugs that are listed under "Blocked by" for this tracking bug.
  • Create Extension: mediawiki.org page for developers and people who will install or configure the extension.
  • Create Help:Extension: mediawiki.org page for the end user documentation. Cross-link it with the above.
  • Request a project in Phabricator if none exists yet.
  • Get the extension code in Gerrit.
  • Show community support/desire for the extension to be deployed.
  • Request (and respond to) a product review, if applicable
  • Request (and respond to) a design review, if applicable.
  • Open (and respond to) a Security-Reviews ticket blocking this.
  • Make sure the extension is automatically branched.
Florian created this task.Apr 3 2015, 7:09 PM
Florian updated the task description. (Show Details)
Florian raised the priority of this task from to Needs Triage.
Florian added subscribers: Florian, Jdlrobson.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 3 2015, 7:09 PM

Care must be taken because on desktop we use the ACE editor, and they shouldn't clash.

Krenair added a comment.EditedApr 5 2015, 12:10 AM
  • Create a tracking bug for the extension's deployment to Wikimedia wikis. This bug should only concern deployment itself, any sub-issues (that block deployment) should be separate bugs that are listed under "Blocked by" for this tracking bug.
  • Create Extension: mediawiki.org page for developers and people who will install or configure the extension.
  • Create Help:Extension: mediawiki.org page for the end user documentation. Cross-link it with the above.
  • Request a project in Phabricator if none exists yet.
  • Get the extension code in Gerrit.
  • Show community support/desire for the extension to be deployed.
  • Request (and respond to) a product review, if applicable
  • Request (and respond to) a design review, if applicable.
  • Open (and respond to) a Security-Reviews ticket blocking this.
  • Make sure the extension is automatically branched.

What are the advantages of using CodeMirror over ACE or Dot's syntax highlighter?
Can we agree on a standard please?

He7d3r set Security to None.
He7d3r added a subscriber: He7d3r.
Florian closed this task as Declined.Aug 5 2015, 3:48 PM
Florian claimed this task.
Restricted Application removed a subscriber: Liuxinyu970226. · View Herald TranscriptAug 5 2015, 3:48 PM
kaldari added a subscriber: kaldari.EditedAug 7 2015, 7:21 PM

A few pieces of info:

  • The CodeEditor extension uses the ACE engine, but currently doesn't support syntax highlighting for WikiText (as far as I know).
  • The developers of the CodeEditor extension are considering switching from ACE to the CodeMirror engine (T50826).
  • ACE only supports monospace fonts (https://github.com/ajaxorg/ace/issues/460) which is a blocker for using it for article editing on many projects.
  • According to JamesF, deployment of the new WikiText editor will be a very gradual process and will probably not be the default for a while yet.
  • According to JamesF, syntax highlighing in the new WikiText editor has been prioritized as a "Nice to have", but won't be in the first deployment.
  • Dot's syntax highlighter only supports changing the background color behind code (as it inserts a mirror div underneath the textarea). It doesn't support changing the display of the actual code itself, which is probably more useful.

Considering there are outstanding requests from both the English and German Wikipedias for syntax highlighting (T101246), and considering that we have an extension that can do that right now, and considering that the new WikiText editor is still a ways out, I would like to re-open this bug so that we can at least experiment more with CodeMirror (which may eventually be used by the new WikiText editor as well).

Would like to get some feedback on this from @Jdforrester-WMF.

Florian reopened this task as Open.Aug 7 2015, 8:50 PM

@kaldari mentioned good points, that it could be reasonable to discuss this, even if the original reason for this task doesn't apply anymore.

+1 to kaldari :)

kaldari added a subscriber: Qgil.Aug 8 2015, 1:55 AM

@Krenair, @Qgil: Are all the things on that checklist above required for deploying to beta labs or just for deploying to production?

Krenair added a subscriber: greg.Aug 8 2015, 2:01 AM

Probably wouldn't require wmf branches for a beta deployment... Don't know about the community consensus part though. I think the Help:Extension: page is probably unnecessary for both in this case, but you definitely need a security review to deploy it to either.

Qgil added a comment.Aug 8 2015, 8:16 AM

(I just realized that we have a mix of "Beta" and its requirements: Beta in MobileFrontend, Beta features, and Beta cluster. I'm not sure which applies here.)

Legoktm added a subscriber: Legoktm.Aug 8 2015, 8:18 AM

If you just want to experiment, you can set up your own labs instance, there's no need to deploy on beta-labs.

greg renamed this task from Deploy CodeMirror extension to beta labs to Deploy CodeMirror extension to beta cluster.Aug 10 2015, 3:16 PM
greg added a comment.Aug 10 2015, 3:18 PM

Probably wouldn't require wmf branches for a beta deployment... Don't know about the community consensus part though. I think the Help:Extension: page is probably unnecessary for both in this case, but you definitely need a security review to deploy it to either.

(offtopic-ish?) Right, wmf branch and community consensus not explicitly needed for Beta Cluster deploy. Security review is though.

I think community consensus is given at least on dewiki (syntaxhighlighting for wikitext is one of the top 20 wishes, see this page (in german) and T101246: Highlighted wikisyntax while editing articles [AOI].

If you just want to experiment

I can only speak for me, but I would see that to be more as an experiment. It could be used to fix T101246, accomplish one of the top 20 wishes of one of the biggest Wikipedia language version, and as a first step for other extensions to move to CodeMirror (e.g. CodeEditor). So it would make sense to look, how CodeMirror works in a production like environment, like beta labs, to test it and fix errors that may occur :)

I would suggest to mark "Show community support/desire for the extension to be deployed." as checked and would open a ticket for Security-Reviews if no one is against it :)

Change 230782 had a related patch set uploaded (by Florianschmidtwelzow):
Add CodeMirror to auto-branched extensions

https://gerrit.wikimedia.org/r/230782

Florian updated the task description. (Show Details)Aug 11 2015, 2:46 PM
Florian removed a project: Patch-For-Review.
Florian removed a subscriber: gerritbot.

Currently talking with Editing and Community Liaison teams about potential deployment.

kaldari closed this task as Declined.Aug 20 2015, 9:28 PM

The Editing and Community Liaison teams don't think it's a good idea to move ahead with CodeMirror (since the Editing team will be working on its own solution to syntax highlighting at some point). Reclosing as "Declined" :(

at some point

I think, that the community (including myself) will have a problem with this, at some point, especially compared with:

According to JamesF, syntax highlighing in the new WikiText editor has been prioritized as a "Nice to have", but won't be in the first deployment.

But maybe I'm the only one who has a problem with this :)

since the Editing team will be working on its own solution to syntax highlighting at some point).

Could James or you please provide links to related tasks, clearer plans, public roadmaps with dates?

@Aklapper: The only thing I know of is T104479, but perhaps @Jdforrester-WMF can provide more details.

Change 230782 abandoned by Florianschmidtwelzow:
Add CodeMirror to auto-branched extensions

Reason:
task declined

https://gerrit.wikimedia.org/r/230782

@Aklapper: The only thing I know of is T104479, but perhaps @Jdforrester-WMF can provide more details.

@Jdforrester-WMF: Yeah that would be welcome.

kaldari reopened this task as Open.Dec 16 2016, 7:27 PM

Reopening, per Community Wishlist Survey Results. There is now an actual new WikiText editor (in Beta), so we should investigate whether CodeMirror can be modified to support it. We should also do some performance tests and see how CodeMirror performs in a production-like environment. Being able to test it on the Beta Cluster will be useful for this.

There is now an actual new WikiText editor (in Beta), so we should investigate whether CodeMirror can be modified to support it.

I would be amazed if it could. I think re-opening this ticket is very premature.

I think re-opening this ticket is very premature.

@Jdforrester-WMF: This ticket isn't about deploying CodeMirror to production, just to the Beta Cluster for testing. If it turns out that CodeMirror isn't a viable option in a production environment it won't be worth investigating whether or not it can be adapted to work with the new WikiText editor. Plus this will let more people try it out and give feedback on it's strengths and weaknesses. Right now everyone's idea of syntax highlighting comes from a couple of gadgets that aren't that great.

Things should be deployed on beta cluster because they are planned to be deployed to production. If there are no plans to put it in production, you can create a separate labs instance to test it with.

kaldari closed this task as Declined.Dec 16 2016, 8:17 PM

@Legoktm: Got it.

Tgr added a subscriber: Tgr.Mar 22 2017, 6:11 PM
  • The CodeEditor extension uses the ACE engine, but currently doesn't support syntax highlighting for WikiText (as far as I know).

Which apparently results in poor UX for code comments in non-Latin languages, so T50826: CodeEditor: Migrate from Ace to CodeMirror was a pretty popular item on the Developer Wishlist. Not sure if that fits into the scope of this extension.

Would probably be best to implement T50826 by including the CodeMirror library within the CodeEditor extension and switching out the back-end, rather than making the CodeEditor extension dependent on the CodeMirror extension. But once they are both using the CodeMirror library, it would make sense to consider merging them into 1 extension.

Restricted Application added a project: Community-Tech. · View Herald TranscriptFeb 9 2018, 4:03 PM
TBolliger moved this task from Untriaged to Archive on the Community-Tech board.Feb 14 2018, 1:13 AM