Commit graph

4031 commits

Author SHA1 Message Date
bwang 8db112ddb3 Fix dropdown icon markup to match Codex button
- Fixes TOC button being transparent (https://jmp.sh/jbuivqlM). FYI the fixed width toggle button has the same issue.
- Add replace `html-vector-heading-icon` with Icon.mustache

Bug: T320453
Depends-on: I9a990ea8de63fb336391bea11b4503d447fb9d4f
Change-Id: I39397f8e98f79a2fdde9a8d785690133ea5a2619
2023-02-21 12:41:44 -06:00
bwang ea1a0b0778 Shows TOC below page title for anon users
- Removes 'mw-ui-quiet' class from the TOC button when below the page title, meaning the TOC is just using default button styles. However, these styles are still not to spec due to button/icon tech debt (https://jmp.sh/jbuivqlM). The styles are fixed in the following patch
- DRY up TOC CSS
- Fix no-js collapsed TOC styles

Results in 4 expected visual changes. Note, the button styles are still incorrect and will be fixed in the next patch
https://jmp.sh/nHujNdVK

Bug: T315932
Bug: T320453
Depends-on: I490eb6244a35f18149844a87297c5f1ccc5b7df9
Change-Id: Id11805029b78847734d15041d31c2538412cf20a
2023-02-21 10:41:44 -06:00
jenkins-bot 3dbda2f93b Merge "Disallow scroll anchoring in navigation grid columns" 2023-02-21 10:24:03 +00:00
Translation updater bot addcf3f4aa Localisation updates from https://translatewiki.net.
Change-Id: Iff84c65eddd61fe7afd869213b6b0cf36cddea8e
2023-02-21 08:23:28 +01:00
Bartosz Dziewoński f0fdd8b6da Disallow scroll anchoring in navigation grid columns
To improve user experience when using gadgets and extensions that
cause layout shifts after page load, we want the anchor node selection
algorithm to only pick nodes in the content column or spanning full
width of the page.

Bug: T330108
Change-Id: Id996f766a535a487fb6bafe6a06a98d1a60ac8e3
2023-02-21 03:48:40 +01:00
Translation updater bot a0319176aa Localisation updates from https://translatewiki.net.
Change-Id: I42249d7ed1af7e9a185f6badb1bf140eb3ea2f67
2023-02-20 09:49:51 +01:00
Jon Robson 5c39353d6d [Refactor] Split out table of contents code
Large diff mostly to
hoist setupTableOfContents above main where it is used
(originally part of Id11805029b78847734d15041d31c2538412cf20a)

Change-Id: Icc41a86546ebc90ae35989ccd4dbb38b214efbb8
2023-02-18 00:36:23 +00:00
jenkins-bot 2111fa770b Merge "Reduce verbosity of menu dropdown with aria-hidden" 2023-02-17 18:44:26 +00:00
Translation updater bot 6286b9b02d Localisation updates from https://translatewiki.net.
Change-Id: I382d666fd77babfe4f42547dd5875444274d4a53
2023-02-17 08:58:28 +01:00
bwang 159d298aaa Reduce verbosity of menu dropdown with aria-hidden
Bug: T325026
Change-Id: I9cd919b083dcbd0ca417cde3488968be9e2c503e
2023-02-16 15:21:53 -06:00
Jan Drewniak e4af2b5df3 Prevent addPortletLinkHandler from looping over links twice
- Prevents the addPortletLinkHandler function from looping
over the same links multiple times by indexing
the HTMLElement instead of just the ID, which is an
optional parameter.
- Conditionally adds the icon class if the ID parameter
exists.
- Refactors the function to calculate the width of the
vector toolbar.
- Adds Jest tests to account for the dual icon scenario
and updates existing Jest tests.

Bug: T327369
Change-Id: I2a0934405efebd0e95919bc523d711866236a7e6
2023-02-16 20:05:54 +00:00
bwang fca03c873b Update user links dropdown id
- Update naming convention to use dropdown instead of menu

Follow-up: Iac0586893fec26a8a6c2c904ce08fbf1e19b339c
Change-Id: Ie51f7fc280eeef8470613c07850dad83e4435ee8
2023-02-16 11:21:56 -06:00
jenkins-bot 07b529bb97 Merge "Add label text to TOC toggle buttons" 2023-02-16 16:10:12 +00:00
Jon Robson a2b9847dda [Code organization] Move dropdownMenus test to correct directory
Change-Id: I28fa3f9127e92a4c55819e4fa64ae990118e2c8c
2023-02-16 10:01:35 -05:00
Jan Drewniak 696c2c902e Add label text to TOC toggle buttons
Adds a label to the TOC toggle (i.e. hamburger)
buttons near page title and in the sticky header.

Bug: T328584
Change-Id: I9c6e62715eaa4eca05b7fb53385c5ab8cf2431e3
2023-02-16 09:09:03 -05:00
Translation updater bot 6eac1455ed Localisation updates from https://translatewiki.net.
Change-Id: I0e6bc496f497d6616ae79e0ad3e447cb2952e98d
2023-02-16 08:50:05 +01:00
Moh'd Khier Abualruz fbfd887e80 Table of contents subsection toggle buttons missing label
- Reassign the edit sections array to tocData array

Bug: T328682
Change-Id: I5c0829f5361f0246fe9bc76688901b1cfb8d1486
2023-02-15 17:47:17 +01:00
Translation updater bot 712d3028bc Localisation updates from https://translatewiki.net.
Change-Id: If4698b46bf21a86c800ec87e3b20f756b7a9192d
2023-02-15 08:27:41 +01:00
jenkins-bot 6c8dbcf0db Merge "Enable Page Tools for all logged in users" 2023-02-14 22:06:19 +00:00
jenkins-bot 21932c9800 Merge "Work around browser inconsistencies with 'clear' + 'margin-top'" 2023-02-14 19:43:38 +00:00
Translation updater bot e17933df36 Localisation updates from https://translatewiki.net.
Change-Id: Ib3e3ecce47147121a826298b53f85cf5c31b4e62
2023-02-14 08:33:27 +01:00
bwang 1696280f39 Enable Page Tools for all logged in users
Bug: T328692
Change-Id: I881be07088d1ff2210e441c74c70ee156783d1d0
2023-02-13 18:53:37 +00:00
Translation updater bot 38d53ecb9f Localisation updates from https://translatewiki.net.
Change-Id: Ibd82a806c5c3cb68a9a53c7f41051288c09774a6
2023-02-13 08:33:13 +01:00
jenkins-bot be0476b17f Merge "Make space between top of TOC/Page tools and top of viewport/bottom of sticky header 30px" 2023-02-10 19:58:28 +00:00
Nicholas Ray 0440eeada4 Make space between top of TOC/Page tools and top of viewport/bottom of sticky header 30px
Per T318169#8601576, the space between the top of the TOC and Page tools to the
top of the viewport or bottom of the sticky header should be 30px.

* Revises the page tools columnEnd grid to begin at the top of the titlebar to
enable 30px of top padding on the page tools

* Consolidates some styles in TableOfContentsPinned.less

VISUAL CHANGE: table of contents moves down page.

Bug: T318169
Bug: T319315
Change-Id: If8d8f87942d6265461b1a1a8ccf1c447d6e8b0d6
2023-02-10 19:43:05 +00:00
jenkins-bot 2304326a31 Merge "Use the wikimedia-ui-legacy theme for Codex component styles" 2023-02-10 13:32:06 +00:00
Translation updater bot 1871f15a32 Localisation updates from https://translatewiki.net.
Change-Id: Ic1ee209d101940d010a777fff7c9b7833d9c7a65
2023-02-10 08:46:15 +01:00
jenkins-bot c14ea4cc71 Merge "Remove custom handling of user links menu items and handle case when anon editor links are disabled" 2023-02-09 22:05:34 +00:00
Roan Kattouw 05693ff7f1 Use the wikimedia-ui-legacy theme for Codex component styles
MW core defaults to the wikimedia-ui theme, which is meant for a base
font size of 16px. Both Vector and Vector-2022 have a base font size of
14px, so they need to use the wikimedia-ui-legacy theme instead.

Bug: T324367
Bug: T329287
Depends-On: I7435413928f2b8c5d43c34d9e2e7df470d710c93
Change-Id: Ia130be691d578fb8e5675a94670ec7e35f448fe7
2023-02-09 21:39:18 +00:00
bwang 9e4bdd00bf Remove custom handling of user links menu items and handle case when anon editor links are disabled
Rather than try to build individually build login, logout, and create account menu items, we handle them the same as all other user links menu items in Hooks.php. While Hooks isnt ideal, there currently isnt a good path for moving that code to SkinComponents until core provides menu data. In the meantime, this patch reduces code complexity and prevents bugs like T324638.
This approach also allows us to move user links logic from SkinVector22 to VectorComponentUserLinks.php, and ensures the user links dropdown contains multiple menus, which allows us to reuse styles from page tools dropdowns.

Expected 11 visual changes:
* minor visual change where the user links dropdown has an
additional 4px vertical padding.
This padding was originally added to the page tools dropdowns
per Alex's request, but Alex also said that dropdowns should share
the same spacing. This change makes the styles all consistent
* Order of talk and contribution links have been swapped

Bug: T289212
Bug: T319356
Bug: T328954
Change-Id: Iac0586893fec26a8a6c2c904ce08fbf1e19b339c
2023-02-09 13:37:17 -06:00
Translation updater bot 659aee4559 Localisation updates from https://translatewiki.net.
Change-Id: I986732a1672fb098ce5b83bbf6971f16019b134f
2023-02-09 10:15:01 +01:00
jenkins-bot 388a8cc6ce Merge "Replace automated testing code with npm package" 2023-02-09 00:26:49 +00:00
bwang f415a556dd Additional FIXME cleanup relating to moving feature classes from body
Additional follow up to Id5afe2c60dc0067e7c74433eda5cd7858f54b0d7
(55bb37f2a)

Change-Id: Id98161572a09b1d3fc340d75bd8e28b277d68e30
2023-02-08 10:49:13 -06:00
Translation updater bot aea2e88ddb Localisation updates from https://translatewiki.net.
Change-Id: I81428c454f3ba358700517962e618dcf719f0b87
2023-02-08 08:42:08 +01:00
bwang 575ab2af9c Replace automated testing code with npm package
Change-Id: I36786bd8a378110672a832f511cd41424ed0709f
2023-02-08 01:05:22 +00:00
jenkins-bot ef77ee37de Merge "Moving padding-bottom to mixin-vector-scroll-indicator" 2023-02-08 00:00:23 +00:00
Nicholas Ray 0243a0125b Moving padding-bottom to mixin-vector-scroll-indicator
Follow-up to 886437, which suggested moving the bottom padding of the scroll
indicator's parent to the `mixin-vector-scroll-indicator-mixin`. This makes
sense because if the correct amount of bottom padding isn't applied, the scroll
indicator could overlap the text when scrolled all the way to the bottom.

Bug: T318169
Change-Id: I94f98ae75f9b80484114a2413caf2cb0c237e8ba
2023-02-07 16:33:44 -07:00
jenkins-bot efc2b5f337 Merge "Make page tools sticky" 2023-02-07 20:11:33 +00:00
Nicholas Ray ffda1975e3 Make page tools sticky
* Adds sticky behavior to pinned page tools

* Moves scroll indicator styles into a mixin shared by TOC and page tools

* Replaces the 10px magic number in the TOC used to calculate the bottom padding with the
@padding-vertical-dropdown-menu variable.

* Increases the pinned TOC max-height per T319315

* Corrects spacing between bottom of sticky header and top of TOC after discussion with designer

* Causes 43 visual changes in Pixel that include intentional changes and subpixel
rendering changes associated with the `contain: paint` rule.

Bug: T318169
Bug: T319315
Change-Id: Ica0c4e0de1825d37d8136b589a9bf5decc96855e
2023-02-07 12:49:48 -07:00
Jon Robson d2eb3c4e55 Disable languages on history page
Bug: T328996
Change-Id: I895bea1e7d3e0c23bcc60395e562297e016d1f5a
2023-02-07 19:27:56 +00:00
jenkins-bot d4a88d2bd2 Merge "Remove button styling from log in link" 2023-02-07 18:02:11 +00:00
bwang c6f1153bcc Remove button styling from log in link
Bug: T289212
Change-Id: If0181aa07cf30ffa6e67a73a983b23be4d6a7064
2023-02-07 15:57:39 +00:00
jenkins-bot 137a8fb6be Merge "Languages should be in HTML at top whenever languages are added to page" 2023-02-06 23:52:36 +00:00
jenkins-bot 241589a6ea Merge "Move Log in link to overflow menu" 2023-02-06 23:44:08 +00:00
bwang 766249492f Move Log in link to overflow menu
Bug: T289212
Change-Id: I585bf644eeb68832cb0db079abd9f34256c0a1fe
2023-02-06 17:15:49 -06:00
jenkins-bot 08068337b3 Merge "Sticky header logout goes via API avoiding a second click" 2023-02-06 23:02:44 +00:00
Jon Robson d16d7e80d9 Sticky header logout goes via API avoiding a second click
Bug: T324638
Change-Id: I59a192863706f1d2a09ec59090c0b099ced8cde0
2023-02-06 21:40:30 +00:00
bwang fcc3d3c9a9 Rename data-user-menu prefix to data-user-links, matching the template and component naming convention, create UserLinksDropdown.mustache
Change-Id: I6f0de836e39ba6bdcd5a8ff832e951164d69e586
2023-02-06 13:01:01 -06:00
Jon Robson dcec7a3f1d Languages should be in HTML at top whenever languages are added to page
Use CSS to decide whether to show the button or not. This retains the
existing logic for hiding the button on any page where the action is not
view.

Bug: T327795
Change-Id: If74246418f87c871c01cb7b2b62f6c59263bf976
2023-02-06 17:34:00 +00:00
Translation updater bot 422f5b0741 Localisation updates from https://translatewiki.net.
Change-Id: Ide82cc2a25499ad101d7b1e810fd22e09fade8ad
2023-02-06 08:48:56 +01:00