Page MenuHomePhabricator

Update CodeMirror extension to the latest CodeMirror library 5.x.x
Closed, ResolvedPublic2 Estimated Story Points

Description

Last update was T176685: Update CodeMirror extension to CodeMirror library 5.30 in 2017. The currently used version is 5.35.0. Changelog since then: https://codemirror.net/doc/releases.html. As far as I can see no incompatible changes have been made, but tons of bugfixes and some performance improvements.

Note there is a version 6 update planned as well (see T259059), but this will not happen soon.

To do:

  • Ping @MusikAnimal if this is ok.
  • Check if the copy in the extension does not have any modifications. We don't want to loose these without knowing.
  • Check the release notes again for changes that might turn out to be problematic.
  • Check what tests exist in the extension's codebase.
  • Replace the file in the extension.
  • Locally test if it still works.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lena_WMDE set the point value for this task to 3.Nov 16 2020, 1:16 PM
thiemowmde renamed this task from Update CodeMirror extension to CodeMirror library 5.56.0 to Update CodeMirror extension to the latest CodeMirror library 5.x.x.Nov 17 2020, 9:28 AM

Change 644518 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/CodeMirror@master] [DNM] Update CodeMirror to 5.58.3

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

thiemowmde moved this task from Sprint Backlog to Doing on the WMDE-QWERTY-Sprint-2020-11-18 board.

Investigation:

Lena_WMDE changed the point value for this task from 3 to 2.Dec 2 2020, 10:34 AM

About tests: There is a bunch of tests for the custom MediaWiki wikitext syntax highlighting. They are executed as part of the quibble-vendor-mysql-php72-noselenium-docker job. Search for "Syntax highlighting:" in this example: https://integration.wikimedia.org/ci/job/quibble-vendor-mysql-php72-noselenium-docker/49409/consoleFull. These tests don't guarantee it looks the same. They test the resulting HTML and the class names that should appear there.

FWIW apart from testing this manually with FF, Chrome, IE11 & Edge ( see patch ) I also re-based the bracket matching poc patch chain on top of this and it seemed to work. \o/

There's just a known issue with IE11 and 2017WTE but the situation is similarly bad on master and with the update so I would not consider it a blocker T190720: Syntax highlighting causes blurry text in 2017 WikiEditor in Internet Explorer

Change 644518 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Update CodeMirror to 5.58.3

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

Change 655035 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/CodeMirror@master] Update matchbrackets addon to most recent version

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

Change 655035 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Update matchbrackets addon to most recent version

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

Change 655867 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/CodeMirror@master] Update all syntax highlighters to latest version

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

Change 655867 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Update all syntax highlighters to latest version

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

Wonderful. Happy to hear that! :-)

Change 644518 merged by jenkins-bot:
[mediawiki/extensions/CodeMirror@master] Update CodeMirror to 5.58.3

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

This also fixed CVE-2020-7760, see https://www.npmjs.com/advisories/1702. Would it be straightforward to backport to REL1_35?

Change 692248 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/CodeMirror@REL1_35] Update CodeMirror to 5.58.3

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

Change 692248 merged by jenkins-bot:

[mediawiki/extensions/CodeMirror@REL1_35] Update CodeMirror to 5.58.3

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