Commit Graph

3071 Commits

Author SHA1 Message Date
Func b61a92f052 Drop the Vector.Config service
It didn't vary by the skin version as documented in the Constants class,
and merely another instance of GlobalVarConfig.

Change-Id: I0acd0366a241e04bb79f6aae5dc52284dfa578df
2022-04-07 04:30:20 +00:00
Clare Ming a0b1b5b056 Fix TOC fadeout proper
Bug: T302076
Change-Id: I247a1a92e6eaa3413053514866966393ff3c1964
2022-04-06 16:25:07 -06:00
bwang f1c70e99b7 Update sticky header to use ARIA attributes for section collapsing and add accessible label to toggle buttons
Bug: T303766
Change-Id: Idda4f286a42152af1d233588a1839ada5491ce95
2022-04-06 17:24:34 -05:00
jenkins-bot 94d9445ba3 Merge "Add automated a11y tests with pa11y" 2022-04-06 19:48:39 +00:00
bwang dd9b6e1dbc Add automated a11y tests with pa11y
Bug: T301184
Change-Id: If3d5aa74b9b1f5bf0f7aa2ea6950853c9a5f5ada
2022-04-06 19:29:58 +00:00
Ed Sanders f04f62ec05 Update debounce param order
Parameter order was changed in
I2ef1c949d68c5642943a614e2cb3f2f0a4cb140c

Change-Id: Iefc61dd84e53de60a95a69275d5c5619b0db25ff
2022-04-06 17:15:20 +01:00
Translation updater bot 54897659fc Localisation updates from https://translatewiki.net.
Change-Id: Ie76303942a2df27922a79ec4e0d9ea08f14d3fac
2022-04-06 08:28:21 +02:00
jenkins-bot ec3b66e0ed Merge "Only track headings that are included in the table of contents" 2022-04-05 22:10:33 +00:00
jenkins-bot 8842c61422 Merge "Revert unnecessary TOC section id change" 2022-04-05 21:14:55 +00:00
bwang aa8ec1a878 Revert unnecessary TOC section id change
Change-Id: I62736b47557b79929b8ad984d6709e762b3db549
2022-04-05 15:38:00 -05:00
Clare Ming 83f324e863 Add fixes for sticky TOC fade out
Bug: T302076
Change-Id: I9fffb17e60182ef2d667ed86218b8f24e1d76f5c
2022-04-05 13:52:40 -06:00
jenkins-bot e3684ba8a0 Merge "Build A/B test bucketing infrastructure for the table of contents." 2022-04-05 17:25:08 +00:00
Translation updater bot e48a8101b5 Localisation updates from https://translatewiki.net.
Change-Id: Ibeba7b06be25b72dedf4aef57be809da7c34daa9
2022-04-05 08:27:43 +02:00
Nicholas Ray 6fbf08a198 Build A/B test bucketing infrastructure for the table of contents.
* Bucket and sample on server by using the
  `WikimediaEvents.WebABTestArticleIdFactory` service from
  WikimediaEvents (soft dependency)
* Add linkHijack.js so that users bucketed in one group have the
  possibility of remaining in that group if they click a link to another
  page.

Bug: T302046
Depends-On: Ie6627de98effb3d37a3bedda5023d08af319837f
Change-Id: Iff231a976c473217b0fa4da1aa9a8d1c2a1a19f2
2022-04-04 17:06:29 -06:00
jenkins-bot 19f114281a Merge "Drop the LatestSkinVersionRequirement" 2022-04-04 20:18:35 +00:00
jenkins-bot b7b5976a13 Merge "Small clean up and TOC update" 2022-04-04 19:54:23 +00:00
Jon Robson 7e3d0828d5 Prepare Vector for temporary user accounts
Bug: T300263
Change-Id: I603b232da338655e54f372bec5df68dd96adfb2e
2022-04-04 19:45:14 +00:00
Jon Robson eca9fcbf79 Drop the LatestSkinVersionRequirement
The LatestSkinVersionRequirement is problematic for various reasons:

