Commit graph

731 commits

Author SHA1 Message Date
jenkins-bot 8c48541379 Merge "Rename TOC locales to be generic pin/unpin labels, standardize toc label locale name" 2022-11-15 01:19:03 +00:00
bwang ddf8706ae4 Fix main menu button spacing when the VisualEnhancementNext flag is enabled
This patch results in an expected visual change for the main menu button when the flag is on
When comparing with master with the flag off, this patch will still show a 1px difference for the main menu button, as well as user menu and language button. These are not introduced by this patch and are due to the flush classes taking into account the 1px border

Change-Id: Id46bc939338d5bbcc3459ab502e1cf8b8f2020b2
2022-11-14 22:32:51 +00:00
bwang 17bdb31de5 Rename TOC locales to be generic pin/unpin labels, standardize toc label locale name
- 'vector-toc-toggle-position-title' -> 'vector-pin-element-label'
- 'vector-toc-toggle-position-sidebar' -> 'vector-unpin-element-label'
- 'vector-toc-heading' -> 'vector-toc-label'

Change-Id: I4c45fa9a152e26691cc0b62ce8d40d00f8f2e617
2022-11-14 16:26:08 -06:00
bwang f73d255810 Replace aria-labelledby in ToC with aria-label
Bug: T318178
Change-Id: I7abcc977276b979c5a515fbbcccf42d7c993a130
2022-11-14 18:10:38 +00:00
bwang 6bff0011c1 Fix ToC dropdown menu spacing when visual next flag is enabled, address icon related feedback
Causes 20 visual progressions regardless of visual next flag, the ToC moves 1px when in the sidebar

Follow up to If3aed0ac401b0abc80c3ad52806eb85b33d43f06

Bug: T321504
Change-Id: I4b3ec90d8e79791a1bf17ba02c9f9d722499bec8
2022-11-11 18:56:12 +00:00
jenkins-bot cd0250dbb4 Merge "Replace 'more' menu with page tools pinnable dropdown" 2022-11-10 22:21:38 +00:00
bwang 8f5b33fee3 Replace 'more' menu with page tools pinnable dropdown
Bug: T317897
Change-Id: Ia94ebc32041bb3c2f86d461b310766b2d14c66a2
2022-11-10 15:33:16 -06:00
bwang 16da6a5e6a [Technical] Fix sticky header search input alignment when VisualEnhancementFlag is enabled
Visual changes when the flag is on

Follow up to If3aed0ac401b0abc80c3ad52806eb85b33d43f06
More context at T322673#8383888

Bug: T322673
Change-Id: I64a47fa869247f758c6369c2e0ff8b12f87f9d9e
2022-11-10 00:48:07 +00:00
jenkins-bot e60d8f6917 Merge "Add ColumnEnd.mustache and new grid styles to support third column" 2022-11-09 23:08:31 +00:00
Jon Robson 5205378a8e Enable VisualEnhancementNext
Additional changes:
* More defensively check for link-class which may or may not
exist on menu items

Bug: T320101
Change-Id: Ifbd913c82933d9a8cc276d070b2b3f3ebb77c9c1
2022-11-09 17:58:14 +00:00
bwang e90b7e341f Add ColumnEnd.mustache and new grid styles to support third column
Bug: T317897
Depends-On: Ibf304843a62d5269992a01eb826edf71ce8d3c35
Depends-On: Ib424ca1c767161fdae8c0aeedfe662b7fa039ff6
Change-Id: Ie7d31df972ff68313b2437ff14b7b6b8d7078204
2022-11-09 11:54:30 -06:00
bwang 9bb2f5a55a [Technical] Add DropdownContents.mustache
Bug: T317897
Change-Id: I62edc311a7a2434ab83592d99e870dd82d775de4
2022-11-08 13:56:21 -06:00
Jon Robson 62aa69fa77 [Template] Move search template code into component
Bug: T322089
Change-Id: I8ad3218e99c07ea913df51a2b2134721568cdbf9
2022-11-07 13:32:59 -08:00
jenkins-bot afca126c96 Merge "[Technical] Drop redundant isLegacy logic" 2022-11-04 21:02:09 +00:00
Jon Robson 33a67b226c [Technical] Drop redundant isLegacy logic
It's no longer needed (hurrah) once we move
search logic into individual skins. This
will also make a difficult to add additional code
to SkinVector going forward supporting our goal
of removing it.

