Commit graph

2803 commits

Author SHA1 Message Date
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
Umherirrender 5f18164beb build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: I98f17b481d4ba56a8cd87fcafb1fc2efdaa8abe7
2023-03-28 20:18:47 +00:00
Jon Robson d12c4fe1d8 Don't sync non-existent value
eventlogging reducer was removed in
I640ab367cd235ab8da7dd70dbef7ae9076712e84 so this is syncing
a non-existent value.

Change-Id: I58386bf9a0219f6344c08f757af3aaafbae92751
2023-03-22 19:15:53 +00:00
Jon Robson 24925ec459 Fix storybook integration
Broken by Ie456dfbd703a0e7a0ad783909ca3ef5e86450d9c

Change-Id: I4b6a4817764210cbc4f9ce37be0f117dbc3b656b
2023-03-22 11:39:39 -07:00
Translation updater bot 500e0cd9d1 Localisation updates from https://translatewiki.net.
Change-Id: I549f3820d669da1f7180fa839c044cf7dea0efc6
2023-03-20 09:02:17 +01:00
libraryupgrader 7ccf2f0f3a build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 41.0.0
* mediawiki/mediawiki-phan-config: 0.11.1 → 0.12.0

npm:
* eslint: 8.9.0 → 8.31.0
* grunt-banana-checker: 0.9.0 → 0.10.0
* @wdio/mocha-framework: 7.4.6 → 7.30.2
* svg-inline-loader: 0.8.0 → 0.8.2
* decode-uri-component: 0.2.0 → 0.2.2
  * https://github.com/advisories/GHSA-w573-4hg7-7wgq
* deep-object-diff: 1.1.7 → 1.1.9
  * https://github.com/advisories/GHSA-653v-rqx9-j85p
* http-cache-semantics: 4.1.0 → 4.1.1
  * https://github.com/advisories/GHSA-rc47-6667-2j5j
* terser: 4.8.0 → 4.8.1
  * https://github.com/advisories/GHSA-4wf5-vphf-c2xc
  * https://github.com/advisories/GHSA-4wf5-vphf-c2xc
* ua-parser-js: 0.7.31 → 0.7.34
  * https://github.com/advisories/GHSA-fhg7-m89q-25r3

Change-Id: I11c9ba8212c9103e92baa5ebc09f9214b04851ff
2023-03-12 08:46:52 +00:00
Translation updater bot e166673332 Localisation updates from https://translatewiki.net.
Change-Id: Iecb25deb3d4958bd794fc646d80979a0bb962117
2023-03-06 08:34:02 +01:00
Translation updater bot 8356581aef Localisation updates from https://translatewiki.net.
Change-Id: I0ef71b1bcabc2ff9ea4502c3c5d0a847222a923d
2023-03-03 08:48:55 +01:00
Translation updater bot 59ac5636b9 Localisation updates from https://translatewiki.net.
Change-Id: I49cf606f4153541aa0136d22bb6caabb910b4e69
2023-02-28 08:29:28 +01:00
Translation updater bot a01979de92 Localisation updates from https://translatewiki.net.
Change-Id: I081a1a94622b1ad66c23441034680dbbe31d6e8c
2023-02-22 09:01:17 +01:00
Translation updater bot 6ce288409b Localisation updates from https://translatewiki.net.
Change-Id: I86030bc94926e21d443083ffb702c1bb656f8fe4
2023-02-21 08:21:37 +01:00
Jon Robson 11da8483f0 Remove targets definitions and limit page previews to ES6 browsers
I noticed that page previews is currently not working for ES5 users
as ext.maths.popups is an ES6 module which causes the
mw.loader call inside ext.popups/index.js to reject meaning the
feature never gets activated. This was broken in
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4.

I talked to Olga about whether we should restore ES6
support for page previews, and given the recent trend away
from IE11, we decided it made sense to drop page previews
support for ES6 users.

