Commit graph

1224 commits

Author SHA1 Message Date
Translation updater bot c587a83a50
Localisation updates from https://translatewiki.net.
Change-Id: Idc5b8af4ac5acad8c0b11fd6e713b53fb8f22530
2024-09-06 09:39:03 +02:00
Translation updater bot b8cf07f86f
Localisation updates from https://translatewiki.net.
Change-Id: I5943df57e0abe8c8892b21d2c325b2b8cde7217a
2024-09-05 09:23:03 +02:00
jenkins-bot 23325fe19b Merge "ve.ui.CodeMirror.init: make cm6enable=1 query param work for 2017 editor" 2024-09-05 03:32:46 +00:00
jenkins-bot 7d56c5ee8a Merge "ve.ui.CodeMirror.v6: update gutter width after CM view is updated" 2024-09-05 03:32:45 +00:00
MusikAnimal 5ff54cf7f6 ve.ui.CodeMirror.init: make cm6enable=1 query param work for 2017 editor
Change-Id: I13f31aca84ffd953de31d5ed18c658e9620f72a1
2024-09-04 18:28:02 -04:00
jenkins-bot 8ca0448e3b Merge "ve.ui.CodeMirror.v6: force a normal font-style" 2024-09-04 10:42:06 +00:00
Translation updater bot 373c16ad38
Localisation updates from https://translatewiki.net.
Change-Id: I8e40b8f629ebf645faabd6df6b9b8b6ca7f27c63
2024-09-04 09:16:12 +02:00
MusikAnimal 9f9bd4640a Bump Node version to 18.20.4
Bug: T373937
Follow-Up: Ifc511ef5bd3be9a032a5c80d0b81b4f76afe1e40
Change-Id: I17c912cc5681b5e87f9470994a718910ab6c7242
2024-09-03 20:21:31 +00:00
MusikAnimal 021a4723d5 ve.ui.CodeMirror.v6: update gutter width after CM view is updated
This fixes a bug in the 2017 editor implementation where changes to the
gutter width were calculated before the gutter element was updated.
This fix prevents misalignment issues when copying and pasting large
amounts of content.

Bug: T373649
Change-Id: I74bcbc46b0b62ff2ed138fe57d852a3cd87c22d0
2024-09-03 15:45:52 -04:00
MusikAnimal 8e545a27d6 ve.ui.CodeMirror.v6: force a normal font-style
Bug: T357482
Change-Id: I91dd0b745683e316551733e033c0df3a0e3d6a0a
2024-09-03 14:46:41 -04:00
jenkins-bot 87daa30df0 Merge "CodeMirrorWikiEditor: make WikiEditor search button open CM search panel" 2024-09-03 15:59:18 +00:00
jenkins-bot 74aeccf9c6 Merge "Implement dark mode styles and use Codex CSS components in search panel" 2024-09-03 15:59:15 +00:00
Translation updater bot 2263d5050c
Localisation updates from https://translatewiki.net.
Change-Id: I13444f696b6a2786cceb02fd09c5343770cecb32
2024-09-03 09:31:55 +02:00
Translation updater bot 7890ebc334
Localisation updates from https://translatewiki.net.
Change-Id: Ic4cbb937827d897220d8b1720af1e2baef1497f7
2024-09-02 09:20:23 +02:00
MusikAnimal b27c9843b5 Remove $wgCodeMirrorRTL as redundant config setting
This was introduced in Iac30ffe274 to control the rollout of CM6 to RTL
wikis separately from LTR wikis because of various bugs. While RTL still
isn't perfect, it is stable enough now (hewiki has not complained) and
the 2017 editor is also fully supported. Thus, we no longer need this
feature flag.

Bug: T170001
Change-Id: Ia439527aaab07644b358cedf9603cd9d148b6608
2024-08-30 22:03:07 +00:00
MusikAnimal 975db1f6b1 ext.CodeMirror.js: emit deprecation warning when using CM5 on CM6 wiki
If CodeMirror 6 is enabled and a request is made for ext.CodeMirror
(which is a dependency of all CM5 modules), emit a warning. This should
only effect scripts and gadgets on the WMF cluster.

The CM5 ResourceLoader modules will later be tagged as deprecated after
CM6 is rolled out to all WMF wikis.

Bug: T373720
Change-Id: Ia25e896b80766b5b16b9b69343f24557007b5570
2024-08-30 17:47:21 -04:00
MusikAnimal 2abaedf4c3 ve.ui.CodeMirror.v6.less: Use white-space: break-spaces
This is the CodeMirror 6 port of I62cb4c4f55.

Bug: T347902
Change-Id: I198eb125a951ab6dbff41395ff226b0f410fde26
2024-08-29 19:59:17 -04:00
MusikAnimal 43c6e59484 CodeMirrorWikiEditor: make WikiEditor search button open CM search panel
It seems odd to have multiple ways of searching. The CodeMirror
implementation follows modern day UI standards while still offering the
same functionality, so we hijack the search button to use it instead of
the jQuery UI-based WikiEditor search dialog. The dialog is restored if
CodeMirror is switched off.

