Commit graph

111 commits

Author SHA1 Message Date
libraryupgrader ca48ce8909 build: Updating npm dependencies
* @wikimedia/codex: 1.6.1 → 1.7.0
* @wikimedia/codex-icons: 1.6.1 → 1.7.0

Change-Id: I3716ee297b197aed02daf73c2f212ac651d3badd
2024-06-16 16:20:53 +00:00
libraryupgrader 5763df6bf4 build: Updating stylelint-config-wikimedia to 0.17.1
Change-Id: I7c1411a3aac14cf6fb4fdbb762b0de22b348b73f
2024-06-10 14:00:06 -04:00
Ed Sanders 7e7486c4a5 build: Update eslint-config-wikimedia to 0.28.0 and autofix
Change-Id: I350941a711d2304fc968b3ba1f1e0afa5878578e
2024-06-06 16:22:05 +01:00
libraryupgrader 47c1b2417c build: Updating npm dependencies
* vue: 3.3.9 → 3.4.27
* @wikimedia/codex: 1.6.0 → 1.6.1
* @wikimedia/codex-icons: 1.6.0 → 1.6.1

Additional changes:
* Re-generated the NPM lock file.

Change-Id: Ib47b554180c4140c3fe04f857a5ed810919da108
2024-05-31 05:30:37 +00:00
Steph Toyofuku 4a0c2cb684 Disable night mode if gadget detected
While our implementation of night mode is in beta, we want to respect
the existing night mode gadget and disable night mode in favor of the
gadget, providing a notice with an option to disable the gadget and
reload the page

Additionally, raise the max bundle size to account for the additional
code added

Note: the tests still aren't exactly where I'd like them to be, but
hopefully they raise confidence a little bit with reviewing this patch

Additional changes:
* Upgrade to latest version of TypeScript types and remove several
@ts-ignore statements

Bug: T365083
Change-Id: I9583ee7ebf8c810ddd504193d568034c954d28f2
2024-05-30 20:23:38 +00:00
MusikAnimal c06d62a531 watchstar: use mw.util.isInfinity() instead of comparing to 'infinity'
Bug: T353389
Bug: T353483
Change-Id: I580deb0ba47e4c13643524ddd4d57f1a8e0a35ae
2024-05-20 16:27:42 -07:00
libraryupgrader bbef8b3bcd build: Updating grunt-banana-checker to 0.13.0
Change-Id: Ia3dfc349bbb6b2c2542884ed08b9f74d038ca250
2024-05-19 10:33:49 +00:00
libraryupgrader 2ed17dc985 build: Updating dependencies
composer:
* mediawiki/minus-x: 1.1.1 → 1.1.3

npm:
* @wikimedia/codex: 1.5.0 → 1.6.0
* @wikimedia/codex-icons: 1.5.0 → 1.6.0

Change-Id: Ie380608c4fa8e067571a0f39453942216bf998dd
2024-05-17 04:29:53 +00:00
libraryupgrader ecb38e41da build: Updating dependencies
composer:
* php-parallel-lint/php-parallel-lint: 1.3.2 → 1.4.0

npm:
* @wikimedia/codex: 1.4.0 → 1.5.0
* @wikimedia/codex-icons: 1.4.0 → 1.5.0

Change-Id: I8ee16876540614da38e6a663f8f37f5e6b799d99
2024-05-01 05:22:34 +00:00
libraryupgrader d22fd0d7ab build: Updating npm dependencies
* eslint-config-wikimedia: 0.26.0 → 0.27.0
* @wikimedia/codex: 1.3.5 → 1.4.0
* @wikimedia/codex-icons: 1.3.5 → 1.4.0

Change-Id: I3dbc33dde89f03b188918e29f89434aafc3690a9
2024-04-21 21:57:17 +00:00
libraryupgrader cf6247422a build: Updating npm dependencies
* @wikimedia/codex: 1.3.4 → 1.3.5
* @wikimedia/codex-icons: 1.3.4 → 1.3.5

Change-Id: I6642a96769b357eb856d42ebbd3a17c0f909a943
2024-03-20 18:01:47 +00:00
libraryupgrader 81a04d60b6 build: Updating npm dependencies
* @wikimedia/codex: 1.3.3 → 1.3.4
* @wikimedia/codex-icons: 1.3.3 → 1.3.4

Change-Id: If65a80f8f1df43b6440ef329552eb5468057c1ac
2024-03-06 02:36:34 +00:00
libraryupgrader eae793a8ca build: Updating npm dependencies
* @wikimedia/codex: 1.3.2 → 1.3.3
* @wikimedia/codex-icons: 1.3.2 → 1.3.3

Change-Id: If6552212b2455cfdb42659a3ffc52700a486941c
2024-02-21 02:36:54 +00:00
libraryupgrader 3d695f089c build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.13.0 → 0.14.0

