Commit graph

2713 commits

Author SHA1 Message Date
jenkins-bot acbf2fb739 Merge "Changes the labels of the Vector skins" 2022-01-31 19:03:13 +00:00
jenkins-bot fa3c528bef Merge "Don't show language alert on main page if it has no languages" 2022-01-31 18:15:49 +00:00
jenkins-bot af39ad98ea Merge "Language alert box should use Html::noticeBox" 2022-01-31 17:05:57 +00:00
Clare Ming 5d2bc68da1 Don't show language alert on main page if it has no languages
Bug: T299581
Change-Id: Idc5b702626249ebec5d627e7b88fd6adf3e3750a
2022-01-31 09:43:15 -07:00
Translation updater bot 5daf29df0d Localisation updates from https://translatewiki.net.
Change-Id: Ic1ff753ee327d588c1da99758ded315102ce0b2b
2022-01-31 08:24:19 +01:00
Jon Robson ac084e930a [config] Vector should default to language button
This reflects production and avoids confusion during development
e.g. T299581#7660160

We already have overrides in place for all wikis where this should not
apply.

Change-Id: I45ecda031f83fc63c9c878c9caef42d327b2463f
2022-01-28 15:38:27 -07:00
jenkins-bot 6a43f3af49 Merge "Fix issues with language alert in sidebar:" 2022-01-28 22:26:21 +00:00
Clare Ming 588d273360 Fix issues with language alert in sidebar:
- Don't show language alert if:
  - language button is not in header
  - on main page
  - on special page
- Update message with sitename.

Bug: T299581
Bug: T295555
Change-Id: I6290ea440e6b4673f29939376ac47ab53a882001
2022-01-28 13:58:31 -07:00
Clare Ming a1ba537f6a Enable sticky header by default
Bug: T297924
Change-Id: If95a917ab3fbbe49271c62e0ce1da8b74d0bd7b8
2022-01-28 10:46:48 -07:00
Jon Robson 029110810e Language alert box should use Html::noticeBox
Html::noticeBox doesn't output any deprecated classes so
will not conflict with any user gadgets now.

Bug: T299625
Change-Id: Ic9aef5c8ff3fae6a79c7cf82cc3c97714cf40b3d
2022-01-27 15:35:38 -08:00
jenkins-bot 0e08ae8c17 Merge "Rely on core TOC data to show the TOC in Vector" 2022-01-27 20:10:29 +00:00
jdlrobson a357b13ce0 Changes the labels of the Vector skins
In preparation for roll out of SkinMigration everywhere.
(Change to configuration will be done via backports throughout
the week)

Bug: T299927
Change-Id: Iebe60b560069c8cfcdeed3f5986b8be35501dcbc
2022-01-27 19:13:55 +00:00
jenkins-bot 24e7430734 Merge "Add sectionObserver and tableOfContents component JS to respond to intersection changes" 2022-01-27 17:13:08 +00:00
Jon Robson 6534f01162 Opt out of external link icons
This was related to two unintentional regressions as we switched
off the legacy feature in July 58c87018 in legacy Vector,
and 722b5fbf in modern Vector.

Bug: T298433
Change-Id: Id258e328d1691f7bd31d2b3c57d64d5434706561
2022-01-27 15:26:39 +00:00
bwang d244f43e39 Rely on core TOC data to show the TOC in Vector
Bug: T298796
Depends-on: I406acf333d28b3898e3bc4968d05224febd09b3c
Change-Id: Iebb9c86b409a49d211c320f540b9af409b604b5b
2022-01-26 16:14:17 -06:00
Nicholas Ray 3c433a5315 Add sectionObserver and tableOfContents component JS to respond to intersection changes
This commits sets up the Table of Contents to bold the active section
when the section is scrolled.

Unfortunately, because our content does not have actual sections but
instead has a flat list of headings and paragraphs, we can't use
IntersectionObserver in the conventional way as it is optimized to find
intersections of elements that are *within* the viewport and the
callback will not reliably fire during certain scenarios (e.g. with fast
scrolling or when the headings are not currently within the viewport).
Furthermore, iterating through a list of elements and calling
`getBoundingClientRect()` can be expensive and can also cause
significant forced synchronous layouts that block the main thread.

