Commit graph

2971 commits

Author SHA1 Message Date
Translation updater bot ec9ecbfb27 Localisation updates from https://translatewiki.net.
Change-Id: Ic70a1359f8ca92cc323276d7d05d1f3164ff3c84
2022-03-04 08:35:15 +01:00
jenkins-bot d6c0b94ee5 Merge "Unset data-toc in SkinVector" 2022-03-03 19:18:42 +00:00
Jon Robson a0d399b1e2 Unset data-toc in SkinVector
Bug: T302461
Change-Id: I61cf5d3c9016d5997ae56ba18c5eb877e9f68d91
2022-03-03 11:00:10 -08:00
jenkins-bot fc897266bc Merge "Use explicit line height for user menu items" 2022-03-03 17:47:44 +00:00
Translation updater bot 5192f7a6b7 Localisation updates from https://translatewiki.net.
Change-Id: I7d5e0ca3630831eec85bcc2dc096a940bc65e4d1
2022-03-03 08:24:50 +01:00
jenkins-bot 9205554552 Merge "Render sidebar menu above TOC" 2022-03-03 00:26:38 +00:00
bwang 9fb8af8ae8 Render sidebar menu above TOC
Can only be merged after I8c0924f6de28b15602969de873a843b4cd69548b
has been in production for 3 days

Bug: T300875
Change-Id: I924a69b37214a34f989f49f0425c701650928e17
2022-03-02 17:04:47 -06:00
jenkins-bot 288c8b95b2 Merge "Update Vector menu CSS to use vector-menu-heading instead of h3" 2022-03-02 19:21:10 +00:00
Mortal303 ab11cc9adb Update Vector menu CSS to use vector-menu-heading instead of h3
Replaced h3 tag in includes/templates/Menu.mustache with label tag.
Replaced h3 elements in .storybook/icons.less, resources/common/components/Menu.less,
resources/common/components/MenuDropdown.less, resources/common/components/MenuPortal.less,
resources/common/components/MenuTabs.less,resources/skins.vector.styles.legacy/components/MenuDropdown.less,
resources/skins.vector.styles/components/UserLinks.less, resources/skins.vector.styles.legacy/components/Sidebar.less
and resources/skins.vector.styles.legacy/layouts/screen.less
by vector-menu-heading.

Bug: T290280
Change-Id: I6eee7d6bc47c74a62166d4579fd4d3da3dc88e88
2022-03-02 20:05:36 +05:30
Translation updater bot 370321a54d Localisation updates from https://translatewiki.net.
Change-Id: I9c591d0db2c1d4f4ca06d94c77d4c0614017261a
2022-03-02 09:38:26 +01:00
Clare Ming 338e0e72ac Fix language alert regression
- Add test for SkinVector::shouldLanguageAlertBeInSidebar() method.
- Change some methods to protected status -- acknowledging this is not
an optimal change. Until we can pull out some of the language checks
into its own class with injected dependencies (title, feature manager,
languages), this is an interim solution to try to catch regressions
since the conditional states for showing the alert are complex and
ultimately temporary. Extracting the language checks into their own
class can be done in a follow up ticket to help optimize testing
language checks in isolation.

Bug: T302018
Change-Id: I99b7df3029e0af86e4d67b3f446d4ce99260d33e
2022-03-01 15:37:43 -07:00
jenkins-bot 9c9d8693c5 Merge "Only show scrollbars when needed in language menu" 2022-03-01 20:20:09 +00:00
Translation updater bot fead8fa661 Localisation updates from https://translatewiki.net.
Change-Id: I4cfce7deaf9c5fb8db5b4c743a56f32707a93c12
2022-03-01 14:34:27 +01:00
jenkins-bot 5dccb7ec04 Merge "Hide sticky header and ULS button in print mode" 2022-02-28 23:00:40 +00:00
Translation updater bot ee5e8681ea Localisation updates from https://translatewiki.net.
Change-Id: Ibf8e5f769b15d7a181fb1e2713184d317f014cac
2022-02-28 14:31:30 +01:00
Volker E f2d7158616 build: Update 'svgo' to latest v2.8.0 & re-crush images
Updating 'svgo' to v2.8.0 and newest Wikimedia SVG guidelines –
mainly around new whitespace features of SVGO.