Bug: T328497
Bug: T329901
Change-Id: Icbd683b12c47491eba4de6b5a14afce4465553b9
2023-02-16 13:43:27 -08:00
Translation updater bot 93efdf9b25 Localisation updates from https://translatewiki.net.
Change-Id: I87717f443ec8df622428de4244774641b591f4f2
2023-02-13 08:30:51 +01:00
Translation updater bot fdc90f5e81 Localisation updates from https://translatewiki.net.
Change-Id: I7dda561ed907abbe615718620a10a6d796ce8bc6
2023-02-08 08:40:26 +01:00
Translation updater bot a55c514a10 Localisation updates from https://translatewiki.net.
Change-Id: I88485a14bb22fb4b8af91986c2210fb5ae449dc9
2023-02-06 08:45:54 +01:00
Wandji69 dbcccbae8e styles: Replace deprecated Less mixin calls with unprefixed CSS property
Replacing `.transition()` calls.

Bug: T308351
Change-Id: I6d558f38de81910d701a2e18aeb736a100e5a8ab
2023-02-03 20:39:49 +00:00
jenkins-bot 808f34361b Merge "Expand tests to include hash fragment behaviour" 2023-02-01 11:41:54 +00:00
Jon Robson 119483bdd8 Expand tests to include hash fragment behaviour
Bug: T198652
Change-Id: Ic43883d7092499386df35e6fe049863cbffbe635
2023-01-30 19:25:22 +00:00
Translation updater bot 4171ff0fbf Localisation updates from https://translatewiki.net.
Change-Id: Ie3e32b629b524b01ce922df08c0de66a3e72b53e
2023-01-30 08:30:42 +01:00
Translation updater bot 81b490a5b2 Localisation updates from https://translatewiki.net.
Change-Id: Ib0b48c58fed455448362013ff1a80bb704a93634
2023-01-26 08:52:29 +01:00
jenkins-bot 60abdd1ab6 Merge "Performance: Remove unnecessary requestIdleCallback delay" 2023-01-25 09:50:40 +00:00
jenkins-bot 2a24ffe6ac Merge "Tests: correction to unit test" 2023-01-24 10:57:41 +00:00
Translation updater bot a295898858 Localisation updates from https://translatewiki.net.
Change-Id: I0c35d865144aabe83d79ef0ba71ecbcaecec2d1f
2023-01-24 08:49:32 +01:00
Jon Robson fb0ac8e270 Tests: correction to unit test
Follow up to
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4

Change-Id: Ib3beda14aa3e94def5833082148b7395bc378d74
2023-01-23 10:22:07 -08:00
Translation updater bot 46827f70c6 Localisation updates from https://translatewiki.net.
Change-Id: Ib938b26440f85b59c8acf0864230f2908d4b5451
2023-01-23 08:23:49 +01:00
jenkins-bot 058122e80f Merge "Don't show page previews on hash fragments" 2023-01-18 21:59:53 +00:00
Translation updater bot ca520e8ee0 Localisation updates from https://translatewiki.net.
Change-Id: I19b499cfa35fe9d47d1d02272d693c10cde354c1
2023-01-16 08:29:15 +01:00
Vaughn Walters a7dba1c602 selenium: Remove webdriverio npm package from the Popups extension
The `webdriverio` package does not need to be an explicit dependency.
It is a dependency of `@wdio/cli`.

Bug: T325059
Change-Id: I9d72d936e763dde9bc6d21708bf03fd39ee32ba0
2023-01-13 11:38:43 -06:00
Jon Robson 7ab0b63f80 Don't show page previews on hash fragments
Bug: T198652
Change-Id: I036266bf4fb98ffa20509440e553b29e8dcc4e1f
2023-01-11 15:21:47 -08:00
Translation updater bot a13db172f3 Localisation updates from https://translatewiki.net.
Change-Id: I9d6332e25be49909989b2c676937c498828745b4
2023-01-11 09:02:25 +01:00
Jon Robson 2517c6d32f Performance: Remove unnecessary requestIdleCallback delay
Load page previews as quickly as possible.
According to performance team it should be beneficial to remove
this (See Ibc01f6a82692c7dd3d4a866354ab975af114e7b0 for more
information) and it's not a recommendation. its existence
in this codebase is leading to misunderstandings elsewhere.

