Commit graph

2950 commits

Author SHA1 Message Date
WMDE-Fisch e44c406ba2 Import theme-wikimedia-ui.less for storybook build
Not sure when this should have been added but the test were
failing because of this missing ressource.

Change-Id: I0267aae18d0f33ac3d607fb0b6013f108f2e5d83
2023-06-30 08:22:47 +02:00
Translation updater bot e8001c0c1a Localisation updates from https://translatewiki.net.
Change-Id: Ie9626aee24a078b648d78b77137e9846e79e9ac7
2023-06-26 12:40:35 +02:00
Translation updater bot 28481af224 Localisation updates from https://translatewiki.net.
Change-Id: I73c72d93173d0319809bc40d5a7f420f11739593
2023-06-19 11:07:48 +02:00
jenkins-bot 655f08aa8a Merge "Publish coverage file" 2023-06-15 16:38:24 +00:00
Jon Robson bf63e2bc6e Publish coverage file
Context [[mw:Topic:Xk10fxsoqth6scfz]]

Change-Id: Ic99cf9bdffdeb56a6182e650d3878902696c0df0
2023-06-15 08:53:39 -07:00
Volker E 4132ee96ab build: Update SVGO to v3.0.2
svgo         2.8.0  →   3.0.2

Amending to new `cleanupIds` plugin name.

Bug: T339162
Change-Id: I8ad37e46501c36883967827b4d622788ae9065f1
2023-06-14 12:32:01 -07:00
Jon Robson 049729626c IP masked users use localStorage for settings
Bug: T330517
Change-Id: Ib283e37f379e8cccc7f49ab0ce9aadd6535ea668
2023-06-14 08:16:50 -07:00
jenkins-bot 140c9bf1ab Merge "Discourage jQuery usage in Popups extension" 2023-06-14 14:24:10 +00:00
Translation updater bot 2f38a45e83 Localisation updates from https://translatewiki.net.
Change-Id: I8d300a9bc7979a07e29f1ec57622a32eeafb3715
2023-06-14 13:07:45 +02:00
Jon Robson 580067b94e Discourage jQuery usage in Popups extension
Change-Id: Iff0c81e4c1d78cc52d1bd9d81e24d8fae228c9bc
2023-06-13 15:39:57 -07:00
jenkins-bot e8204a5aca Merge "Prevent Enabling Beta Preferences for temp users" 2023-06-12 19:10:02 +00:00
Translation updater bot ca52ea132f Localisation updates from https://translatewiki.net.
Change-Id: I3d0fd448fa69bdb762e4eec17757e53e547a1377
2023-06-12 13:08:00 +02:00
Translation updater bot 19080f1cc3 Localisation updates from https://translatewiki.net.
Change-Id: I19c6ddbf9b619e06cc8265d4fa78f7517fc09ce8
2023-06-09 09:14:35 +02:00
AnaïsGueyte 1f5510bc2a Prevent Enabling Beta Preferences for temp users
Bug: T337776
Change-Id: I3e7c9524a405d62796dca42abe3d04fa5025dc81
2023-06-08 11:39:48 -02:30
Translation updater bot 808d8bcd6c Localisation updates from https://translatewiki.net.
Change-Id: I88fd11e853895f128ae7a6618376982c1b454e95
2023-06-06 08:11:40 +02:00
Translation updater bot bcd802659c Localisation updates from https://translatewiki.net.
Change-Id: I8865384dfa1bce452e2671f01ba543643dd2bac9
2023-06-02 09:24:38 +02:00
libraryupgrader faa3c63af8 build: Updating npm dependencies
* grunt-banana-checker: 0.10.0 → 0.11.0
* stylelint-config-wikimedia: 0.14.0 → 0.15.0

Change-Id: Ie2be62f89f01533a83982880a0ea7a2a71405b37
2023-06-02 01:01:00 +00:00
Translation updater bot 484c932ea7 Localisation updates from https://translatewiki.net.
Change-Id: Idd681e0220beb624f60168ec2d1e4274dc6b3a5c
2023-05-29 09:59:55 +02:00
jenkins-bot a38f4c5336 Merge "Prefer native JavaScript to jQuery" 2023-05-26 03:22:52 +00:00
libraryupgrader 32778684af build: Updating npm dependencies
* @wikimedia/codex: 0.10.0 → 0.11.0
* @wikimedia/codex-icons: 0.10.0 → 0.11.0

