Commit graph

703 commits

Author SHA1 Message Date
Translation updater bot ce4f2e62b9 Localisation updates from https://translatewiki.net.
Change-Id: I99b33414ab15cbe54afa3c3c5dae9e96def0c5c3
2023-05-03 08:44:16 +02:00
libraryupgrader 27eb68b969 build: Updating mediawiki/mediawiki-phan-config to 0.12.1
Additional changes:
* Set `name` in package.json.

Change-Id: I2501238817be28e5eff61830220ab0d66403f523
2023-04-29 09:46:37 +00:00
Volker E 8f6fce655b 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 skin variables featuring new
  Codex design tokens for following properties:
  - background-color
  - color
  - border-width, border-style, border-color and border shorthand

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

Bug: T319381
Bug: T332541
Depends-On: I04f9e48a1cf9dee915cf51e1e12b17ff0a595a06
Change-Id: I32c2996dedc9b3a54e1f916623dbe1c4da910083
2023-04-18 11:19:46 -07:00
Umherirrender d244328cd3 build: Updating npm dependencies
* eslint-config-wikimedia: 0.20.1 → 0.24.0
* grunt-banana-checker: 0.9.0 → 0.10.0
* @wikimedia/mw-node-qunit: 6.2.1 → 7.0.0

Change-Id: Ied24102025b02422a6a807235bcb53bc5f6e7c98
2023-04-04 01:15:59 +02:00
Umherirrender 1a4bd424b4 tests/qunit: Change assert.ok to assert.true
Avoid loose assertion

Change-Id: I6fd398ef2608c836fd59e0a48271f11c5e0d78a9
2023-03-31 20:37:25 +02:00
Umherirrender 082a59b991 build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: Iedd35c282b67f58f4be8f74aba365e7581159956
2023-03-28 22:19:23 +02:00
jenkins-bot 9b3612086f Merge "build: Updating composer dependencies" 2023-03-20 15:20:22 +00:00
Translation updater bot b3072c21bf Localisation updates from https://translatewiki.net.
Change-Id: I32a940065e67798af4fc2fddeb6540c52b6a8f54
2023-03-20 09:02:26 +01:00
Umherirrender 1a4027de74 build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 38.0.0 → 41.0.0
* mediawiki/mediawiki-phan-config: 0.11.1 → 0.12.0
* php-parallel-lint/php-console-highlighter: 0.5.0 → 1.0.0
* php-parallel-lint/php-parallel-lint: 1.3.1 → 1.3.2

Change-Id: Ie8b9e3ca911211da37ea5a64382ae27022c9dc7e
2023-03-18 21:10:25 +01:00
Translation updater bot 111f0f89f2 Localisation updates from https://translatewiki.net.
Change-Id: Ic57b947139c332cf66906d74ce4fa581e9a18470
2023-02-28 08:29:33 +01:00
Jon Robson c2342e281e Targets no longer needed in RelatedArticles
All match current default.

Bug: T328497
Change-Id: I38d93cba683bcc39fb25421b0a197f8ebb4c9923
2023-02-16 11:41:14 -08:00
Željko Filipin 52f5b78d21 Update npm lockfileVersion to v2
Updating npm to v7 updates lockfileVersion in package-lock.json to v2.

Bug: T273785
Change-Id: I14c19f8bfbfe0f463905b7bc908d61b28d06e7f1
2023-01-23 16:38:09 +01:00
Vaughn Walters 17f96fbb0d selenium: Remove webdriverio npm package
The `webdriverio` package does not need to be an explicit dependency.
It is a dependency of `@wdio/cli`.

Bug: T325059
Change-Id: Ic2c97dca23a20af791af77c56c08144568a9ba97
2023-01-19 17:15:42 +01:00
Translation updater bot 3e50c035c0 Localisation updates from https://translatewiki.net.
Change-Id: I8442a8e24e4238d0e165a00a1f60eec42135718c
2023-01-03 08:21:17 +01:00
Translation updater bot 1560348e0a Localisation updates from https://translatewiki.net.
Change-Id: I109eb36a7b845d7793aeb10ea3e36e9e511cc29d
2022-12-21 09:17:40 +01:00
Željko Filipin 26e69c8e15 selenium: Enable one skipped test, delete one failing test
Both tests are disabled for more than a year, see
f318d3acd2.

'ReadMore is not present on Vector' is failing so it is deleted.
'ReadMore is present in Minerva @daily' is passing so it is enabled.

To be sure that the passing test is not flaky, the CI has ran it 100
times, it never failed.

Bug: T280652
Change-Id: I739414c4f3f650ce14e31b6bb2bfdd21efb8ff44
2022-11-24 12:40:45 +00:00
jenkins-bot 9a11bcee04 Merge "Replace deprecated @borderRadius var with successor @border-radius-base" 2022-11-09 18:21:42 +00:00
Volker E 2e2159d1b5 styles: Remove linear-gradient vendor properties
All targeted browsers have fallen out of basic support.