npm:
* grunt-banana-checker: 0.11.0 → 0.11.1

Change-Id: Iefe491b9533b38585a6c739f0097c47aef5f857b
2024-02-13 20:08:29 +00:00
Taavi Väänänen 6101edfbbc
build: Bump vue, codex versions
Change-Id: I3feda0348b8cbbe7be28d3a5e3bf1912d25c6130
2024-02-13 20:53:18 +02:00
bwang c893934ee7 Fix linter warnings
Change-Id: I24c3ecb7858142dc1b90cf1e34456691660157f1
2024-01-29 17:06:53 +00:00
jenkins-bot 23d1927e92 Merge "build: Upgrade eslint-config-wikimedia from 0.25.1 to 0.26.0" 2024-01-12 01:47:30 +00:00
Volker E 26f47fe0c3 build: Update 'svgo' to latest v3.2.0
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
  relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also unifiying npm command to qua standard notation `minify:svg`.

Bug: T354875
Change-Id: I4fffd9efd430786911fe36e409d2575bfab719bd
2024-01-11 23:28:28 +01:00
James D. Forrester 1c93d0514b build: Upgrade eslint-config-wikimedia from 0.25.1 to 0.26.0
Bug: T345100
Change-Id: I51fdef33d517ce4f2f50930bc46dddb2f497677c
2024-01-11 14:19:57 -05:00
Volker E 60607a3daf build: Update 'oojs-ui' to 0.48.3
This also includes the replacement of WikimediaUI Base with Codex tokens
in OOUI – all backwards-compatible.

Bug: T334934
Change-Id: I2e05852424ab5db90b94c65a6c409cb40b66d04c
2024-01-03 21:46:40 +00:00
Jon Robson 845a0ab71d Make the limited width and font size controls work for logged in users
For time being manage classes inside Vector. Document with FIXME and a
test.

Bug: T351447
Change-Id: Icc084a59a0141ec2b7c772cf92e8cc58c11f15b1
2023-11-21 02:16:52 +00:00
Jon Robson e5a849ff79 Codex-search NPM module was deprecated, use codex instead
Change-Id: I0dfb2c8372a423630db093ae1af82385293b017b
2023-10-02 22:41:54 +00:00
Ed Sanders 1cd0d66bb9 build: Update devDependencies
Holding back some packages as they need some work to unbreak tests:
* mustache
* jest
* typescript

Change-Id: If2b9e27bd83c43c6e7d8c0ac1b6d25b2aa74499b
2023-09-26 07:56:34 +01:00
ksarabia c490b19fd0 Update package.json
This updates mw-node-qunit

Bug: T343930
Change-Id: Ice6b8983071b701b752f487935e62736097c2fe9
2023-08-25 16:42:22 -05:00
Ed Sanders 1177320e3c build: Update linters
Change-Id: Idff91da3e6a490bbd31b39651f35544e9cb3fd9c
2023-08-23 18:46:49 +01:00
bwang 54b620042a Remove wmf-a11y dependency and tests
Change-Id: Ib3a61615af634ad7dc94fa09d521b90bc5db3e0d
2023-08-17 12:38:55 -05:00
tsepothoabala e5ef6f5f64 Prevent Skins Vector from setting preferences for temporary accounts
Bug: T337874
Change-Id: I83ca625276569349abcd6622d295137c5c4ffe2c
2023-06-14 11:05:27 -07:00
libraryupgrader a38229cc7f build: Updating npm dependencies
* @wikimedia/codex: 0.10.0 → 0.11.0
* @wikimedia/codex-icons: 0.10.0 → 0.11.0
* @wikimedia/codex-search: 0.10.0 → 0.11.0

Change-Id: I93e9cff2a0c1f79477ab524abd0c2dd52a8fca00
2023-05-24 02:44:25 +00:00
libraryupgrader 87eb3f813c build: Updating npm dependencies
* @wikimedia/codex: 0.9.1 → 0.10.0
* @wikimedia/codex-icons: 0.9.1 → 0.10.0
* @wikimedia/codex-search: 0.9.1 → 0.10.0

Change-Id: I8f150068ae65fd280c2d71931c67b4d59987242d
2023-05-12 12:15:45 +00:00
libraryupgrader d7e3b582cd build: Updating eslint-config-wikimedia to 0.25.0
Change-Id: Iedd46c2ba2d9b2473e8f0648a461c9f0523345f6
2023-05-06 02:41:23 +00:00
libraryupgrader 1eb1aaf562 build: Updating npm dependencies
* @wikimedia/codex: 0.8.0 → 0.9.1
* @wikimedia/codex-icons: 0.8.0 → 0.9.1
* @wikimedia/codex-search: 0.8.0 → 0.9.1
* decode-uri-component: 0.2.0 → 0.2.2
  * https://github.com/advisories/GHSA-w573-4hg7-7wgq
