Commit graph

1083 commits

Author SHA1 Message Date
Translation updater bot 1a1048c770
Localisation updates from https://translatewiki.net.
Change-Id: I994b5f2cbc51a98be7bdc876b139fb1c7428a9ce
2024-12-05 06:56:39 +01:00
Translation updater bot 0a925f6502
Localisation updates from https://translatewiki.net.
Change-Id: Ie6dcb1232042b861ca4c8eb8d2682bbd1dd03485
2024-11-28 07:03:30 +01:00
Translation updater bot 268befe39f
Localisation updates from https://translatewiki.net.
Change-Id: If4eaad10b58279b429f3d5f5e8994cb8a1af0ac7
2024-11-14 07:06:45 +01:00
Translation updater bot d16a069102
Localisation updates from https://translatewiki.net.
Change-Id: I0858ac91b8d893f48399c6a7528e02da74b78a38
2024-11-07 06:59:16 +01:00
Translation updater bot 72952c5dc4
Localisation updates from https://translatewiki.net.
Change-Id: I15d8c98ad0b13f70ce680c628f27120920af8ef7
2024-10-31 07:09:57 +01:00
Translation updater bot 9cc75729fb
Localisation updates from https://translatewiki.net.
Change-Id: I16e9ff7fbee25c4aaa8a39eaf0c7a2d4054fe4e8
2024-09-26 07:57:16 +02:00
Translation updater bot 9bbdf0f313
Localisation updates from https://translatewiki.net.
Change-Id: I27f826a54af241208ee01f72d89aaae7fec18d00
2024-09-19 08:00:10 +02:00
libraryupgrader 9116f4508a build: Updating path-to-regexp to 6.3.0
* https://github.com/advisories/GHSA-9wv6-86v2-598j

Change-Id: I8dbeda44c9257cca7f30083cdfa86967438cb760
2024-09-12 02:15:30 +00:00
Translation updater bot c88b89ab17
Localisation updates from https://translatewiki.net.
Change-Id: Id86d29dd1b97bd48d119c0ac09564f623b97171f
2024-09-05 08:04:48 +02:00
Translation updater bot ab4ec5f31f
Localisation updates from https://translatewiki.net.
Change-Id: Iadfb1da6ffefb855dc9a544a8ec39d32b104d48d
2024-08-29 08:10:52 +02:00
libraryupgrader c5e56dd796 build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: I1b431c2be23a616b4cf9614c6328daea203167a6
2024-08-26 01:44:11 +00:00
Translation updater bot 54cdc840c4
Localisation updates from https://translatewiki.net.
Change-Id: I8c93c896482dbd026a63b64f12c9d597eeebea60
2024-08-22 08:30:44 +02:00
Translation updater bot cfd33583b3
Localisation updates from https://translatewiki.net.
Change-Id: I189b947ed3f21272f2127df4e43b1bfb60ab60a9
2024-08-15 07:59:24 +02:00
Translation updater bot e2774976ca
Localisation updates from https://translatewiki.net.
Change-Id: Iae2877dc6bb15e29bd3a4e121d1039caa7d34104
2024-08-08 08:07:30 +02:00
Translation updater bot 78d3d3f7d0
Localisation updates from https://translatewiki.net.
Change-Id: I21e9d2b4f4f084051c504b538069c198e049c1c7
2024-08-01 07:54:09 +02:00
Translation updater bot 7d62c97f1f
Localisation updates from https://translatewiki.net.
Change-Id: I740e4322c42f75d34acc2311c950cfdcccea4b03
2024-07-25 08:21:35 +02:00
Translation updater bot 796fb9b8e4
Localisation updates from https://translatewiki.net.
Change-Id: I713ee9a267ada7746523a42258af3bd5905e3a8e
2024-07-18 08:13:55 +02:00
libraryupgrader 77850cc749 build: Updating braces to 3.0.3
* https://github.com/advisories/GHSA-grv7-fg5c-xmjg

Change-Id: I35dc3aca5979167c58aa4cfe7ae3c352a03480e4
2024-06-16 17:23:11 +00:00
Translation updater bot 7ae80a6e2b
Localisation updates from https://translatewiki.net.
Change-Id: I7fccf9f874b80d83f21dd269ae50ba4d6dddedd8
2024-06-13 08:35:13 +02:00
Translation updater bot 1cfef3bca9 Localisation updates from https://translatewiki.net.
Change-Id: Ia28f23267876e356aee05745de56da225816b242
2024-05-23 08:38:09 +02:00
Translation updater bot b9da25711b Localisation updates from https://translatewiki.net.
Change-Id: Id66786436a0dd64f6aea6cffcfc97883b04bb771
2024-05-16 08:29:17 +02:00
Translation updater bot 6d571c3c26 Localisation updates from https://translatewiki.net.
Change-Id: Ica90f1241fcb5911552d1f62715372e2738d54e4
2024-05-09 08:07:37 +02:00
Translation updater bot 2922fa4f70 Localisation updates from https://translatewiki.net.
Change-Id: I32b4799a3c0c5464db2b514511d530ba86266a11
2024-05-02 08:10:42 +02:00
libraryupgrader 00a1b41d72 build: Updating ejs to 3.1.10
* https://github.com/advisories/GHSA-ghr5-ch3p-vcr6