Bug: T372171
Change-Id: Iab897a17a01b7e04a13a8725afd2eb9e802776ba
2024-08-29 23:19:34 +00:00
MusikAnimal 81ec0c292a Implement dark mode styles and use Codex CSS components in search panel
Use Codex design tokens where possible, and implement custom dark
theming for things for which there is no suitable design token.
This means we're changing the colors for light mode ever so slightly.

We need to style the search panel for dark mode, so we might as well
tackle T371436 and use CSS-only Codex components. The same is done for
the "Go to line" panel (can be opened with Mod+Alt+g). The messages in
this panel are now also localizable.

The search panel (and goto line panel) are abstracted, with helpers to
create the Codex components. These will not only be used here but also
for the upcoming preferences panel (T359498).

Visually, the search and goto panels were inspired by the 2017 editor
and share a similar layout. CodeMirror similarly uses a more compact
design than usual to maximize the real estate of the editor itself.

Other changes:
* Bump codemirror/search to get latest bug fixes
* Remove stylelint ignorance and fix errors
* Move CM5 styles to ext.CodeMirror.less
* Move CM-specific styles out of mediawiki.less and into codemirror.less
* Move WikiEditor-specific styles to codemirror.wikieditor.less
  (incidentally, these only apply to CodeMirror 6)
* Correct qqq documentation; the "dialog" should be called a "panel"
* extension.json: alphabetize list of messages

Bug: T365311
Bug: T371436
Bug: T359498
Change-Id: I6a3bbc6bce4e490886753ff484e377c1763de456
2024-08-29 18:59:57 -04:00
Translation updater bot 6a1f2fdb00
Localisation updates from https://translatewiki.net.
Change-Id: Ib3da1bc0ddb1320a8061bf2968982baa6d389312
2024-08-29 09:17:35 +02:00
jenkins-bot dfaf68e203 Merge "build: Updating micromatch to 4.0.8" 2024-08-28 20:21:31 +00:00
Translation updater bot 56d9cc572e
Localisation updates from https://translatewiki.net.
Change-Id: Idc1ce91c2cb4763a42409634bd9af37244346690
2024-08-28 09:37:30 +02:00
Translation updater bot 7828d42109
Localisation updates from https://translatewiki.net.
Change-Id: I523c2ae19ee492506a0f0c226d1bb6e137c82056
2024-08-27 09:47:22 +02:00
jenkins-bot 56f63a0bba Merge "CodeMirrorWikiEditor: use new icon and add text to toggle button" 2024-08-27 04:10:54 +00:00
jenkins-bot 305ef18570 Merge "CodeMirror 6 style for VE 2017 wikitext editor" 2024-08-26 17:44:01 +00:00
Translation updater bot 7660ca42fb
Localisation updates from https://translatewiki.net.
Change-Id: Ife2adcbae823e4e83151ffa25ea630e49c7f096b
2024-08-26 09:21:53 +02:00
libraryupgrader 09114d3d25 build: Updating micromatch to 4.0.8
* https://github.com/advisories/GHSA-952p-6rrq-rcjv

Change-Id: I7e224e1a9eb8b01b9b6938f19f4ff286aa00f692
2024-08-24 20:52:56 +00:00
bhsd f144dc1051 CodeMirror 6 style for VE 2017 wikitext editor
Styles for CM6 are not supposed to leak into non-CM VE surfaces.

Bug: T373152
Change-Id: I32eea08961fc7b200d4b89d5fedf55b642fa3261
2024-08-24 01:42:08 +08:00
jenkins-bot 17d8500c6f Merge "build: Update MediaWiki requirement to 1.43" 2024-08-23 03:29:51 +00:00
Bartosz Dziewoński e439fb02eb Fix too many '..' in require()
Bug: T373065
Bug: T373153
Change-Id: Ia00add5d98173e2c3d8568e92c427864014e7257
2024-08-22 22:10:38 +00:00
James D. Forrester bb7c05ac6e build: Update MediaWiki requirement to 1.43
All extensions in Wikimedia production are expected to track MediaWiki's release directly.