* json5: 2.2.1 → 2.2.3
  * https://github.com/advisories/GHSA-9c47-m6qq-7p4h

Change-Id: I617deb002858b1b7ee25e800c17daf0ada5f3840
2023-04-27 02:06:37 +00:00
Moh'd Khier Abualruz ecdf2ced2c popupNotification Javascript tests
Bug: T333345
Change-Id: If65a86b2d6a8345f127a0803fd64cfa9f13a8630
2023-04-20 14:09:33 -07:00
Jon Robson 97a640945f Forbid jQuery usage in Vector 2022
Change-Id: I9d07acffa6f8133ec3e44ceba3d1fa5b27b81258
2023-04-17 17:20:59 +00:00
Jon Robson 87dd101a69 Consolidate and fix eslint errors, dropping ts-ignores
* Upgrade @wikimedia/types-wikimedia to allow us to drop several
@ts-ignores
* Merges eslint rules now that ES6 is default everywhere
* Runs autofix command
* Fixes various prefer-const errors

Change-Id: Iee5bcb93f10a76d80dbeec813f6387c13438263e
2023-04-11 16:56:31 -07:00
bwang 070349dd2e Remove Storybook and jsdoc and its dependencies
Bug: T321102
Depends-On: Ia21c14f72631e607e0d626408557eacb83529a03
Change-Id: I3535398826e67825965c024805fd5e921fe5298c
2023-04-04 21:27:45 +00:00
Umherirrender d2b8ce8a3e build: Updating npm dependencies
* eslint-config-wikimedia: 0.22.1 → 0.24.0
* grunt-banana-checker: 0.9.0 → 0.10.0
* @wikimedia/codex: 0.7.0 → 0.8.0
* @wikimedia/codex-icons: 0.7.0 → 0.8.0
* @wikimedia/codex-search: 0.7.0 → 0.8.0
* @wikimedia/mw-code-qunit: 6.4.1 → 7.0.0

Change-Id: I3982576a6e8e932efa0ae00be58af343b29ef59c
2023-04-03 23:44:22 +02:00
Umherirrender f3dfc9df1e build: Updating npm dependencies
* stylelint-config-wikimedia: 0.13.0 → 0.14.0

Run stylelint fix to fix the new stylelint rule

Change-Id: I3f9e528ca9f8292a9e3630356f0e8bf5df5f6609
2023-03-28 22:22:36 +02:00
Volker E 6fa5e1758c build: Update SVGO to v3.0.2 & re-crush icons
svgo         ^2.8.0  →   ^3.0.2

Amending to new `cleanupIds` plugin name.
Re-crushing SVGs while at it.

Bug: T333158
Change-Id: I29e74ec1240142af3440004b68ac985558836410
2023-03-27 06:10:37 -07:00
Anne Tomasevich fa2faf563f Rename CdxButton type prop to weight
In Codex v0.7.0, the CdxButton's `type` prop changed. The `type`
prop was renamed `weight` and will continue to accept the same
values ('normal', 'quiet', and 'primary'). A new `type` prop was
added that accepts the old types, plus native button types
('button', 'reset', and 'submit'). In a future release of Codex,
the `type` prop will be removed altogether and the native type
can be bound to the CdxButton via the `type` attribute.

So, while the old values for `type` still work, we want to
update the prop name in anticipation of the `type` prop's
removal. For any new code moving forward, the `weight` prop
should be used.

This patch:
- Updates the Button stories to change the `type` prop to `weight`
- Updates Codex dev dependencies to v0.7.0
- Updates Storybook webpack config so it can process *.mjs files
  (Codex ES dist files now have this extension, see
  Ic29c891c8d7ac705d016aa6f91c5f63684d7d7c8)

Bug: T312987
Change-Id: If98dad4769ed72900dbae579823a356669d6cf64
2023-03-16 21:08:03 +00:00
bwang 575ab2af9c Replace automated testing code with npm package
Change-Id: I36786bd8a378110672a832f511cd41424ed0709f
2023-02-08 01:05:22 +00:00
James D. Forrester 044397180c build: Upgrade test versions of Codex things from 0.2.2 to 0.4.2
The 'real' versions in production are already 0.4.2, as they're supplied
by MediaWiki, so we should use the same versions in test as well.

Change-Id: I06775acd7ab22d103829b9b734736bf3ec137a82
2023-01-09 13:22:47 -05:00
James D. Forrester 41a106cded build: Upgrade Codex from 0.1.0-alpha.10 to 0.2.2
Change-Id: I213c04ffc5f7c8ebe0f3973703f285380a17c98a
2022-10-26 10:47:51 -04:00
Lucas Werkmeister d34fae74f1 search: Add wprov to result URLs
This ensures that the wprov parameter is included when users follow the
link as a link (click, middle-click, etc.), and also prepares us for a
future where pressing Enter after selecting a search result navigates to
that result’s URL instead of submitting the form. It also matches the
behavior of the legacy search form.