Change-Id: I464e7e699be78ffd530c3c874b8a3e13f77e3674
2024-05-02 03:03:29 +00:00
Translation updater bot e6e62cd1fa Localisation updates from https://translatewiki.net.
Change-Id: Ief89134da3d8801fe59795742c6f1f1d9b836058
2024-04-25 08:30:15 +02:00
Translation updater bot 1200ce2af1 Localisation updates from https://translatewiki.net.
Change-Id: I713678028a21054df987697c9799c3dcd1229765
2024-04-18 08:09:37 +02:00
Translation updater bot 10c9a9ee6f Localisation updates from https://translatewiki.net.
Change-Id: Iacc861a52585392f96dc9aaa56a5b92b06d37df3
2024-04-05 09:37:45 +02:00
jenkins-bot 9744fb10b2 Merge "CodeMirrorWikiEditor: add Realtime Preview handler" 2024-03-28 05:01:03 +00:00
jenkins-bot 91d1d19398 Merge "CodeMirror: copy tabindex attribute from textarea" 2024-03-28 04:55:42 +00:00
jenkins-bot f455d36c15 Merge "CM6: add destroy method, fix removal of textSelection, add more hooks" 2024-03-28 04:49:54 +00:00
MusikAnimal 60013b1f1f Hooks: restore respect of $wgCodeMirrorLineNumberingNamespaces in CM5
Restore the ResourceLoaderGetConfigVars hook which CodeMirror 5 still
relies on when it checks $wgCodeMirrorLineNumberingNamespaces.
In CM6, this is set in the config provided by DataScript.php.

Partially reverts I67518c0968

Bug: T347211
Follow-Up: I67518c0968f64c79e290f57b4884d30a161212d3
Change-Id: Id34858da68f7e08d16f8d1312bbbd355ccf8d140
2024-03-27 22:36:27 -04:00
jenkins-bot f91f08947c Merge "CM6: Add jsdoc build step, fix JSDoc annotations, and add @stable tags" 2024-03-27 05:42:51 +00:00
MusikAnimal 512403afa7 CodeMirrorWikiEditor: add Realtime Preview handler
Realtime Preview is unique to WikiEditor, so we only add support in
CodeMirrorWikiEditor.

Bug: T360708
Change-Id: I2122a114359c74d311777b5f2872149e64d95254
2024-03-26 13:36:30 -04:00
MusikAnimal 432e868f2e CodeMirror: copy tabindex attribute from textarea
The Tab key should navigate to the edit summary from the editor, or to
the Realtime Preview pane if it is open.

Change-Id: I7810bfd098f6b9dd5afab9aa534685d3e4166af6
2024-03-26 13:36:18 -04:00
MusikAnimal 6be3bf62f0 CM6: add destroy method, fix removal of textSelection, add more hooks
CodeMirror is meant to be used without WikiEditor, so we add a destroy()
method that does much the same things as CodeMirrorWikiEditor.

The hooks added with this patch aren't used by anything yet, but offer
feature parity with CodeMirrorWikiEditor, which fires the
'ext.CodeMirror.switch' hook. That hook can't be moved for
backwards-compatibility reasons.

The actual fix for T360075 here was to nullify the `textSelection` class
property.

Bug: T360075
Change-Id: Ife6a3f1ef90df66cd1bf8bab33c9ef3b39ed17a0
2024-03-26 13:35:58 -04:00
MusikAnimal d652f3d2a2 CM6: Add jsdoc build step, fix JSDoc annotations, and add @stable tags
There is a known bug with JSDoc and using `export default`. These must
be separate statements for JSDoc to parse properly.
See https://github.com/jsdoc/jsdoc/issues/1132

Update README; change log now lives on the wiki.

Bug: T359986
Depends-On: I58a0766e35eddaf7bebe2c080757bb09963d8555
Change-Id: Ibc2212ef9eab512511b13a99ecc2ccbda8c52ece
2024-03-26 13:35:47 -04:00
Translation updater bot 3c8f71eb13 Localisation updates from https://translatewiki.net.
Change-Id: I057abb784eb7ae660a0e4d8e00312be235e9ab11
2024-03-25 08:35:35 +01:00
Translation updater bot f1e81a55e2 Localisation updates from https://translatewiki.net.
Change-Id: I8caa4be9f54644bfa1c2a03d5701afde1d9fdc42
2024-03-22 08:43:51 +01:00
MusikAnimal ca02360228 CM6: Switch to using Rollup instead of Webpack; make RL-compatible
See https://w.wiki/9Twh for example usage with ResourceLoader.

Webpack is retired in favor of Rollup, which allows us to convert the
ECMAScript Modules into CommonJS modules for use by ResourceLoader.
We now have a file in dist/ for each RL module that we want to offer,
including the 'lib' module which includes the CM library itself.

