Commit graph

4164 commits

Author SHA1 Message Date
Ed Sanders 77734b1597 Add feature flag to "promote add topic" feature
Will be used to control rollout to WMF wikis but can
default to true here.

Bug: T267444
Change-Id: I716563efffc2401fbf5f8b53876a8b58706b1cda
2023-02-24 13:48:29 +00:00
Translation updater bot d276facc92 Localisation updates from https://translatewiki.net.
Change-Id: Ie06f1f6b557269dc6125082978832296f4671ad0
2023-02-24 09:03:07 +01:00
Ed Sanders d90d1d17b1 Promote "Add topic" button to PageTitlebar
Bug: T267444
Change-Id: I813908d65640566a61eac51d6f55a3b4d3e9537d
2023-02-24 01:33:47 +00:00
Jon Robson c06c547b02 Table of contents: FIXME cleanup
Follow up to Ib42d532d4e900c01061e1c5e39c03b17f0619c46

Hoist hook binding into main.js and update tests

main.js now only tests hook wire up.
tableOfContents calls reloadTableOfContents directly.

Bug: T316025
Change-Id: Ia06feab7cfb47a64ac3519bd7bd0428dc661045a
2023-02-24 01:16:20 +00:00
jenkins-bot ffc69eca91 Merge "SkinVector22.php: Add missing typehints" 2023-02-23 23:34:51 +00:00
jenkins-bot 2cd8fc5782 Merge "Ignore noisy rule for a11y test" 2023-02-23 21:30:20 +00:00
bwang 6b3ef91c74 Ignore noisy rule for a11y test
Change-Id: Ic17f788b1fa463d1f9a843e5047479e03acd90a7
2023-02-23 15:01:48 -06:00
jenkins-bot e40caf0c85 Merge "SectionObserver should be updated at certain points in MediaWiki lifecycle" 2023-02-23 20:16:28 +00:00
jenkins-bot af2c9c61c6 Merge "Revert "Only apply vertical margin to #siteNotice content when non-empty"" 2023-02-23 19:57:05 +00:00
Bernard Wang 41bd9569cf Revert "Only apply vertical margin to #siteNotice content when non-empty"
This reverts commit ff8a5bc034.

Reason for revert: T325219 is expected

Change-Id: Id153bcd5d365263dfa84e7c2e45d69d1c72fabdd
2023-02-23 19:32:54 +00:00
jenkins-bot 87e8137ba3 Merge "Update naming convention for TOC" 2023-02-23 17:39:43 +00:00
ksarabia e057a46d45 Update naming convention for TOC
Deploys vector-feature-toc-pinned-enabled/vector-toc-pinned-disabled additions to CSS.

Bug: T325032
Change-Id: Ifa9a33ad686080a8b630ecead3fafed1eddd7e2b
2023-02-23 16:30:19 +00:00
Ed Sanders 01e11d68b9 SkinVector22.php: Add missing typehints
Change-Id: Iebb92f74809de5945186716ae707fc85c3ad8e05
2023-02-23 11:21:59 +00:00
Translation updater bot 233b05b7c5 Localisation updates from https://translatewiki.net.
Change-Id: I34347976b9964750d08a04163d6d23ab8b8aad68
2023-02-23 08:42:39 +01:00
Jon Robson 450a395f95 SectionObserver should be updated at certain points in MediaWiki lifecycle
* When wikipage.tableOfContents is executed, the table of contents has been
replaced so we should update the sections associated with the section
observer as the old sections no longer exist in theDOM.
* If VisualEditor repaints the page, we should update the elements associated
with the table of contents as the body-content element no longer exists in the page.
* When VisuaLEditor is active we should disable the intersection observer as
there is no table of contents to update.

Minor changes:
* Light refactor of large function in main.js
* reloadTableOfContents returns a promise and now fires a new hook
wikipage.tableOfContents.vector to signal when it is finished which
has also been requested by community members. This allows the code in main.js
to update elements at relevant point in time
* Add FIXME note (doing this would have been considerable work)
* I've added a call to mw.log.warn which would have saved me considerable
debugging time for this issue to diagnose the issue.

