Commit Graph

2835 Commits

Author SHA1 Message Date
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
jenkins-bot 45badb5127 Merge "Revert "Add fetch tests from WVUI"" 2022-02-15 19:16:06 +00:00
Bernard Wang 3c161cf49e Revert "Add fetch tests from WVUI"
This reverts commit 7e79ad5686.

Bug: T301810
Change-Id: Icc8ecf6b0f8b1106e0a69364da251ff52161f523
2022-02-15 18:47:37 +00:00
Translation updater bot 91ebd9da17 Localisation updates from https://translatewiki.net.
Change-Id: Ibcf44808de6fac4359b27c530cdd8023b7e962ff
2022-02-15 08:19:13 +01:00
Jan Drewniak 7d32ec80d3 Collapse ToC by default & expand sections when clicking section headings
Collapses sub-sections in the new table of contents by default
(except for non-js and reduced-motion users) and expands the
sections when the top-level section link has been clicked.

Refactors the `activateSection` TableOfContents methods into separate
`activateSection` and `deactivateSection` functions.
Adds `expandSection` and `collapseSection` methods.

Adds triangle icon as a visual expand/collapsed indicator
next to all ToC section headings and are hidden via CSS based on
whether or not the section contains subsections.

Adds test for tableOfContents.

Bug: T299361
Change-Id: I36b3ae7f9f633877683bc17a9444c970d7fa7293
2022-02-15 00:09:50 -05:00
jenkins-bot bdef6990fb Merge "Add fetch tests from WVUI" 2022-02-14 22:08:04 +00:00
bwang 7e79ad5686 Add fetch tests from WVUI
Bug: T288686
Change-Id: Ic95b620087fc14b055a3108999540769ac123ec8
2022-02-14 13:52:16 -08:00
jenkins-bot 97f231d0fb Merge "Trigger a window resize event when toggling sidebar state" 2022-02-14 21:06:39 +00:00
bwang 2a83dad477 Add back flex-grow for sticky header search bar
Change-Id: Id503163d85dfc519d4c47f95e4567dcacfa7458e
2022-02-14 13:08:07 -06:00
jenkins-bot 4557c0910b Merge "Use new ve.activationStart hook to hide header earlier when loading editor" 2022-02-14 18:33:19 +00:00
jenkins-bot a541859743 Merge "[eslint] Disable mediawiki/class-doc" 2022-02-14 16:15:34 +00:00
Translation updater bot 98c9673321 Localisation updates from https://translatewiki.net.
Change-Id: I6274a3144d0660bb72b24727099f2585bf9bd2af
2022-02-14 08:17:04 +01:00
Nicholas Ray 6b73bd2b41 Fix jsdoc comments for sectionObserver.js
Move jsdoc comment closer to the methods they are describing. This also
enables better typehint support.

I36b3ae7f9f633877683bc17a9444c970d7fa7293 will handle revising tableOfContents.js.

Change-Id: Ifcac7cfd88cd3f1c0405611c880a0d101d2aed3b
2022-02-11 12:17:38 -07:00
bwang 52c7c2ee75 [eslint] Disable mediawiki/class-doc
Given our use of constants for tracking classes this eslint rule
is more an annoyance than helpful.

Change-Id: I37570e3e851997d058f2d93777990dddb3d04089
2022-02-11 16:31:33 +00:00
Translation updater bot d4fb2960d6 Localisation updates from https://translatewiki.net.
Change-Id: I24f076cdda8875e95b8d88380f3cd9a02b7b213e
2022-02-11 08:44:49 +01:00
bwang 3e92800bd6 Move REST search client out of WVUI into Vector
Bug: T288686
Depends-on: I4afc8c38dc9c51d55b46b766a1417b1266963482
Change-Id: Iac6023bb6edca5c8dddc3bfd362db727b2534946
2022-02-10 10:17:10 -06:00
Translation updater bot 7084f9a9df Localisation updates from https://translatewiki.net.
Change-Id: I07c5527841015cf0377762fe02903dae522b0930
2022-02-10 08:44:14 +01:00
jenkins-bot 5ac2b88293 Merge "Move #mw-sidebar-button layout styles to Header.less" 2022-02-09 23:11:56 +00:00
jenkins-bot 306dc89bf8 Merge "Limit WVUI search to ES6 browsers" 2022-02-09 23:01:03 +00:00
Jon Robson 0c2981d772 Limit WVUI search to ES6 browsers
Rather than test for fetch, limit the code to ES6 browsers.