Bug: T306486
Change-Id: I3d5d49d2911c72806922bdbba26ab2c8470588f8
2022-11-07 21:02:15 -08:00
gerritbot f3f58c0666 Replace deprecated @borderRadius var with successor @border-radius-base
Replacing deprecated mediawiki.ui `@borderRadius` variable with successor
@border-radius-base.
Former got deprecated in MW 1.35 about 2 years ago. Latter is in alignment
with mediawiki.skin.variables.less standardization. It's also in
accordance to Codex design tokens.

Bug: T322478
Change-Id: I6f9fe0a7d98713a66e1b7e78f105817f428c636f
2022-11-06 22:59:13 +00:00
Translation updater bot ded5427e35 Localisation updates from https://translatewiki.net.
Change-Id: Ieb047fbdfb31a072091f19ad21600f915ef4ec86
2022-10-31 09:46:31 +01:00
Translation updater bot 957547ddbb Localisation updates from https://translatewiki.net.
Change-Id: I6cade2fefd45a323558fab7c1612c52248949700
2022-10-24 08:23:29 +02:00
Translation updater bot 14a8891c71 Localisation updates from https://translatewiki.net.
Change-Id: I5a00c2e80a63cb12802080baf0a3e3ea61e677ba
2022-10-19 08:20:40 +02:00
Translation updater bot 248ba61f0a Localisation updates from https://translatewiki.net.
Change-Id: I4371d85b820bf2c3a4f53ee7729bcec57ed05ff0
2022-10-13 08:09:38 +02:00
Translation updater bot 6bfd9fa470 Localisation updates from https://translatewiki.net.
Change-Id: Ie19a0f6de8ed2d1aae2435d4b37c612404f7a9f4
2022-09-28 08:22:36 +02:00
Translation updater bot dda7e45667 Localisation updates from https://translatewiki.net.
Change-Id: I5c7b5a6f8162dc7a30f50d7cdaceb3d7cefa8ddc
2022-06-24 09:31:17 +02:00
Translation updater bot fcf830188e Localisation updates from https://translatewiki.net.
Change-Id: I7173240e7e9fc4b173ae858d490a15c8c44a8825
2022-06-20 08:17:47 +02:00
Translation updater bot c50ba8d371 Localisation updates from https://translatewiki.net.
Change-Id: Ib68ced4009ef383c22b9241eb65392c481ca1000
2022-06-13 08:28:59 +02:00
Translation updater bot fc028aabbf Localisation updates from https://translatewiki.net.
Change-Id: I26f0278e40ee759e28f6cd40b000608fa2cbf721
2022-06-03 08:58:06 +02:00
Translation updater bot 50b93a41e3 Localisation updates from https://translatewiki.net.
Change-Id: I661554def5510526b709a9f26d5d53eb7ebb3637
2022-05-30 09:24:08 +02:00
Željko Filipin 1dbc2915f6 selenium: Use @wdio/spec-reporter
Dot reporter provides no information on which tests suites and tests are
executed. Spec reporter is more verbose but it also provides much more
information that is useful in general, but especially when debugging.
For example, which tests are executed and which tests are skipped.

Bug: T280331
Change-Id: If50b811df856abc555904ecab298077215b2621d
2022-05-24 14:46:02 +02:00
Jon Robson 4d883cf58a Pages that do not exist shouldn't output related articles
Bug: T308078
Change-Id: Ie86ea03e4529e74cc5d9f71c973a5ab738ca499b
2022-05-11 19:13:35 +00:00
Jon Robson 2665e3c319 Add TypeScript support
For now it is limited to a single file RelatedPagesGateway.js
For now @types/jquery is requirement due to use of
wikimedia/mw-node-qunit and usage of MediaWiki core methods
and OOUI that use jQuery.

Change-Id: I370826bb3f521dcb5a68491990571ee1c87117ae
2022-04-27 19:11:10 +00:00
Jon Robson e5431a1c0b Limit RelatedArticles feature to ES6 browsers
We currently require support for IntersectionObserver.
which is supported on Edge >= 15 (15 has partial support),
Firefox >55, Chrome >58, Safari 12.1, Opera >=38,
iOS Safari >=12.2, Android 100

Full ES6 is supported in Edge >=15, Firefox >=54, Chrome >=51,
Safari >=10, Opera >=38, iOS Safari >=10, so such a change
would only drop support for Edge 15 and Firefox 54.

CSS.escape is guaranteed in all these browsers according to
caniuse, with the only discrepancy being the Edge browser (versions
16-18) so it is also suggested we remove support for those browsers.

Firefox 54 accounts for 0.0026% of page views
Edge 15-18 accounts for 0.069% of page views

Bug: T306355
Change-Id: Id2987e3456607b610c38da9ee157a026d1d00ada
2022-04-27 15:45:42 +00:00
Jon Robson b528100f3d Add jest testing infrastructure
Adds a test for  resources/ext.relatedArticles.readMore/index.js