We put this in App.vue + instrumentation.js, not in urlGenerator.js,
because we also want wprov to be added when custom URL generators or
search clients are used. (The reason for instrumentation.js instead of
purely App.vue is just that it’s easier to test there.)

In the tests, we need to update @wikimedia/mw-node-qunit so that we have
a sufficiently functional mw.Uri() mock.

Bug: T317682
Change-Id: I765d3bbf89b2253add7b50305c362e4bbc9ecceb
2022-10-21 11:58:30 +02:00
Lucas Werkmeister 9da506d455 Update package-lock.json to lockfileVersion 2
All the images available in Fresh [1] include an npm version that
produces new-format lockfiles by default, so it’s actually not easy for
contributors to make any package changes *without* bumping the version.
Let’s just do it in a separate commit.

[1]: https://github.com/wikimedia/fresh

Change-Id: I42b2d0189c2cc1c20e4d1a05a6593a5ea421d060
2022-10-19 14:44:51 +02:00
Jon Robson f9a3d795ef Storybook: Update Legacy/codex comparison table
Upgrade Codex to the latest version and add the new icon
only buttons to our side by side table

This is needed to help bring these inline.

Bug: T314323
Change-Id: I7f59968cf5be6242e8002b11ca030c9bd4dd882d
2022-09-13 23:01:28 +00:00
Jan Drewniak f14b4fe5f1 Add tests for dropdownMenu.js
Adds tests for the addPortletLinkHandler, which should
add an icon element to items added via 'mw.util.addPortletLink'
and conditionally move elements from the toolbar into
the more menu at narrow widths.

- Adds tests for dropdownMenu.js
- Adds associated Jest snapshots
- Stubs the mediawiki.page.ready module
- Updates mockMediawiki.js to 4.6.0
- Adds global mock for mw.util.showPortlet()
- Cleans up tests using local versions of these mocks

Bug: T314798
Change-Id: I81394d840321916756a41a23c40d96c4b6341931
2022-09-01 13:11:22 -07:00
Moh'd Khier Abualruz 407046c759 [ToC] Show new/modified sections after publishing an edit (new floating ToC)
- All Frontend
- All in Skin

Bug: T307251
Change-Id: Icae2f03f0005b7607448127b793ff3c0010e5817
2022-08-15 20:02:49 +00:00
Roan Kattouw ce77018b7c Search: Use Codex and Vue 3 instead of WVUI and Vue 2.
[Visual changes]
This should result in 9 visual regression failures relating to
increased height of search results and loading bar

[More details about change]
- Migrate search app from Vue 2 to Vue 3; update tests
  accordingly
- Remove dependence on WVUI and use Codex instead, via the special
  `@wikimedia/codex-search` package
- Update search app to use CdxTypeaheadSearch, which no longer
  takes in props related to the search client or fetch start/end
  instrumentation. Instead, directly use the restSearchClient
  and call fetch start/end events in the search app.
- Handle hideDirection in the search app/API response formatting
  code, not within the TypeaheadSearch component
- Handle showing/hiding the search button in the app
- Move the WVUI URL generator into Vector
- Update server-rendered search box styles to match design updates
  included with CdxTypeaheadSearch
- Replace references to WVUI with references to Codex
- Update values of various LESS variables to match Codex, and update
  searchBox styling to prevent jankiness when the searchBox is replaced
  with the Codex TypeaheadSearch component

The VectorWvuiSearchOptions config variable has been maintained and
will be updated to a code-agnostic name in a future patch.

Bug: T300573
Bug: T302137
Bug: T303558
Bug: T309722
Bug: T310525
Co-Authored-By: Anne Tomasevich <atomasevich@wikimedia.org>
Change-Id: I59fa3a006d988b14ebd8020cbd58e8d7bedbfe01
2022-07-18 12:54:47 -07:00
libraryupgrader 80fc9dcace build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.11.0 → 0.11.1

npm:
* jsdoc: 3.6.7 → 3.6.10
* node-fetch: 2.6.1 → 2.6.7

Additional changes:
* Set `name` in package.json.
* .gitignore: Added .phpunit.result.cache (T242727).

Change-Id: Iac03b8d02dd1edf3707ea569779fadd77b2e1016
2022-05-20 11:41:53 +00:00
Ed Sanders bf494b89fd build: Update eslint-config-wikimedia to 0.22.1
Change-Id: I25e0cf131c7d2ea53d362f4836a451b68cd31366
2022-05-17 23:40:46 +01:00