Commit graph

20 commits

Author SHA1 Message Date
libraryupgrader 833a84db4a build: Updating npm dependencies
* eslint-config-wikimedia: 0.25.1 → 0.27.0
* @wikimedia/codex: 1.3.5 → 1.4.0

Change-Id: I2c36146322f92812c009ef26c6138068356aa053
2024-04-20 20:17:32 +00:00
libraryupgrader 16354a3b92 build: Updating npm dependencies
* @wikimedia/mw-node-qunit: 7.0.0 → 7.2.0
* @wikimedia/codex: 0.13.0 → 1.3.5
* wdio-mediawiki: 2.1.0 → 2.5.0

Change-Id: Iea969a601f82c8c2d84c089a9e40b91118ddfff3
2024-03-30 16:05:30 +00:00
Jon Robson 71de06a682 Simplify the RelatedArticles extension to use Codex CSS components
Changes:
- Removes redundant styles now inside Codex
- With the new component, it's not possible to display 3 cards in a
single line at a tablet resolution, so the media query responsible
is bumped to apply only at the desktop threshold
- Decisions are documented in ADR

Bug: T286835
Change-Id: I493e8e601ccc31b3cf1f16c0b5a8975f12ef336c
2024-01-30 09:16:34 -08:00
Ed Sanders 1071a53446 build: Update linters
Change-Id: I98cbfd20fd85cdf8bb8dc1276ebbc516992212c3
2023-09-15 17:06:48 +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
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
libraryupgrader b2121295bd build: Updating eslint-config-wikimedia to 0.19.0
Additional changes:
* eslint: Renamed `wikimedia/client` profile to `client-es5` (T277085).

Change-Id: I526783f28521561ee0b86f45777debc2e90d22aa
2021-03-14 11:21:13 +00:00
libraryupgrader 7cf2c9513e build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 34.0.0 → 35.0.0
* mediawiki/minus-x: 1.1.0 → 1.1.1

npm:
* eslint-config-wikimedia: 0.17.0 → 0.18.1
  The following rules are failing and were disabled:
  * compat/compat

Additional changes:
* Added the "composer phan" command to conveniently run phan.

Change-Id: Ifc15b65a8f6e5c4d47522d76c31912508dff4bb4
2021-01-30 09:13:04 +00:00
Ed Sanders ebecd9c144 build: Update eslint-config-wikimedia to 0.16.2
Change-Id: Ib6681e7d5fb03f4fa54823bf0d37e16d37be3416
2020-06-23 20:30:43 +01:00
libraryupgrader dfb3995a90 build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 28.0.0 → 29.0.0
  The following sniffs are failing and were disabled:
  * MediaWiki.Commenting.FunctionComment.MissingParamTag

npm:
* eslint-config-wikimedia: 0.11.0 → 0.15.0
  The following rules are failing and were disabled:
  * no-jquery/no-parse-html-literal

* grunt-eslint: 21.0.0 → 22.0.0
* grunt-stylelint: 0.10.1 → 0.13.0
* stylelint-config-wikimedia: 0.6.0 → 0.8.0

Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
* Removing manual reportUnusedDisableDirectives for eslint.

Change-Id: Iab538420d73bbbebfd05cf815ab06773f16da8da
2020-01-15 06:11:54 +00:00
Timo Tijhof 6a0d64d3f0 Remove 'wgRelatedArticles*CirrusSearch' from page view HTML
Bundle these with the module that needs it instead, this means
1. It is naturally only downloaded on pages where it is needed.
2. It doesn't block download/parse/render of the article HTML.
3. It doesn't delay time to mw.loader.load() for interactive
   functionality.

Bug: T219342
Change-Id: I5c6809392b0621bd0d58049597f6c0306e572607
2019-05-25 22:04:51 +00:00
Ed Sanders 26b15d19b9 build: Update eslint-config-wikimedia to 0.10.1
Change-Id: I01388bfdda108e9e80b32d68983e1d826d0db784
2019-02-10 16:46:48 +00:00
Ed Sanders 7b0c26ba59 build: Update devDependencies
eslint-config-wikimedia      0.5.0  →   0.8.1
 grunt-eslint                20.1.0  →  21.0.0
 grunt-stylelint              0.9.0  →  0.10.1
 stylelint                    8.2.0  →   9.2.0
 stylelint-config-wikimedia   0.4.2  →   0.4.3

Add "eslint-plugin-qunit"

Change-Id: I4761b12a9c3d4cb35bb891a7f999a84be46f543e
2018-11-12 22:24:07 +00:00
Fomafix 00405b0309 Remove mediaWiki and jQuery from eslint globals
Remove all mappings in the closures like in
I7cf2426cde597259e8c6f3f6f615a1a81a0ca82b in core.

Change-Id: Ie9a2fadb8e276774784a4937bb5c3ec11f213352
2018-09-15 17:54:03 +00:00
Fomafix 0464e7a7c0 Remove eslint rule "no-use-before-define": 1
Add no-use-before-define to the line where the rules is violated.

Change-Id: Ieb50b11292cff6b40fdd5f06c76d61bb01e86e4c
2018-08-17 13:29:08 +02:00
Ed Sanders ef16548c2f build: Cleanup eslint config
Change-Id: Icbdf65233ba343f973a5dd3c93088861c1d90ff5
2017-10-09 15:34:49 +01:00
Željko Filipin a40cfcb134 Replace Ruby Related pages browser tests with node js version
Additional changes:
* Remove all Ruby artifacts
* Update eslint to allow es6 in tests

Bug: T164024
Change-Id: If6c8d32df042b831d52440963606a47c8ce7b552
2017-07-26 11:41:07 +00:00
jdlrobson 298790a944 Upgrade to eslint
We're going to want to use a newer version of JSHint
anyway to support use of ES6 in our browser tests so now
seems a good time to do this.

Bug: T149202
Change-Id: I5526b020cfc12c0e065ad15ed711a0e3a7bff1bc
2017-04-10 14:12:25 +02:00