Change-Id: Icf8a5afca2489308e2bcaa611c0fe27ed9f46f3a
2022-04-19 18:51:58 +00:00
jenkins-bot d043e31869 Merge "[Development] Allow us to pull RelatedArticles from production APIs" 2022-04-18 21:55:19 +00:00
Jon Robson 5f6e311255 Remove unused mediawiki experiments
mw.experiments is never used in this codebase. Presumably this
dates back to when we did A/B tests for this feature.

Change-Id: I7d5bc63349686063ecd2c1fc63d078af91d2c541
2022-04-18 12:53:02 -07:00
Jon Robson dca7580757 [Development] Allow us to pull RelatedArticles from production APIs
useful for testing real world data

Suggested test config:
```
$wgRelatedArticlesUseCirrusSearchApiUrl = "https://en.wikipedia.org/w/api.php";
$wgRelatedArticlesUseCirrusSearch = true;
$wgRelatedArticlesDescriptionSource = 'wikidata';
```

This will allow us to enable on patchdemo with production content.

Change-Id: I73c0d73d3369f27ed2fd74b37ae71bfc12b6ee57
2022-04-18 16:28:26 +00:00
Jon Robson dfce5b1cb7 RelatedArticles should not use mw.trackSubscribe
Instead export a render method

Bug: T149317
Change-Id: I2b88690d381f896d6a646046574528a2312c91c2
2022-04-18 16:28:14 +00:00
Jon Robson 4c9904952b Drop OO dependency on gateway
The RelatedPagesGateway is an OO class.
There is no reason for it to be, we don't use any
of it's features e.g. the event emitter

Change-Id: I8f807d35b0ce36ea5764508a66f88d74577e3653
2022-04-18 15:51:43 +00:00
Jon Robson 911d78e8ee [organization] organize file by module
Follow up to I9442b0336e22ca795cc06f76068215266fe81271

Bug: T306228
Change-Id: Ifb1f1937009b098999471cfa5e820a063dc5a4a0
2022-04-18 08:37:22 -07:00
Jon Robson df1ff38877 [Maintenance] Reduce related articles to two modules
1) Merge ext.relatedArticles.readMore and ext.relatedArticles.cards modules

These are always loaded together. No need to have them in separate modules.
In process switch to packagefiles

2) Merge ext.relatedArticles.readMore.bootstrap and ext.relatedArticles.readMore.gateway

Always loaded together.

Bug: T306228
Change-Id: I9442b0336e22ca795cc06f76068215266fe81271
2022-04-14 17:48:37 -07:00
Jon Robson dc2e65a084 Drop outdated references to Cards extension
Previously RelatedArticles required the Cards extension
This code refers to that old state and is cleaned up.

ext.relatedArticles.cards is added a dependency of
ext.relatedArticles.readMore since it now belongs to the same
extension

Change-Id: I4a89ed4256a4ae9fd22b0191748bd47ac3ffc593
2022-03-31 08:14:23 -07:00
osamaahmed17 078cfb2347 selenium: Refactor WebdriverIO tests from sync to async mode
WebdriverIO has dropped support of sync mode due to breaking changes in Chromium, hence all tests have been changed to async.

Update npm packages: @wdio/*, wdio-mediawiki and webdriverio
because async mode needs at least webdriverio v7.9.

Remove npm package: @wdio/sync.

Bug: T300797
Change-Id: Ia2a857eb46dbd613a10f48c686bcf6b2fdc3e202
2022-02-09 16:15:05 +00:00
libraryupgrader 43ccc9c8b0 build: Updating mediawiki/mediawiki-phan-config to 0.11.1
Change-Id: I6fbd3e06b1881bcb659a833189f3c4e1d5c587fd
2021-12-19 04:06:28 +00:00
Translation updater bot 6eaf45307a Localisation updates from https://translatewiki.net.
Change-Id: I8d2d0c8757e6022a3c8e0588eee63aa53fb2b15e
2021-12-10 09:19:44 +01:00
libraryupgrader 6b45f6ea82 build: Updating jsprim to 1.4.2
* https://npmjs.com/advisories/1006724 (CVE-2021-3918)

Change-Id: I25ac93c55a9d4971851c353e5b0ab284751d3a55
2021-11-30 06:25:23 +00:00
Translation updater bot 67eee4e266 Localisation updates from https://translatewiki.net.
Change-Id: I7e049d69a340b09a394ccf2784f47ca85b03c272
2021-11-22 09:03:40 +01:00
Translation updater bot db85e74196 Localisation updates from https://translatewiki.net.
Change-Id: I8cb057a33f17757447d506c448997fbd84f9a4cc
2021-11-11 10:02:54 +01:00
libraryupgrader 524f3773f2 build: Updating validator to 13.7.0
* https://npmjs.com/advisories/1004784 (CVE-2021-3765)

Change-Id: I94248f824b066d42414a8edb71c0851ca8f7bf23
2021-11-05 11:04:36 +00:00
jdlrobson 83c2b071c4 Fix loading of related articles via IntersectionObserver
For IntersectionObserver to work the element we listen on needs to
have a non-zero height.

Bug: T223844
Change-Id: I308f646670b112e42b0aaa11c438dbc5cdc5edd8
2021-11-04 12:30:11 -07:00