Change-Id: Ic5218ad62e27900eb6a96461d9aa9126829f70e0
2023-05-24 00:54:43 +00:00
Translation updater bot 523b76bdb4 Localisation updates from https://translatewiki.net.
Change-Id: I8723840ed5f21cbb486745c289a6b6d018174dde
2023-05-22 08:46:22 +02:00
Jon Robson 7c592bc790 Prefer native JavaScript to jQuery
Bug: T315929
Change-Id: I949fd9551269a3cb9d9df7744149510949d3076c
2023-05-21 16:53:50 +00:00
Umherirrender 9da6586158 tests: Make PHPUnit data providers static
Initally used a new sniff with autofix (T333745)

Bug: T332865
Change-Id: I1a585a5e81ad0355b3be806da249e632f3fd21ec
2023-05-20 13:56:14 +02:00
libraryupgrader 3840382ba1 build: Updating npm dependencies
* @wikimedia/codex: 0.9.1 → 0.10.0
* @wikimedia/codex-icons: 0.9.1 → 0.10.0

Change-Id: I5e8d4af946ae8d679f9cedbe34eac9f221035bef
2023-05-17 00:51:30 +00:00
Jon Robson 323d770d66 Use native JavaScript to build thumbnail clip path
Change-Id: Ib5d734fde88eaa20ec866722af3de37abe694add
2023-05-16 17:19:47 -07:00
Jon Robson 1ee66bbf72 Don't use parseHTML in parseHTMLResponse
These changes impact the preview itself and the settings
dialog which shows to anonymous users

Change-Id: If288161fb5eb4446a79e68841ab53a6c713f1d3a
2023-05-16 17:18:06 -07:00
Umherirrender 7a6cac8a64 build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: Ic511f54b58947a2694514e2d417e022bdeae219d
2023-05-16 00:22:03 +02:00
Jon Robson 875f7ffcad Use native JavaScript for creating the footer link
The footer link shows when a page preview has been disabled
by an anonymous user via the settings cog.

Change-Id: I236a620322716f42443fc3d90a0405352132a99f
2023-05-15 14:19:41 -07:00
Jon Robson 3bd4275023 Fix test case with type with space in it
Types should not have spaces in them. In the current example this
results in a page preview element with an additional class "<"\'>"
I'm not sure what this is protecting against since we can trust types
to always be in a sensible class friendly form. It would be better
to throw an error in the mw.popups.register function than allow this.

Change-Id: If08c5162c1ca0fc3db4944092231061e22113263
2023-05-15 14:18:39 -07:00
Jon Robson 76973662d1 Fixes: Uncaught TypeError: n.closest is not a function
Previously we did a try/catch when closest didn't exist. Now that's
gone we're flagging this issue.

Follow up to Ia45c03d1fd6949bf83ebed6d40075e453e42cdd7

Bug: T336650
Change-Id: I7a4f453ae1a4a8222863a8342a27d615883d339a
2023-05-15 07:27:22 -07:00
Translation updater bot de881b7e6e Localisation updates from https://translatewiki.net.
Change-Id: Icb38c173922d97885351246571a93b7381576caf
2023-05-15 08:33:35 +02:00
Jon Robson 428c32d027 Switch to native Promises and fetch
For fetch and AbortController we provide native polyfills (see
resources/src/skip-web2017-polyfills.js) so safe to use this here.
This will be empty for modern browsers.

Change-Id: Ic0f55eb0a0276be3587a4b866834bddff1124ad2
2023-05-12 21:34:42 +00:00
Jon Robson 8f03303dc4 Restrict page previews to browsers that support multiple not selectors
Change-Id: Ia45c03d1fd6949bf83ebed6d40075e453e42cdd7
2023-05-12 13:43:18 -07:00
Jon Robson d4376bf203 Load Modules support initialization
Rather than obscurely loading instrumentation code as a side
effect of loading UI code, run it explicitly inside the index.js
initalization code. Instrumentation is moved to its own file
and Popups modules now support an init function.