Bug: T319349
Change-Id: I595356db449572e5fb914b909d9624f25fc2d808
2022-11-04 17:47:14 +00:00
Jon Robson ea07136e73 Fix alignment between icons on left and right of screen
- Table of contents arrows are now aligned with sticky header search/hamburger
- The user menu dropdown now aligns with more and languages button

Bug: T321504
Change-Id: If3aed0ac401b0abc80c3ad52806eb85b33d43f06
2022-11-04 17:06:48 +00:00
jenkins-bot cdd5fd5950 Merge "Remove CSS classes and selectors from cached HTML" 2022-11-03 21:37:42 +00:00
Jon Robson c9cdaadb5e [Technical] Separate Dropdown template into 3 templates
Use the new format to remove the need for getTemplateParser
in SkinVector

Bug: T319349
Change-Id: Ic4ac1d6d58099a689c29c16b3029bf43a849e50e
2022-11-03 20:41:20 +00:00
bwang 099eed0487 Remove CSS classes and selectors from cached HTML
Bug: T316570
Depends-on: Ib4050768f20b1734d356104f18aa539f657099d8
Change-Id: I97f87b32402d7f4fd790f9a8b9abab42efd9d890
2022-11-03 11:12:39 -05:00
Bernard Wang 15d95fc24a [Technical] Split up Menu.template, restrict decoratePortletData to legacy Vector
Changes:
* Code is moved from SkinVector to SkinVectorLegacy verbatim since it is now only
needed by SkinVectorLegacy
so we remove it:
** This step broke MainMenu rendering so this was captured in VectorComponentMainMenu
** The isLegacy code no longer makes sense and is removed in a follow up

* storybook no longer run on CI