Because Rollup has no knowledge of the ResourceLoader module registry,
the generated output requires other modules via relative path, when it
needs to be the RL module name. To get around this, we do a crude
find/replace after the files are generated. Hacky, but necessary to make
CodeMirror usable by gadgets and scripts that don't also want
WikiEditor.

Add new RL modules 'ext.CodeMirror.v6.lib' (vendor code) and
'ext.CodeMirror.v6' (the main CodeMirror class, sans WikiEditor).

Clean up extension.json, listing the v6 modules beneath the old ones.

Bug: T214989
Change-Id: Ide716247e545cf2bdd977bea645729564ebbe6e2
2024-03-19 22:48:52 -04:00
MusikAnimal 00f947e97f CM6: move bidiIsolation to be part of CodeMirrorModeMediaWiki
The extension is custom built for MediaWiki (i.e. handling of extension
tags like <ref> that aren't HTML tags), so it only makes sense to bundle
it as part of the MediaWiki language mode.

Resultantly, we can no longer check the direction of the textarea where
we enable bidi isolation, because the language mode should have no
knowledge of the textarea. Instead we offer a `config` object (akin to
other language modes offered by CodeMirror), with currently only one
option: `bidiIsolation`. It is the responsibility of the caller to
enable this where desired.

Also make templateFolding and CodeMirrorModeMediaWiki use
`export default` since they both only export one thing.

This commit is in preparation for Ide716247e5, where we need bidi
isolation separated from the CodeMirror class due to its dependency on
CodeMirrorModeMediaConfig.

Bug: T358804
Bug: T214989
Change-Id: If3211bd259bd7833919a627faabd86ae7aa81b53
2024-03-19 22:48:34 -04:00
MusikAnimal b18ded0a13 CM6: move more Extensions to CodeMirror so they don't require WikiEditor
We want CodeMirror to be usable outside WikiEditor. This commit moves
the more critical extensions from the CodeMirrorWikiEditor class to the
parent CodeMirror class.

The linked tasks are only broadly related. In Ide716247e5 we will
introduce a ResourceLoader module that makes CodeMirror usable on any
textarea.

Bug: T214989
Bug: T190108
Change-Id: Ib199cf700c3235812f7c9a9bcb3703917f0887de
2024-03-19 22:48:17 -04:00
MusikAnimal d1863e4d0b tests: disable flaky CM5 bracket matching test for 2017 editor
This legacy CM5 test has always been flaky and is now consistently
failing. It can be reinstated with T357482, or not at all, seeing as
bracket matching is a core extension in CodeMirror 6 and probably
doesn't need a dedicated test on top of what's upstream.

Change-Id: I77362c1c47be902cc888682aae926154470f1a56
2024-03-19 22:47:23 -04:00
jenkins-bot ffa569a472 Merge "CM6: put template folding behind feature flag and rework config settings" 2024-03-19 05:45:49 +00:00
Derk-Jan Hartman fbf02b1dc2 Remove dependency on jquery.ui from CodeMirror
Now that RTP has been enabled for a while, we no longer need this and
jquery.ui is deprecated.

Bug: T323329
Change-Id: Idbb92bd4f18e2c6e0adc51d1a3fa909efc129686
2024-03-18 22:19:08 +00:00
Translation updater bot d9ec236217 Localisation updates from https://translatewiki.net.
Change-Id: Idc883aa4cbc25c3b82026257e2ee25ac8ec11aa6
2024-03-18 08:30:34 +01:00
libraryupgrader 396549bb4a build: Updating mediawiki/mediawiki-codesniffer to 43.0.0
Change-Id: I199a98e2f874e201d3ff05dd06df98c6200335db
2024-03-17 16:17:35 +00:00
libraryupgrader b19d4c3383 build: Updating bundlesize to 0.18.2
Change-Id: I746631d5890930cf7d37673d88ce00e49d68c973
2024-03-15 22:32:23 +00:00
MusikAnimal 7e9d90bb52 CM6: put template folding behind feature flag and rework config settings
Template folding is likely going to be a big 'hit' of a feature, but not
everyone will want it. Until CodeMirror prefs are introduced (T359498),
we need a way to control the rollout of template folding. This commit
adds $wgCodeMirrorTemplateFoldingNamespaces which acts similar to the
existing $wgCodeMirrorLineNumberingNamespaces.

We also move template folding to be part of CodeMirrorModeMediaWiki,
since the feature is unique to MediaWiki wikitext.

Move configuration settings to be part of the DataScript, thus removing
the need for the ResourceLoaderGetConfigVarsHook (which unnecessarily
makes the config settings available on every page load).

Other minor changes like adding missing JSDoc blocks.

Bug: T30684
Change-Id: I67518c0968f64c79e290f57b4884d30a161212d3
2024-03-14 23:54:39 -04:00
libraryupgrader 3a6c805135 build: Updating follow-redirects to 1.15.6
* https://github.com/advisories/GHSA-cxjh-pqwp-8mfp

Change-Id: I21a0b0aee97783e57e3860276df6eab3850ac9b6
2024-03-15 00:44:16 +00:00
jenkins-bot 6b2edf37a6 Merge "Remove WikiEditor toolbar z-index override" 2024-03-15 00:27:42 +00:00