Change-Id: Ie48f5e78b3f9b6e7f01b65618c1d6089fa4a2f54
2022-02-28 00:00:05 +00:00
bwang be2abb581c Hide sticky header and ULS button in print mode
Bug: T300178
Change-Id: Ie1eb02530ec62fa011da4be45a61d26522c1650b
2022-02-25 17:32:35 +00:00
Translation updater bot f8560e27ac Localisation updates from https://translatewiki.net.
Change-Id: I4add582c90f34d8698fe0e8d013669abc7b6c6ec
2022-02-25 09:49:58 +01:00
Translation updater bot 9426c40d22 Localisation updates from https://translatewiki.net.
Change-Id: I401e8ca32ce0168796bb2e06e6281d33890eb0f5
2022-02-24 08:53:49 +01:00
jenkins-bot 835e8673e4 Merge "Add icon classes to portlet links without IDs" 2022-02-23 19:21:37 +00:00
jenkins-bot 98bc2ee412 Merge "Switch order of sidebar menu and article toolbar in DOM" 2022-02-23 16:39:20 +00:00
BrandonXLF 1b0af9022b Add icon classes to portlet links without IDs
Only limit the mw-ui-icon-vector-gadget-ID class to portlet links with
IDs.

Bug: T301012
Change-Id: Ib69957b8d44d9b2a02df9f453de262beb8740799
2022-02-23 16:23:58 +00:00
jenkins-bot 11b968cf18 Merge "Clean up: Remove ts-ignores in stickyheader.js" 2022-02-23 16:18:06 +00:00
Translation updater bot cbefe871fa Localisation updates from https://translatewiki.net.
Change-Id: I753ce8d6b0afc7fbefdb4ac6f52d67330bdb2e66
2022-02-23 08:20:54 +01:00
jenkins-bot d93f9e9bed Merge "Use TOC template data for showing collapsible section arrows" 2022-02-22 22:16:18 +00:00
bwang 5f0c0cb294 Use TOC template data for showing collapsible section arrows
Bug: T299361
Depends-on: I8ab5c0543b898d1df9399a1cb39672c45daf2acd
Change-Id: Ib68de8cd97cc1111a5a33e100e688d6832fc7e6e
2022-02-22 15:47:23 -06:00
Nicholas Ray 27939ac6c9 Revert "Improve jsdoc for tableOfContents.js and sectionObserver.js"
This mostly reverts commit f5ad6fe78a but
keeps the SectionObserverProps typedef.

Instead, we will use @module introduced in
Ib68de8cd97cc1111a5a33e100e688d6832fc7e6e.

Change-Id: I7aff49a3d922889cc99bc4313a6cb416410a7a0d
2022-02-22 12:36:35 -07:00
bwang e9d2f5e37f Switch order of sidebar menu and article toolbar in DOM
In order to make the TOC go below the sidebar menu, we must reorder the sidebar menu to be directly before the sticky TOC element.
This change involves cached HTML, so this change is separated out from the rest of the CSS changes to be merged first.

Bug: T300875
Change-Id: I8c0924f6de28b15602969de873a843b4cd69548b
2022-02-22 17:21:10 +00:00
jenkins-bot 8b5ea941e5 Merge "Improve jsdoc for tableOfContents.js and sectionObserver.js" 2022-02-22 16:35:55 +00:00
Translation updater bot 9dd22acfaf Localisation updates from https://translatewiki.net.
Change-Id: I20f33c9afa63de06a0879662bdd29957c897684a
2022-02-22 14:21:30 +01:00
Translation updater bot a96e2b6a90 Localisation updates from https://translatewiki.net.
Change-Id: Ib346a4e6fd8bb6f49f72e2129b992c025ceb9e3f
2022-02-22 08:13:50 +01:00
Nicholas Ray f5ad6fe78a Improve jsdoc for tableOfContents.js and sectionObserver.js
Switch to using @namespace which seems to have the best jsdoc support
for the revealing module pattern [1] that these two files use.

Additionally:

* Add typedef for section observer props

[1] https://www.oreilly.com/library/view/learning-javascript-design/9781449334840/ch09s03.html

Change-Id: I3eeda191e5da0294ad40533053adb57e1fc9c8e9
2022-02-21 17:40:10 -07:00
jenkins-bot a47f14658c Merge "Move table of contents code to SkinVector22" 2022-02-21 23:53:50 +00:00
Jon Robson ed4b45f44a Move table of contents code to SkinVector22
This avoids the RuntimeException in old Vector, and means
we can safely enable this on the beta cluster

Note, for any users that are in migration mode e.g. skin is
set to 'vector' and the skin version is set to 2 they will
not see a table of contents in the sidebar or article.

This won't be a problem in production provided T299104
is resolved before we enable.