The best compromise in terms of performance and function that I've found
is to use a combination of a throttled scroll event listener and
IntersectionObserver's ability to asyncronously find the
boundingClientRect of all elements off the main thread when `.observe`
is called which is the approach this patch takes. Although this is an
unorthodox way to use IntersectionObserver, performance profiles
recorded while holding the "down" arrow and scrolling for 10 seconds
with a 6x CPU throttle are comparable between master and this patch:

master: https://phabricator.wikimedia.org/F34930737
this patch:  https://phabricator.wikimedia.org/F34930738

Bug: T297614
Change-Id: I4077d86a1786cc1f4a7d85b20b7cf402960940e7
2022-01-26 14:11:43 -07:00
Translation updater bot 3c7b1e0eef Localisation updates from https://translatewiki.net.
Change-Id: Ic08803bce8ca2761d3eaacdad81cd38d68298143
2022-01-26 08:26:59 +01:00
Jon Robson 9fba9b6b9e Do not load common.js twice
An error in both of these modules. This module is additive (it doesn't
replace the existing user module) so only needs to add new pages, not
append to existing pages.

Bug: T300070
Change-Id: I3ba2ce82ba924972d0f9fea763328510aef41f8e
2022-01-25 20:10:31 +00:00
Translation updater bot 252b41de79 Localisation updates from https://translatewiki.net.
Change-Id: Ie414f6d9506a5de628a0e75a1e924dd719a2fc53
2022-01-25 08:34:31 +01:00
jenkins-bot e4b73894b8 Merge "Update typescript to latest (v4.5.5)" 2022-01-25 02:19:31 +00:00
Jon Robson b1cdf4acae Opt in link should be different in migration mode
In migration mode the control for opting out is different

Bug: T299927
Change-Id: Ie824c9051c929641e5ebab7a7b4a062e469ed6a0
2022-01-25 00:54:51 +00:00
Nicholas Ray 76eb7caa2f Update typescript to latest (v4.5.5)
Vector's tsc version is currently reporting errors that the latest
typescript version doesn't report and vice versa. Upgrade to the latest
version to avoid these discrepancies.

Additionally:

Fix tsc errors that are now reported by updated version

Bug: T297614
Change-Id: I0eb67bcc1a5ce214fcf2d6f6433a5de3a845b6a6
2022-01-24 16:35:45 -07:00
Jon Robson 435c903523 Fix bug in SkinVersionLookup
Bug: T299971
Change-Id: Icd8874315bf3c5846b00e8c34eb1a739c4a0feba
2022-01-24 13:34:06 -08:00
Translation updater bot 26835ad0ce Localisation updates from https://translatewiki.net.
Change-Id: I4386c70c08b9ed4f024a065280460c0878612257
2022-01-24 08:29:35 +01:00
jenkins-bot 92e5d4fd46 Merge "Avoid escaping TOC section titles" 2022-01-21 16:30:47 +00:00
Translation updater bot c75bbde795 Localisation updates from https://translatewiki.net.
Change-Id: Ie10210c79628b683d1963b90db6f143e3c3c423e
2022-01-21 08:15:44 +01:00
jenkins-bot efb6b4d152 Merge "Respect useskin when operating in MigrationMode" 2022-01-20 22:20:33 +00:00
bwang 3abd70392b Avoid escaping TOC section titles
Change-Id: I81f92627642c20d0770b2bc3223e056fc646365a
2022-01-20 12:31:11 -06:00
jenkins-bot 555db12047 Merge "Use 'toc' skin option and render with new TableOfContents mustache template" 2022-01-20 18:09:34 +00:00
Jon Robson 6cd9cc5be0 Do not try to make watchlist collapsible on wikis where watchlist is disabled
Bug: T299671
Change-Id: I9b44401ad753881ca986157dc06bb4402edc1017
2022-01-20 09:42:58 -08:00
jenkins-bot bb3fae5adb Merge "Ensure sticky header ULS menu appears in default location right underneath the button" 2022-01-20 16:27:59 +00:00
Translation updater bot 9d8a36731b Localisation updates from https://translatewiki.net.
Change-Id: I84b6ee222b2b472028199eb32efefdc7977da1e9
2022-01-20 09:20:25 +01:00
Jon Robson 94bab9f45f Respect useskin when operating in MigrationMode
Bug: T299171
Change-Id: I7c183949c358a5eb07c273044f63ac6474a62ad2
2022-01-19 22:33:28 +00:00
bwang 8a957c0163 Use 'toc' skin option and render with new TableOfContents mustache template
Bug: T297611
Change-Id: I8332f7b9c9574d8dece4f7111b299b95533cf386
2022-01-19 14:38:51 -06:00
bwang c761aa2067 Ensure sticky header ULS menu appears in default location right underneath the button
Bug: T298835
Change-Id: I2e061d87ccdc95e052d84ab8ba8a6d041801f184
2022-01-19 19:37:25 +00:00
Jon Robson 1149d3d611 Drop watchlist in user menu feature flag
Working correctly. No longer needed.