Authors: Bernard Wang and Jon Robson
Bug: T321102
Bug: T319349
Change-Id: Ib424ca1c767161fdae8c0aeedfe662b7fa039ff6
2022-11-02 21:22:50 +00:00
jenkins-bot b4d70cb443 Merge "[Components] Introduce VectorComponent and MainMenu components" 2022-11-02 16:02:10 +00:00
bwang cc201a42d9 Finish moving to Page Tools naming convention
Change-Id: I8fcfac60b34a500e751cf10ca2ae5c26dd35881f
2022-11-02 00:59:16 +00:00
Jon Robson 6636367d47 [Components] Introduce VectorComponent and MainMenu components
To aid moving towards a MainMenu component we must first make subcomponents
for the language alert and opt-out link (which share code which
I've captured in VectorComponentMainMenuAction)

Code is lifted into SkinVector22 to allow us to easily make the template
change without any breaking visual changes

Bug: T319349
Bug: T322089
Change-Id: Ibb69d029a9fb6cee3482e15a60a7358361bd2405
2022-11-01 17:01:51 -07:00
jenkins-bot e857cfa9e1 Merge "Align text of main menu and ToC to main menu button" 2022-11-01 16:47:05 +00:00
jenkins-bot c12d8bb96e Merge "Add generic PinnableHeader template, CSS & JS" 2022-11-01 16:45:18 +00:00
Jan Drewniak 8c63ac7c55 Align text of main menu and ToC to main menu button
Instead of aligning the edge of the main menu and
ToC with the edge of the main menu button, this
aligns the text of those sidebar items with the
edge of the main menu button.

NOTE: Currently not working with the
vectorvisualenhancementnext feature flag enabled.
This will be addressed in If3aed0ac401b0abc80c3ad52806eb85b33d43f06

Bug: T317583
Change-Id: I01f639c5ca63ac50235dc21ca5273c91213f041c
2022-11-01 16:30:01 +00:00
bwang 2ac38f2f9a Add generic PinnableHeader template, CSS & JS
Bug: T317897
Change-Id: Iedc5e6f64e72a4d7762cb4f2fa834980d6757793
2022-11-01 11:12:15 -05:00
Jon Robson 31b0fd08d2 [Technical] Prepare for template rename
The user links and language button are SkinVector22 features but
they are buried inside SkinVector.

When we rename the templates this code will become problematic
as SkinVector22 requires these modifications

Bug: T319349
Change-Id: Id5e5b97af0ea020ef20565a7e1acc685d7be0892
2022-11-01 03:45:21 +00:00
Jon Robson 41ed1cc525 [Technical] Separate shouldHideLanguages from isLegacy logic
Bug: T319349
Change-Id: I640533dc7ee3b39157963024eae11dca583606cd
2022-10-31 22:53:46 +00:00
Jon Robson fbe5bdedb7 [Technical] Unset toc inside SkinVectorLegacy
Additional change:
* Remove unused isLegacy method

Bug: T319349
Change-Id: I87e9f886f308eb7574b2b8b482956dec9409d119
2022-10-28 15:43:39 +00:00
jenkins-bot 59e8ab5402 Merge "[Technical] Move isSidebarVisible and template boolean to SkinVector22" 2022-10-28 15:14:37 +00:00
jenkins-bot b6c3d3d5c6 Merge "Rename Article Tools feature flag to Page Tools" 2022-10-27 19:19:23 +00:00
Jon Robson 8ec5a51625 [Technical] Move isSidebarVisible and template boolean to SkinVector22
Additional change: Prefix with "is-" per template coding standards

Bug: T319349
Change-Id: Iadf149439d043d00a79094c4f34dfbea92abffe1
2022-10-27 18:45:47 +00:00
Jon Robson a1199a0917 Use standard utility classes for flushing icons left and right
Restricted to the feature flag (?vectorvisualenhancementnext=1)
 for now to allow us to not worry about caching.

mw-ui-icon-flush-left and mw-ui-icon-flush-right have been in core
for some time and using them means we don't have to manage hardcoded
values for these.

We'll need to think of .mixin-vector-flush-left-left
and .mixin-vector-flush-right-margin-left separately - I wonder
if these could be revised to use these 2 standard classes.

Additional changes:
- Drop unused mixin-vector-flush-right-margin-left mixin

Bug: T321504
Bug: T317583
Change-Id: I51f8e31be6771a3fb32fb07dc22d0c2872b5706d
2022-10-26 10:01:12 -07:00
jenkins-bot 598424b2e2 Merge "Replace incorrectly mw- prefixed classes Rename template and CSS files to match updated naming conventions, replaces instances of "sidebar" with "main menu"" 2022-10-25 22:32:06 +00:00
bwang 2102ac5131 Rename Article Tools feature flag to Page Tools
Change-Id: Iec8e790d0a49d7bb8bbdaa3caee7aae72eed0868
2022-10-25 16:53:43 -05:00
bwang 51457a78e7 Replace incorrectly mw- prefixed classes
Rename template and CSS files to match updated naming conventions, replaces instances of "sidebar" with "main menu"

Bug: T316570
Bug: T317437
Change-Id: Ib4050768f20b1734d356104f18aa539f657099d8
2022-10-25 10:28:31 -05:00
Jon Robson 614da1dc5e Features: Make max width a feature
Making this a feature part of the feature management system is integral
to making this a toggle and will allow us to explore making this
persistent in future.

Bug: T319447
Bug: T319449
Change-Id: I80c7b892a6891094854b4154db90917b67986102
2022-10-24 13:12:06 -07:00
jenkins-bot 2164b6ef95 Merge "Use WebRequest directly in Hooks::shouldDisableMaxWidth" 2022-10-21 23:19:21 +00:00
Umherirrender 3ad2d58ac8 Use WebRequest directly in Hooks::shouldDisableMaxWidth
To avoid array query values to be used, see warning there:
"Array values are discarded for security reasons. Use {@see getArray} or
{@see getIntArray}."

This also fix that the falsy value "0" is checked against the regex

Bug: T321267
Change-Id: I29bc4a9a7fef5a6cadc0c6aa9fa1f4a03ccf9705
2022-10-21 20:21:40 +02:00
jenkins-bot a7abe4d201 Merge "Fix Vector 22 missing user menu on private wikis" 2022-10-21 17:54:56 +00:00
jenkins-bot 099e0278b9 Merge "Add vector-tab-noicon class to tabbed menus when menu items are added by gadgets" 2022-10-21 16:04:13 +00:00
Nicholas Ray 97147857b2 Add vector-tab-noicon class to tabbed menus when menu items are added by gadgets
* Removes server rendered vector-tab-noicon class from legacy Vector as it is
not currently used.

* Adds menuTabs.js responsible for adding the vector-tab-noicon class when menu
items are added to tabbed menus. This is only used in vector-22.

* Adds unit test

Bug: T320691
Change-Id: Iffad86125f8754305f592ddc19d894866bd6dedc
2022-10-20 18:21:58 -06:00
Nicholas Ray 990392cdeb Fix Vector 22 missing user menu on private wikis
When `$wgGroupPermissions['*']['edit'] = false;` is set, an `emptyPortlet` class
is added to the user menu which prevents the menu from showing even though it
contains a login link.

Changes:

* Vector-22 now determines what classes are applied to the user menu's container
instead of core deciding that on Vector's behalf (L761 of
SkinVector::getUserMenuPortletData). This eliminates the undesirable
`emptyPortlet` class. This can potentially be removed upon completion of
T319356.