1) It uses the "useskin" query string
parameter which may or may not refer to the correct
skin (in the case of a non-existent skin it will always come to the conclusion that
it is not modern Vector and thus must be legacy).

2) It uses the User object which may or may not be safeToLoad
depending on when called.

The feature seems redundant at this point, as we are separating code
into separate classes Vector and Vector22 and all the features only apply
to modern Vector. I suggest we remove it and use the features explicitly in the skin
intended.

Bug: T305232
Bug: T305262
Bug: T302627
Change-Id: I92fa33547bd601e05ddc8c1468e681892e47c16b
2022-04-04 19:22:38 +00:00
Translation updater bot dc6936fe5d Localisation updates from https://translatewiki.net.
Change-Id: I17deb4b18c86d58e6b44d0d3d334a8fc21bc4eb3
2022-04-04 09:37:23 +02:00
bwang 733990f881 Small clean up and TOC update
Change-Id: Ic093888cb2b06d8eef95a1317d791e7e1627d0f6
2022-04-01 13:14:02 -05:00
Translation updater bot 4755086474 Localisation updates from https://translatewiki.net.
Change-Id: I17a6b7c654ecc13b169f906abbae43fbe01362a8
2022-04-01 08:29:41 +02:00
jenkins-bot 1521cfe0a8 Merge "Scroll active TOC links to midpoint when past threshold" 2022-03-31 23:21:23 +00:00
bwang 4a81d0e4eb Scroll active TOC links to midpoint when past threshold
Bug: T301150
Change-Id: I282dbeab8e0b121b71c04f921ab11311f1514da7
2022-03-31 15:50:54 -05:00
Jon Robson 94c7f31082 Only track headings that are included in the table of contents
Headings can also appear in templates inside divs and subtitles.
These do not
get rendered in the table of contents and should not be tracked.

This also excludes headings from the legacy table of contents which
may be in the article during the A/B test

See English Wikipedia examples [[Portal:Biography]] and [[Main page]]

Change-Id: I4ca8933a0e7736157f80e5e68077b153e5bfc81d
2022-03-31 17:35:00 +00:00
jenkins-bot b25e0ac738 Merge "Don't set a user preference on new accounts by default" 2022-03-31 15:23:15 +00:00
Translation updater bot 24bc9671cb Localisation updates from https://translatewiki.net.
Change-Id: I07fb4cce485af9b1a2ddddbd7f33800075da8d5e
2022-03-31 08:37:50 +02:00
Tim Starling 254ffbb55a Don't set a user preference on new accounts by default
Make it possible for Vector to be a non-default skin. Only set a user
preference on newly created accounts if that has been explicitly
requested in config.

This should have no effect on WMF production.

Change-Id: I52f62cf7eb78d2be4c59821a3cf29da9619602d9
2022-03-31 14:52:20 +11:00
bwang 607f3279bd Move sticky header DOM queries into main.js
- Remove isStickyHeaderAllowed() from stickyHeader.js, move to main.js
- Rename variables in stickyHeader.js to be consistent

Bug: T301429
Change-Id: Ib445a19cbfab52a008b749ea63cef178d6288e6a
2022-03-30 09:21:25 -05:00
Translation updater bot 3590f4aac9 Localisation updates from https://translatewiki.net.
Change-Id: I238b7d16a953f76f01f3e10f67c851f559b1cca5
2022-03-30 08:19:59 +02:00
Clare Ming 2bfdbe74b6 Do not show footer menu in print mode
Bug: T300178
Change-Id: I48df6c39019dc0551ffb0ee559c51d5f6b31c825
2022-03-29 17:24:18 -06:00
jenkins-bot 0529f8cb26 Merge "Update scroll instrument for TOC" 2022-03-29 21:43:41 +00:00
jenkins-bot 530658f160 Merge "Enable table of contents on all namespaces" 2022-03-29 21:34:18 +00:00
jenkins-bot ac5c82cfb8 Merge "Drop SkinVector global class alias" 2022-03-29 17:54:46 +00:00
jenkins-bot 67639d313a Merge "Restore the classes skin-vector and skin-vector-search-vue to body" 2022-03-29 16:50:27 +00:00
Reedy 0d5e2d184e Drop SkinVector global class alias
Change-Id: I0e35a3c88aced671ef23318bf3970f7f3f261f6a
2022-03-29 17:32:39 +01:00
jenkins-bot 056b242682 Merge "Make beginning bold on scroll" 2022-03-29 16:05:39 +00:00
Jon Robson 413f92561d Restore the classes skin-vector and skin-vector-search-vue to body
The option is set incorrectly.