Additional change:
* add tooltip to menu

Depends-On: I418ce75bda8015520d1f1742ddcdfefbc8b9a162
Bug: T289619
Change-Id: I42f21ca8836e5042d07102e1516ca386478dfabc
2022-01-19 16:10:32 +00:00
Translation updater bot 3b034ff49f Localisation updates from https://translatewiki.net.
Change-Id: I54d67ab88317d1a10c25cc3392c516f5582df303
2022-01-19 08:25:32 +01:00
Jon Robson 37ee126a85 Restore icons to user links dropdown
Follow up to
I62562969a00eb96c83af4519e0e34e4a77ed8b19

Bug: T289619
Change-Id: I88a2d4af97227bb69dc9a11ea7ceac54895d2376
2022-01-18 11:14:44 -08:00
Translation updater bot 593cf2c2a3 Localisation updates from https://translatewiki.net.
Change-Id: Ibcda721ba3256d9a6379bdc501587c7d1c697b20
2022-01-18 08:12:36 +01:00
Jon Robson 55bcce3cc0 Don't run Vector hook when menu absent from page
While editing I was seeing a fatal due to this error being null
Err on side of caution and check for existence of menu
Follow up to I8309492881142d47eec4da5cc4aa5c6febbd1b35

Bug: T289619
Bug: T299352
Change-Id: I62562969a00eb96c83af4519e0e34e4a77ed8b19
2022-01-18 02:05:37 +00:00
jenkins-bot 863cdc34bf Merge "Use field name for the hide-if statement" 2022-01-17 20:10:04 +00:00
Translation updater bot 688af2c851 Localisation updates from https://translatewiki.net.
Change-Id: I91657d3db1ccaf13eea6e7fec481343e87f90ebe
2022-01-17 08:15:25 +01:00
Func 0bd3a30343 Use field name for the hide-if statement
Field name without 'wp' prefix (which is used as the key in html descriptor) is required.
After I58f9df384df8ecc5ebae8cac68ec2251351bc984, values of fields that are supposed to be disabled would be loaded from default, use a miss-matched field name would be treated as disabled.
It works in UI now, but it's not a good idea to strip the 'wp' prefix on the server-side.

Bug: T298819
Change-Id: If98368ad400986afaef3187867f201044ebf0efb
2022-01-17 03:24:10 +00:00
jenkins-bot 7368a7d6e1 Merge "Add watchlist icon to Vector" 2022-01-14 17:19:43 +00:00
Ed Sanders da1fb74554 Sticky header: Wait for some repainting to happen after VE teardown
Waiting for one animation frame seems to make the sticky header
re-appear consistently.

Bug: T299114
Change-Id: Ie1230bf861f12e4e18a6adb0f6779c199d6954a1
2022-01-14 14:41:36 +00:00
Jon Robson dc6d020410 Add watchlist icon to Vector
Depends-On: I5b1af082503fe22ec6049784fc43b324534c5b95
Bug: T289619
Change-Id: Idda8c49fe2833f3a64d7cc6d6db91bb6c3cde07e
2022-01-14 01:25:11 +00:00
Jon Robson 591e1d296c [Refactor] simplify watchlist link generation and adopt new icon
Bug: T289619
Change-Id: I8309492881142d47eec4da5cc4aa5c6febbd1b35
2022-01-14 00:26:10 +00:00
Nicholas Ray 699579e646 Add clarifying comment for why scroll padding is applied to html tag.
Change-Id: I9f4b44536b1e8aace41c8699a0d1946a54aa0bfe
2022-01-13 11:59:59 -07:00
jenkins-bot 467283247c Merge "Cleanup: Only need to import one variable file" 2022-01-13 17:06:23 +00:00
Translation updater bot e05460d1b2 Localisation updates from https://translatewiki.net.
Change-Id: I83e653836c833a78498122d3397aabdc681afe62
2022-01-13 08:28:41 +01:00