* Conditionally renders the learn more link based on whether
$userMenuData['is-empty'] is `true` so that we don't show the learn more link
when the anontalk and anoncontribs menu items aren't present.

Bug: T317789
Change-Id: I883926c36f59d446076f960ead31f82e51967e70
2022-10-20 17:12:10 -06:00
Func 9afe5a6e87 i18n: Rename some messages to follow common practice
We usually prefix the message keys with the skin/extension name,
and use label/help/tooltip as postfix when needed.
The naming of the tooltip above is limited by Linker::tooltip(),
so not able to rename it. Maybe some work is needed in the core.

Other languages' work will be follow-up by the translation bot.

Bug: T319447
Change-Id: I3c88871540b7668f1699fe3a86a8146f97ff5282
2022-10-19 20:22:02 +08:00
Func e23ec1d0fa Follow-up 76d1135: Use better practice in the code
* The new preference should be prefixed with 'vector'. This is only
  for use in vector skin

* Use registration instead of the hook to set the default user
  preference. For non-dynamic defaults, registration in skin.json
  is preferred.

* Remove the 'wp' prefix for 'hide-if' parameter of field descriptor.
  The core did try to strip the 'wp' prefix when mismatched, which is
  only for backward compatibility.
  Field name without prefix (which is the key of the field descriptor)
  should be used instead.

Bug: T319447
Change-Id: I25aa0cb23b78cf06f77fb20207dee7e1742d0ca7
2022-10-18 03:26:30 +00:00
Moh'd Khier Abualruz 76d1135810 Create user preference to turn fixed width on and off
Additional changes:
* Move static classes (skin-vector-legacy and vector-toc-not-collapsed)
to skin.json

Bug: T319447
Change-Id: I3525f8bfe27445e3af83ce5cd34b4da643178fe2
2022-10-17 20:02:39 +00:00
Roan Kattouw 5693594bd1 Remove $wgVectorSearchHost, replace with $wgVectorSearchApiUrl
This allows the URL to the other wiki's rest.php to be configured
exactly, rather than assuming that it has the same wgScriptPath as the
current wiki. This is necessary to make this feature work on PatchDemo,
where wgScriptPath looks like '/123abc456/w'.

$wgVectorSearchHost is removed, since nothing uses it except PatchDemo
(where it's broken) and development setups.

Bug: T319494
Change-Id: Ife042f4f683d366a31a642723746d4aa80774c03
2022-10-07 00:57:58 +00:00
Jon Robson 508d5fc548 phan: Suppress error on Vector master blocking commits
Change-Id: Ib864f4c901db2b589a0f71228154487f9128b0bc
2022-10-07 00:40:50 +00:00
jenkins-bot daaa5667a4 Merge "Remove $isDropdownItem param from SkinVector::getCreateAccountHTML" 2022-10-04 17:19:54 +00:00