Change-Id: Ic8858a0313a8486a863f2941da1e656c33f1ec98
2024-08-22 16:48:01 -04:00
jenkins-bot 7b7c0e3550 Merge "Hooks: use CM6 wording for colorblind preference" 2024-08-22 07:24:11 +00:00
jenkins-bot 05db91241d Merge "CodeMirrorModeMediaWiki: indented table" 2024-08-21 21:09:48 +00:00
jenkins-bot 0b52e3b125 Merge "selenium: Document when, how and why a test is skipped" 2024-08-21 09:57:58 +00:00
MusikAnimal 2ad096a580 ve.ui.CodeMirrorAction.v6: use infinity viewport to avoid misalignment
The 2017 editor has an infinite viewport, meaning the entire document is
printed on page load. CodeMirror 6 meanwhile only processes text in the
visible viewport. This presents a situation where if large chunks of
text are inserted outside the visible range (such as the "Changes
recovered" feature of VE), it can cause misalignment of the VE surface
and visible CodeMirror layer, as CodeMirror has not accounted for the
off-screen lines of text.

CodeMirror 5 had a `viewportMargin: infinity` option that prevented this
issue, but at the cost of performance. CodeMirror 6 removed this option,
but the same effect can be achieved by tricking CodeMirror into thinking
we're printing the document, in which case it will process all lines.
This seriously hurts performance, and is a nasty hack, but until the
2017 editor is reworked to have a viewport, there may be no other means
to prevent the misalignment.

The discovery of this issue and the fix are courtesy of Fandom engineers

Bug: T357482
Change-Id: If11ce48459e8faf55015108e8c2eabdc16e0d917
2024-08-20 14:08:04 -04:00
Translation updater bot a921171236
Localisation updates from https://translatewiki.net.
Change-Id: Ic80bf56c8809a2cd13beaf405c251fc5eacff4dc
2024-08-20 09:42:01 +02:00
John Bolorinos 608c799aa8 selenium: Document when, how and why a test is skipped
Bug: T280652
Change-Id: I065c6ff4f50626904fde2d3e676c4b71d62c43e0
2024-08-19 15:02:18 +02:00
Translation updater bot 84c9051241
Localisation updates from https://translatewiki.net.
Change-Id: Iad21458855117c703abd5a10edaebbad69e568cf
2024-08-19 09:22:41 +02:00
MusikAnimal 1413e288c6 Hooks: use CM6 wording for colorblind preference
The message existed since I4bc069e0d3 but accidentally went unused.

Change-Id: Ic03ec526d7f807e6031e495f033c6fce1b6bb51a
2024-08-15 01:33:43 -04:00
bhsd f23f487028 CodeMirrorModeMediaWiki: indented table
This is a follow-up of the patch 1032770, which misses one type of indented table in the test. It also specifies a unified `cm-mw-indenting` CSS class for all types of table indentation.

Bug: T108454
Change-Id: I77174cf3fa56382add6d80bf2ec7106c9b2cb642
2024-08-15 12:59:13 +08:00
jenkins-bot 75710d6d05 Merge "CodeMirrorModeMediaWiki: various small fixes" 2024-08-15 03:10:01 +00:00
jenkins-bot 2973880c28 Merge "CodeMirror: add Ctrl+Shift+z as redo shortcut on Windows" 2024-08-14 23:10:58 +00:00
jenkins-bot 61d71a5f53 Merge "Use dispatchEvent instead of jQuery triggerHandler for focus/blur events" 2024-08-14 23:10:56 +00:00
jenkins-bot c079dab531 Merge "CodeMirror 6 for VE 2017 wikitext editor" 2024-08-14 08:57:35 +00:00
Translation updater bot 76daceca00
Localisation updates from https://translatewiki.net.
Change-Id: I4afa253d54f04fc2cc1ac078aa3153adb3696b39
2024-08-14 09:22:15 +02:00
Translation updater bot 601809c398
Localisation updates from https://translatewiki.net.
Change-Id: Ie18f6ee98278aa546985c465449c29286bf68932
2024-08-13 09:50:22 +02:00
libraryupgrader 4fd186c142 build: Updating mediawiki/mediawiki-codesniffer to 44.0.0
Change-Id: I8e4e1901da3f1bd416d7dc2c85fbaa5ac9fb20c0
2024-08-11 04:36:17 +00:00
Taavi Väänänen 7e0d3cf2fd
build: Upgrade stylelint-config-wikimedia to 0.17.2
And convert the disable statements to individual ones so LibUp can
automatically push the next upgrade.

Change-Id: Id5fbfb4ebf4641c7577a4e2be2ab8bae678227c7
2024-08-10 08:03:19 +03:00
MusikAnimal 27b6aaebcc CodeMirrorWikiEditor: use new icon and add text to toggle button
For years, users have complained that the CodeMirror toggle button is
confusing and concealed. The icon looked too similar to the edit icon,
when it was supposed to be a highlighter. The new icon is similar but
has a highlighted line to help clarify what it is. We also now have the
text 'Syntax' accompanying the icon. Translators are instructed to try
to be brief to conserve space in the toolbar. "Syntax highlighting" is
the full correct term, and remains the text for the button's tooltip.

The new icon is ~0.3KB uncompressed, just meeting performance guidelines
for using @embed <https://w.wiki/AsPW>. This is also only temporary until the icon is upstreamed in Codex/OOUI.

New icon courtesy of Thiemo Kreuz (WMDE)

A corresponding change for the 2017 editor will follow I15453b33e7.

Bug: T174145
Change-Id: Ib6dbfc261214ed6672c1a54738e3401fa2f5d262
2024-08-09 06:08:33 +00:00
Translation updater bot f7d64fd0ee
Localisation updates from https://translatewiki.net.
Change-Id: I9c6f2b49bf726d8c51e0e90de14c6d9a78a92b9d
2024-08-06 09:46:18 +02:00