Change-Id: If183d9ca07d98c03c957f359c13ca8e2ede7ad58
2023-01-09 16:57:05 +00:00
Translation updater bot c9366fda5d Localisation updates from https://translatewiki.net.
Change-Id: I8e12f4f9162b756c798a5cc7a6eddaffa2d9fb99
2023-01-09 09:28:28 +01:00
Translation updater bot 79aae50c7a Localisation updates from https://translatewiki.net.
Change-Id: I7d166e1e6ed71a294523b1e14573158cea019235
2023-01-06 08:56:05 +01:00
Translation updater bot 209777a485 Localisation updates from https://translatewiki.net.
Change-Id: I48b8231870fb68cad4efb4717d142aae69b854d9
2023-01-05 09:10:16 +01:00
Translation updater bot 35196f1908 Localisation updates from https://translatewiki.net.
Change-Id: I6c83a2c20297412aab28bf42ae9b9852c490876f
2022-12-26 09:10:53 +01:00
Translation updater bot 9cb4f459cc Localisation updates from https://translatewiki.net.
Change-Id: I60c27057f67b9f768f4feaf15d6bf7274630a418
2022-12-21 09:17:24 +01:00
Translation updater bot 845c859828 Localisation updates from https://translatewiki.net.
Change-Id: I29dc1623225620b5c786a2ad6c518111d7c42b22
2022-12-19 09:04:37 +01:00
Fomafix 76e2339cec Inject service UserOptionsManager in Hooks
Change-Id: I690699210c041f950a076904b863bc014833e5ad
2022-12-15 22:13:23 +00:00
Jon Robson 7295ee3a6a Account for syntax errors in closest selector
Certain browsers have the closest method but do not
support not selectors with multiple arguments. This
variant caters for both.

Bug: T325113
Change-Id: Ib5fc912bfe0f831fea4c9882c25b27541d83b66f
2022-12-13 14:14:35 -08:00
Jon Robson 01e3ddcda5 Child elements also trigger previews
Follow up to
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4 where we switched from the
jquery event delegation pattern to native methods. One thing that we
overlooked was that we also need to consider the case where the selector
matches the parent of an element, for example a span nested inside an
eligible link. I've rethought this logic, to first find the closest
eligible element to normalize the element passed to model methods
before running matchesSelector.

Bug: T325007
Change-Id: I4133751dc900a51829173e9c0d965cbb18e6a33e
2022-12-13 00:52:37 +00:00
Translation updater bot f642345625 Localisation updates from https://translatewiki.net.
Change-Id: I4c62abd08e3e85e85df6efbdac2d79b6724bc18b
2022-12-12 08:22:53 +01:00
Jon Robson 898fc81998 Avoid syntax error on hover in grade C browsers
Adjust the logic of elementMatchesSelector to fallback
to jQuery when the native matches fails.

Follow up to
Iefe98c1f0422dbf034e385b1a41a859d030a2cf4

Bug: T324514
Change-Id: I0e9e894e77e2eb29fee65853aa98b141bc2a11a3
2022-12-06 07:41:22 -08:00
jenkins-bot 94c251583e Merge "Extensible previews" 2022-12-02 17:02:04 +00:00
Translation updater bot 37e6bf20ac Localisation updates from https://translatewiki.net.
Change-Id: I3dc42dcc53f85bd0b9d0ad9f435b6863e46fbd7d
2022-12-01 08:16:33 +01:00
Translation updater bot 79d3b32947 Localisation updates from https://translatewiki.net.
Change-Id: I9525080a41141116168e8c18d75b48e77b3ac5aa
2022-11-25 08:26:38 +01:00
Translation updater bot d0f6e7df8b Localisation updates from https://translatewiki.net.
Change-Id: I7e80d694ae6fae3faf6fbab8528e28ea5e4de283
2022-11-24 08:18:02 +01:00
Jon Robson 0febc3f54d Extensible previews
Allow extensions to register new types of previews via
extension attributes.

Changes:

- The check for reference previews doesn't make sense
as $('a[ href*="#" ]' ) will match any elements with a hash
fragment, so the additional check to Title.getFragment
will not provide a different result. This was introduced in
I9ec57e0fbb0d21beaaa7b359c1c2bef64d2c14f5
- Links that point to themselves are marked with mw-selflink
in MediaWiki so this can use the not selector we already have.
- The new API is used internally and only available via extension
Attributes
- An example is provided in SkinJSON
(https://github.com/jdlrobson/mediawiki-skins-skinjson/pull/14)

Bug: T233099
Change-Id: Iefe98c1f0422dbf034e385b1a41a859d030a2cf4
2022-11-22 08:45:27 -08:00
Translation updater bot 658a417891 Localisation updates from https://translatewiki.net.
Change-Id: I7765745a9676f380d8127f32026dc906d31c323b
2022-11-22 08:34:23 +01:00