Depends-On: I96a03796628a74ace93579d45a582711400c09c1
Change-Id: I4ca10182491118e61e155f99c713d4cb1b4fc7f0
2022-02-09 22:10:11 +00:00
Ammarpad 5c4d917497 Update Vector SpecialVersion description
Bug: T300994
Change-Id: I3f624013ec4ce408c50d66eca7a91b55b1288ae9
2022-02-09 20:23:09 +01:00
Nicholas Ray 390155c67f Move #mw-sidebar-button layout styles to Header.less
Given that these styles deal with the layout of the sidebar button in
the main header and don't make sense in any other context (at least
currently), I think they belong in Header.less.

Change-Id: I191b9a404c82c5a1a80f97d98fa54535fdd53944
2022-02-09 09:29:47 -06:00
Translation updater bot 260c9a8c20 Localisation updates from https://translatewiki.net.
Change-Id: If1bc1d00bfa288da5a8f9b5735e58aeae4e9a102
2022-02-09 08:14:08 +01:00
jenkins-bot c621e0e91d Merge "HTMLLegacySkinVersionFieldTest: Adjust tests to closer to real situation" 2022-02-08 23:48:21 +00:00
Nicholas Ray 80a111d0e4 Fix TOC section activation on link click bug
We want the link that the user has clicked inside the TOC to be "active"
(e.g. bolded) regardless of whether the browser's scroll position
corresponds to that section. Therefore, we need to temporarily ignore
section observer until the browser has finished scrolling to the section
(if needed).

However, because the scroll event happens asyncronously after the user
clicks on a link and may not even happen at all (e.g. the user has
scrolled all the way to the bottom and clicks a section that is already
in the viewport), determining when we should resume section observer is
a bit tricky.

Because a scroll event may not even be triggered after clicking the
link, we instead allow the browser to perform a maximum number of
repaints before resuming sectionObserver. Per T297614#7687656, Firefox
wasn't consistently activating the table of contents section that the
user clicked even after waiting 2 frames. After further investigation,
it sometimes waits up to 3 frames before painting the new scroll
position so we have that as the limit.

Bug: T297614
Change-Id: If3632529f58c15348a7200258f4f5999ea0dadc4
2022-02-08 14:45:16 -07:00
jenkins-bot d94c685f02 Merge "Use bodyClasses option to register static classes on skin" 2022-02-08 16:25:02 +00:00
Func 1d67da02f8 HTMLLegacySkinVersionFieldTest: Adjust tests to closer to real situation
The behavior of data loading can differ between submitting and display,
so use FauxRequest to customize the method.
Also fix the order of parameters passing to assertSame(), the first one
should be the expected one.

Change-Id: Icfa062eada75c50cd2c8bc5db2930602d80e9ae7
2022-02-08 09:34:49 +00:00
Translation updater bot 6ec87052e9 Localisation updates from https://translatewiki.net.
Change-Id: Ieca15e7e87a50e79a3259b1f46bdacf5e2348251
2022-02-08 08:30:23 +01:00
Jon Robson 29498112ed Migration mode is now the default
- Reflect production.
- Update SkinVector migration notes.

Depends-On: Ia527e60901de59f9e094ca0f1ba62a67a2f808a2
Change-Id: I8efa56fa0644b2ceb33fdab16da5df1d44ee621f
2022-02-07 22:20:16 +00:00
jenkins-bot bcd4ee0ee1 Merge "Fixes for sticky header:" 2022-02-07 16:16:47 +00:00
Translation updater bot f322eaa6ea Localisation updates from https://translatewiki.net.
Change-Id: I4d188788b4c3be4e524302e683dbb92af58f2bbd
2022-02-07 08:24:55 +01:00
Reedy ee76b72905 SkinVector: Minor cleanup
Change-Id: I788710e17ebed933cc70b0cd88138b0a1051d72c
2022-02-06 22:48:51 +00:00
BrandonXLF 936bbc427a Only show scrollbars when needed in language menu
Bug: T301058
Change-Id: I19af6c27b7adf8a35ccbc4163c585e338240eb72
2022-02-05 21:24:47 -05:00
jenkins-bot b570e149e2 Merge "Remove `getElementsByClassName` usage from sectionObserver" 2022-02-04 23:47:02 +00:00
Clare Ming 19e5d2885a Fixes for sticky header:
- Make page title width fill container.
- Remove page title fadeout, replace with ellipsis.
- Prevent language button contents from wrapping.

Bug: T298885
Bug: T300036
Bug: T298887
Change-Id: I6b09f89ed89a9da7406cdf8b3a00698a9dd66d10
2022-02-04 15:36:35 -07:00
Jon Robson 6f7a6bb24b Use bodyClasses option to register static classes on skin
Bug: T298734
Change-Id: Ia2ae8e1c655aff8783c2602da992632cd5877bf8
2022-02-04 18:44:43 +00:00
Translation updater bot 985299ef9a Localisation updates from https://translatewiki.net.
Change-Id: Ie1f9e4e1ea4f9bf4b93d39202c107082a24ae628
2022-02-04 08:23:51 +01:00