Change-Id: I942a1cb933e7364600fe1af7491aca20546545e5
2022-02-21 23:36:15 +00:00
Nicholas Ray 6e9506dcad Dynamically expand/collapse sub-sections in ToC based on # of headings
Server render the table of contents in a collapsed state when the total
number of headings is equal or greater than the value of
`$wgVectorTableOfContentsCollapseAtCount`. Otherwise, the table of
contents will be server rendered in its "expanded" state.

In addition:

* Revise table of contents tests to call one `assertion` per element so
  that it is easier to see the exact element that may fail an assertion.
* Revise table of contents tests to call a mount function that can merge
  props to allow for a more flexible set of tests.
* Revise table of contents tests by wrapping a `describe` around tests
  that expect the same prop state.
* Adds typedef for table of sections props

Bug: T300973
Depends-On: Ifaee451e1903f2accd0ada2f2ed6dfa3f83037b6
Change-Id: I382200bc603b6abf757a91f14a8a55a6581969bd
2022-02-21 14:58:51 -07:00
bwang 48f1f1355b Clean up: Remove ts-ignores in stickyheader.js
From what I could tell, most instances of `toHTMLElement` or @ts-ignore could be fixed by using typeguards or using Element over HTMLElement.
Element is a looser typing than HTMLElement, but given `querySelector` returns `Element|null` and the fact that we were already inconsistently using both Element and HTMLElement in this file, I feel it was a worthwhile tradeoff

Change-Id: I3512a98fa67c13a4383b9497e8588960259b5b68
2022-02-21 11:41:12 -06:00
jenkins-bot 8dde172451 Merge "Sticky header dropdown should not contain gadgets in personal menu" 2022-02-21 17:35:41 +00:00
Translation updater bot abf3725b27 Localisation updates from https://translatewiki.net.
Change-Id: I3819d51e8a8971b20284c3ec3938e21d174d97d8
2022-02-21 08:19:22 +01:00
jenkins-bot db902a3250 Merge "Offset the TableOfContents top property only when the sticky header is shown" 2022-02-19 01:32:03 +00:00
Clare Ming 098f65712e Fix long titles with wbr tags in sticky header
Bug: T300134
Change-Id: Ice45acf026e4ef0deee9c6d6f905634cad59c2e3
2022-02-18 17:14:15 -07:00
Jon Robson 2dcd99ed21 Sticky header dropdown should not contain gadgets in personal menu
Bug: T302087
Change-Id: Iae1f42c3c526398d7dea038786ae9001e118307b
2022-02-18 21:30:29 +00:00
Translation updater bot 08d2ae3171 Localisation updates from https://translatewiki.net.
Change-Id: I779eb40afb07e836d7e4f0deffb04293d600ab05
2022-02-18 08:42:51 +01:00
Nicholas Ray 29e40714bc Offset the TableOfContents top property only when the sticky header is shown
This uses the sticky header's `.mw-sticky-header-element` utility class
to conditionally offset the table of contents to the height of the
sticky header only when the sticky header is enabled.

Bug: T300077
Change-Id: Ibad97a11e708ba19acf27ca82320f7c3e5f80447
2022-02-17 12:20:15 -06:00
Translation updater bot ad4e582a8a Localisation updates from https://translatewiki.net.
Change-Id: I06c4e94437b7971ce82b87f1edc46bdbfa5b0af3
2022-02-17 08:13:44 +01:00
jenkins-bot 9b7d5ad473 Merge "Toggle ToC sections when clicking toggle button" 2022-02-16 22:30:25 +00:00
jenkins-bot 914e3d55e6 Merge "Add fetch tests from WVUI" 2022-02-16 22:07:18 +00:00
bwang 301e09916d Toggle ToC sections when clicking toggle button
Bug: T300167
Change-Id: If1150a9e018b232da900187383aaee9c9cf331a1
2022-02-16 15:48:28 -06:00
Translation updater bot 0d9166829d Localisation updates from https://translatewiki.net.
Change-Id: I0c4e5bf3f92da9bcf898ef7b1660e25f290a68cc
2022-02-16 08:14:50 +01:00
bwang a560fb814a Add fetch tests from WVUI
Bug: T288686
Change-Id: Ifeb2e355482d3d5920c2535c89193cc4f36a13c9
2022-02-15 14:00:40 -06:00
jenkins-bot 0f49a257d1 Merge "Collapse ToC by default & expand sections when clicking section headings" 2022-02-15 19:31:18 +00:00