Change-Id: I9d2643ec8fb4e1dedc7ab9534b2965272f12335f
2023-05-11 23:22:51 +00:00
Translation updater bot 12e823ddbf Localisation updates from https://translatewiki.net.
Change-Id: I9cad95eb5b9c3ab409a250cbc92628bcd19313dc
2023-05-10 08:41:40 +02:00
jenkins-bot 6b8cff5e66 Merge "Fixes flakey test: it should resolve after waiting" 2023-05-10 00:33:09 +00:00
Jon Robson 7ff66a50b0 Fixes flakey test: it should resolve after waiting
Change-Id: I6d63fa2d316af296401eaa3dabee10375e73108b
2023-05-09 10:43:56 -07:00
Volker E c9052a599a storybook: Remove unused reference to 'mediawiki.ui/variables'
Follow-up to If35605e8336c8619c6230bc892b360edbfd16f62

Change-Id: I0a229b86ea7a6b4e804dfe474485d627a2a1ed35
2023-05-06 05:18:05 -07:00
Translation updater bot ec4858119f Localisation updates from https://translatewiki.net.
Change-Id: Id37c76c95dee04c4b136d5d7a3e611725735577d
2023-05-05 10:40:36 +02:00
jenkins-bot 2d4f399689 Merge "ES6: Prefer Object.assign and Promise to jQuery" 2023-05-02 21:37:54 +00:00
Translation updater bot 837ee35ee4 Localisation updates from https://translatewiki.net.
Change-Id: I7412461e6860cfb318ef538f642a52c25f048296
2023-05-01 09:58:28 +02:00
libraryupgrader 12081b5a7b build: Updating mediawiki/mediawiki-phan-config to 0.12.1
Change-Id: Ibe51650df33fc6c57ac7e1174372325b21d3cabd
2023-04-29 09:08:54 +00:00
libraryupgrader 97855ef2f4 build: Updating npm dependencies
* @wikimedia/codex: 0.8.0 → 0.9.1
* @wikimedia/codex-icons: 0.8.0 → 0.9.1
* less: 3.8.1 → 3.13.1

Change-Id: Idb363fba64495430bbc97e044d2047dec450e7cf
2023-04-27 00:25:44 +00:00
Translation updater bot 470fce8cf5 Localisation updates from https://translatewiki.net.
Change-Id: I125aa75fb50f7e4b93ebca10e944a7ad331a77a8
2023-04-24 09:16:58 +02:00
Jon Robson f9b9feaff5 ES6: Prefer Object.assign and Promise to jQuery
Additional change:
* Lint dist folder as ES6 code now ES6 is everywhere

Change-Id: Ie77046f5c6fbdafa4679dbaf97f7bf6f16292b9c
2023-04-19 17:02:14 -07:00
jenkins-bot e13363fa2d Merge "styles: Replace 'mediawiki.ui/variables' call with skin variables" 2023-04-16 10:48:19 +00:00
Jon Robson 2969d67256 Use native JavaScript for event handling
Change-Id: I786d906217ac42f54d498df05b6a172371db7808
2023-04-14 15:39:22 -07:00
gerritbot 5775a5a37f styles: Replace 'mediawiki.ui/variables' call with skin variables
Replacing 'mediawiki.ui/variables.less' @import with
new skin-aware 'mediawiki.skin.variables.less' standard.
Also
- replacing several static values with new Codex design token featuring
  skin variables of `background-color`, `color`, `border-` and
  `opacity` category
- renaming three Less variables to variable naming standard

Please note, that this patch is not replacing all values with
possible Codex tokens. It's just applying them on selected
categories for consistency for now to keep the patch easier reviewable.
Further replacements will be done in follow-up patches.

Bump MediaWiki core required version to >= v1.41.0.

Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Change-Id: If35605e8336c8619c6230bc892b360edbfd16f62
2023-04-13 05:31:50 -07:00
Umherirrender 3573232c21 build: Updating npm dependencies
* eslint-config-wikimedia: 0.22.1 → 0.24.0
* @wikimedia/mw-node-qunit: 6.3.3 → 7.0.0

Change-Id: I348eb70bfc6c1d6c922c8290152926183712dee1
2023-04-03 23:14:47 +02:00
Jon Robson ec50f3f6ff Fix storybook integration
Broken by If2b4073115d9082829e4917c87c167d18f5431d9
Change import to directly hit the Codex library
This should also allow web team to respond to Codex upgrades
at their own pace (via package.json)

Render functions must now be registered in storybook for
them to display. Follow up to
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4

Change-Id: Iac9dede15f4de3a4d584f1e505e379764af6dcbf
2023-03-30 15:36:05 -07:00