Change-Id: Iafccb427b87f9a877374745b48b4ec1519de7e11
2022-03-29 08:50:10 -07:00
Clare Ming f2c60983bb Update scroll instrument for TOC
- Leverage scrollObserver to use for TOC scroll events.
- Add new hooks to target legacy TOC intersection.
- See corresponding changes (not strict dependency) in related
WME patch 773628 for capturing scroll events from Vector TOC:
https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikimediaEvents/+/773628
- Dependency on https://github.com/wikimedia/typescript-types/pull/30
which updates mwHookInstance interface with fire property to prevent
TS error on fire method of mw.hook in scrollObserver.

Bug: T303297
Change-Id: I5c2dd5f3a25ffcb0ed03b76ae28e65eb18ad8d33
2022-03-29 09:45:30 -06:00
jenkins-bot cda8df1cb2 Merge "Add fade to indicate scrollability in TOC" 2022-03-29 15:17:10 +00:00
Clare Ming ccdfbf2e58 Update @wikimedia/types-wikimedia to latest version
- Remove some @ts-ignore statements.
- Update invocation of mw.util.debounce to have correct order of
parameters.

Bug: T303297
Change-Id: I4bb795fbd4d026c21c66e9a3d161afff4d7ef09f
2022-03-28 23:33:50 +00:00
Clare Ming 1d574b86f1 Add fade to indicate scrollability in TOC
Bug: T302076
Change-Id: Ib803239602333e2a8232a26a10477a0f9933b819
2022-03-28 15:58:26 -06:00
Translation updater bot ca25b944da Localisation updates from https://translatewiki.net.
Change-Id: I50554c8ac11eeef88a7eec680db9c2d3888d3347
2022-03-28 08:24:40 +02:00
jenkins-bot 9eb243714d Merge "Improve UserLinks test to mocks registered user" 2022-03-25 21:58:10 +00:00
Translation updater bot 5be027a9c7 Localisation updates from https://translatewiki.net.
Change-Id: I2a23e4000a8723cd68395b24dce387ff9fdb7ab1
2022-03-25 08:37:24 +01:00
Jon Robson a2c7c024df Make beginning bold on scroll
Bug: T301254
Change-Id: I4469575ea8590ae22023b98c3dbd31bc672d5766
2022-03-25 01:13:42 +00:00
jenkins-bot cd04b72058 Merge "Table of contents links to beginning of article" 2022-03-24 23:51:52 +00:00
Jon Robson dfdf72140c Table of contents links to beginning of article
Bug: T301254
Change-Id: Icb0b0646f81c1070c8f47dd3297225a074f74773
2022-03-24 20:46:35 +00:00
bwang fea5740f57 Improve UserLinks test to mocks registered user
Change-Id: I9d90cea74f9d39550c91c9f761414a7e5e4f2b70
2022-03-24 15:34:02 -05:00
Jon Robson 56164a4275 Enable table of contents on all namespaces
Bug: T304168
Change-Id: Ib61f801640e77c34573c166072f0fb302687e8b1
2022-03-24 08:56:13 -07:00
Translation updater bot dd65dbebf4 Localisation updates from https://translatewiki.net.
Change-Id: Ic7d541c36777cf1208926d85e5cd9b3eed8ded0e
2022-03-24 08:37:50 +01:00