Bug: T316037
Bug: T316025
Change-Id: Ib42d532d4e900c01061e1c5e39c03b17f0619c46
2023-02-23 01:39:46 +00:00
bwang d74abe5dd6 Clean up user links cached HTML code
Bug: T289212
Follow-up: Iac0586893fec26a8a6c2c904ce08fbf1e19b339c
Change-Id: I139750136b3b83ecfd87c2998aa0769f57d92aff
2023-02-22 23:30:26 +00:00
jenkins-bot ebee74c578 Merge "Rename IconLink to Link" 2023-02-22 22:45:17 +00:00
jenkins-bot 4c8f7a5652 Merge "Revert "Updates for core temp user autocreation feature"" 2023-02-22 22:41:02 +00:00
jenkins-bot 8d64966d5f Merge "Split off mediawiki.notification styles for legacy Vector" 2023-02-22 22:17:29 +00:00
jenkins-bot 4cba003a6d Merge "Only apply vertical margin to #siteNotice content when non-empty" 2023-02-22 22:13:00 +00:00
bwang 0e5ef398b2 Rename IconLink to Link
Now that there is a Link.mustache, I think other components like Button, Link should use the Icon template, and not include icon in the name, as its possible to have a link or button that doesnt use an icon as well.

Change-Id: I6d8a17dd956f09bb3df7a2503f55d255599874f8
2023-02-22 22:00:24 +00:00
Ed Sanders ff8a5bc034 Only apply vertical margin to #siteNotice content when non-empty
Bug: T325219
Change-Id: I7fd7600172e72707d1d8065ed2be235841a401be
2023-02-22 20:42:02 +00:00
bwang c72cacec71 Cleanup: Remove unused TOC scroll hooks code
Previously for the table of contents A/B test we triggered
scroll events when the table of contents was scrolled into
view. Now this is never referenced, so the code is cleaned
up to only apply to when the title is scrolled into view.

Change-Id: Ie9a5c4b6d88068d914cbbcc3d046ac288d49172b
2023-02-22 16:00:33 +00:00
Translation updater bot 71c5607908 Localisation updates from https://translatewiki.net.
Change-Id: Id860cc9518439d99b27e4c3aac842f68493c3bc3
2023-02-22 09:03:23 +01:00
jenkins-bot 582e6d2769 Merge "Bump nvmrc to 16.16.0 to match Codex" 2023-02-22 03:41:39 +00:00
bwang a8796043e0 Bump nvmrc to 16.16.0 to match Codex
Fixes these CI errors: https://jmp.sh/uk1gkpIk

Change-Id: Icffacfd0a55859b759d79ad6559b0f427df4f1b3
2023-02-22 03:12:02 +00:00
jenkins-bot 0995b865d4 Merge "search: Undo v-i18n-html workaround" 2023-02-21 23:15:35 +00:00
jenkins-bot 874883536b Merge "Fix dropdown icon markup to match Codex button" 2023-02-21 22:52:20 +00:00
Moh'd Khier Abualruz efe33d5d76 Ensure ToC is always accessible via landmark region (<nav>)
- We had to add nav element to wrap TOC in all places
- Make sure proper nav is only displayed so landmark do not get confused
- Remove Eslint block on rules compat/compat for no support IE 11, this was blocking commit
- Run lint:fix:js and lint:fix:styles
- Fix maxSize in bundlesize.config.json

Bug: T324505
Change-Id: I36d26240b87de33318ff1edf97a410872a438103
2023-02-21 22:19:52 +01:00
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
Jon Robson f2fb827630 Revert "Updates for core temp user autocreation feature"
This reverts commit 8d0659b1e6.
The logic for temporary users is now centralized inside
MediaWiki core, so Vector has no need to check whether a user
is temporary and instead work with the data it's given.

Depends-On: I36815aaef81ec7368e240a780e90bd574785df74
Bug: T328725
Change-Id: Ie30dd6a77ef391f74a435e0b9df74793ffdf73bb
2023-02-21 11:30:27 -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
Jon Robson 2039a1e130 Targets no longer needed
All match current default.

Bug: T328497
Change-Id: I3d5fbb48fab930b3cfd446054462e0a3f37b40c1
2023-02-16 11:45:57 -08: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