Commit graph

6 commits

Author SHA1 Message Date
MusikAnimal 880c690a10 CodeMirror6: add new modules, feature flag, and URL query parameter
Add a new $wgCodeMirrorV6 temporary feature flag that when enabled,
will load the 'ext.CodeMirror.v6.WikiEditor' module that is built
against CodeMirror 6. You can also pass in the ?cm6enable=1 query
parameter to force use of CodeMirror 6. This is currently only
implemented for the 2010 editor.

Due to packaging constraints with CodeMirror 6, we now use Webpack to
bundle the files, which are then used by ResourceLoader. This is similar
to what is done for Extension:Popups, MobileFrontend, among other
extensions.

A new generic class CodeMirror can be used on other areas where syntax
highlighting is desirable, but not necessarily for editing (i.e. without
WikiEditor).

This commit merely lays the foundation for CodeMirror 6 and updates
WikiEditor to use it. The actual MediaWiki syntax highlighting will come
with a future commit.

With the new Webpack build, the Gruntfile was removed and the tasks
moved to npm commands.

Bug: T317243
Change-Id: I2239d2449b2db3b638551f847eb4eff1aafa6276
2023-10-09 19:51:24 -04:00
MusikAnimal 46b7208d13 Convert applicable ResourceLoader modules to use packageFiles
Move WikiEditor-specific code to ext.CodeMirror.WikiEditor, leaivng only
CodeMirror-specific things in ext.CodeMirror, including the logUsage
method which was duplicated in the VE plugin and now refactored.

Add .env to .gitignore so that selenium tests can be ran more easily

This patch leaves the other non-mediawiki modes still using the
'scripts' system instead of 'packageFiles'. These are not used in
MediaWiki directly but by some extensions (i.e. PhpTags) and using
packageFiles will break that integration.

Bug: T272035
Change-Id: I3bafef196c1f713443d7b8e9cb7dc2891b379f5d
2023-08-24 11:55:13 -04:00
Adam Wight d6c6dbd73a Browser tests for CodeMirror (wikitext 2010 editor)
Basic tests to show that the highlighting classes have been attached
to the expected elements.

TODO in later patches:
* tests for the wikitext 2017 editor

Bug: T270240
Change-Id: I01ebd9881d38dd877f19ee3bb4fdcbb74d43afaf
2021-01-08 11:01:13 +01:00
Ed Sanders 37b49bfdc4 build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I7ca5276791d9add0709387422016d7193e8d9945
2019-03-06 12:10:29 +00:00
Paladox 45ebd2d55d Update Jenkins tests
Test jshint and jscs through npm using latest version of jscs and jshint.

Add support for composer.json running phplint and in the future php code
sniffer.

Change-Id: Id8f11f9414fae8313dc18a857a07e11694354dcb
2016-03-03 13:29:48 +00:00
Pavel Astakhov 7854e7c06b Update the CodeMirror library to 5.9 (v 3.4.0)
Change-Id: Ia36b0573809d632c0521477cea72268b5524efae
2015-12-14 11:28:57 +06:00