Commit Graph

684 Commits

Author SHA1 Message Date
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
Jan Drewniak 98068d9598 Restore navigation landmarks in page toolbar
Adds landmarks to the article toolbar
- Namespace navigation
- View navigation
- More options navigation

Removes the "tools" landmark and associated
aria-label (and translation message).

Makes the #left-navigation and #right-navigation
flexbox to ensure the new <nav> elements, along with
gadgets, align on one line. Moves the styles for
these elements from screen.less to ArticleToolbar.less.

Bug: T317440
Change-Id: Iceff337b0e250c1f368dbaea6cc41a977d8ee868
2022-10-03 10:39:39 -04:00
Jon Robson 4b17edadd7 Fixes to addPortletLink hook handler
* Ensure addPortletLink hook is only run once
* Mark more menu as not supporting icons so icons are not added

Bug: T317491
Bug: T318495
Change-Id: I99450a5b0410e88cc7cdb2753b9b4256e3fe41db
2022-09-30 20:37:01 +00:00
Nicholas Ray 849e63b798 Remove $isDropdownItem param from SkinVector::getCreateAccountHTML
The SkinVector::getCreateAccountHTML method only had one caller which always
passed `true` for the $isDropdown argument. Therefore, we can remove this param
and always assume that it is a dropdown item.

Bug: T317789
Change-Id: I19ceecbac152d1399ab323ab14e07db9dc82c244
2022-09-30 14:03:02 -06:00
jenkins-bot ba7fda1a69 Merge "Update name of body class to avoid confusion" 2022-09-29 14:58:38 +00:00
bwang e7944de81c Add Article Tools feature flag
Bug: T306609
Change-Id: Ia40af4e48c006aeceebd3879ff0aaecbe1b200d4
2022-09-28 15:41:30 -05:00
Jon Robson 6b7bc78bae Update name of body class to avoid confusion
The class vector-feature-table-of-contents-disabled is confusing as
it shows on pages with table of contents. What it actually means
is the A/B test is disabled. This change gives it a more meaningful name.

Use the class name vector-feature-table-of-contents-legacy-toc-enabled
to describe it better.

Bug: T310527
Change-Id: I17e7e6f7f553b8c06b118b5419c98c78ef26ad60
2022-09-28 12:26:38 -07:00
jenkins-bot 8cd41a8c64 Merge "[Visual enhancements next] Restores the badge styling to Echo" 2022-09-28 16:07:36 +00:00
jenkins-bot 71bc90f225 Merge "Restore unconditional rendering of siteSub with styling modifications" 2022-09-28 03:38:13 +00:00
Jon Robson d8f242c046 [Visual enhancements next] Restores the badge styling to Echo
Currently clicking on icons will result in the icon changing
style. This is fixed in the follow up patch
I4a0637fc19cf07d545b75fa55e15010b74fc474f

Bug: T257143
Change-Id: Ief51ac0bcab20fc87edf747b5347a5ef9dfdf36f
2022-09-27 23:11:45 +00:00
Jon Robson 330dc5f705 Restore unconditional rendering of siteSub with styling modifications
The margin is moved to non-empty elements to avoid extra whitespace
when it is empty

Bug: T315639
Change-Id: I22aa7dbbacc5bc4ac87cffa13113ced9c9400e0b
2022-09-27 15:10:26 -07:00
jenkins-bot ecba35aeca Merge "Remove VectorLanguage A/B test code (WgVectorLanguageInHeaderTreatmentABTest)" 2022-09-26 23:01:34 +00:00
jenkins-bot 0387f14d08 Merge "Modify Vector 2022 skip-links" 2022-09-26 19:07:07 +00:00
Jan Drewniak 5a951e2159 Modify Vector 2022 skip-links
- Changes the "skip to content" link to point to "#bodyContent"
  instead of "#content".
- Adds a `aria-labelledby` attribute to #bodyContent.
- Changes the table of contents "back to top" link to
  point to "#" instead of "#top-page".
- Removes "#top" link as it appeared unused.
- Updates Jest snapshots.

Bug: T312818
Change-Id: I86443066d45c818d6f137d70ebe36798eba66f13
2022-09-26 17:34:23 +00:00
Jon Robson b452a85fe8 Remove VectorLanguage A/B test code (WgVectorLanguageInHeaderTreatmentABTest)
The removal here is actually relatively straightforward.
References inside OverridableConfigRequirementTest are kept as
the A/B test capability remains after this removal and the tests
here do not relate to the code removed, just examples of how it
can be used.

Bug: T302027
Change-Id: I2dd92adaff1221d8213723e9ee60aa02787d4cc7
2022-09-23 18:18:15 +00:00
Jan Drewniak 06c243da35 Modify the sticky header offset styles
- Prevents the ToC in the sidebar from jumping down when the sticky
  header becomes visible
- Removes the `.sticky-header-element` class from the ToC since that
  only modifies the elements position when the sticky header becomes
  visible (whereas in this case, it should be modified when the sticky
  header is enabled, before it's visible).

Bug: T314330
Change-Id: Ic6f50b8dc4f1507d875825d23eb44c24a998eaf7
2022-09-20 10:34:09 -04:00
bwang c4ec68b13c Fix border when title is hidden and when toolbar is empty
Bug: T317930
Change-Id: Iba89a2e642a8377c3603d099fb1157fc2df465d0
2022-09-19 21:37:27 +00:00
Func c6bf88520e ToC: Handle anchors with % in plaintext
TODO: Remove the fallback to {{anchor}} when all old parser cache expired.

Bug: T315222
Change-Id: I1da089cfef83131cda26859e3346cd2d840b3839
2022-09-16 11:24:27 +08:00
Jon Robson 7ebcf3ccff Limit upgrading of Echo icons to Visual enhancements feature flag
Currently we appear to be applying our icon/button enhancements to
notifications menu if the icon field is present.

These fields are not provided yet, but soon will be, so limiting
to the feature flag.

Bug: T257143
Change-Id: I2cf49a24f2db632e3ca23f749064929678bc8e19
2022-09-14 23:00:34 +00:00
jenkins-bot 8626e14ec1 Merge "Don't print table of contents on page with no table of contents" 2022-09-12 15:50:22 +00:00
Jon Robson ccc8df0ef9 Don't print table of contents on page with no table of contents
e.g. Special:BlankPage

This was causing unexpected visual regressions on Pixel

Follow up to 9c6f6709c

Bug: T313060
Change-Id: If8111f95be53e4504ed49d4ea140f62ac98e8e1b
2022-09-09 17:08:40 -07:00
jenkins-bot 9ac7a23234 Merge "Correct ContentHeader source order to match design" 2022-09-09 17:24:55 +00:00
bwang fc9fe5e719 Add vector-toc-not-collapsed class serverside
Visual changes:
* No reflow on startup

Bug: T316964
Change-Id: I17f2699fec113d92b3f0f223c357654f52eb7eb3
2022-09-08 22:43:56 +00:00
Jon Robson 97cf735de2 Icons: Watchstar and wikilove are upgraded
Can be tested by appending ?vectorvisualenhancementnext=1
to URL

Bug: T310838
Bug: T234990
Bug: T234550
Depends-On: I76d0d94c9006cc5f5680849ecdd1c382c16e34ba
Depends-On: Ib7c3021db014827b4b88cac855afc0b54a360f8c
Change-Id: Ie2ffa5c3ecf270c1bb1f315937023ae7ace5ed30
2022-09-08 19:43:35 +00:00
bwang 4c622fe8de Correct ContentHeader source order to match design
- Use flexbox instead of float

Visual changes:
- The title wraps differently when the title is very long

Bug: T313947
Change-Id: I2915e36286b21c8fd1a07247ada7754a08a0b574
2022-09-08 19:10:55 +00:00
Jon Robson c1e923f120 Icons: Enable feature flag for next set of visual enhancements
Change-Id: I10f5a2ee8fa8121f8e9a5a79c98db492fbec6534
2022-09-02 07:54:13 -07:00
Jon Robson 742f659b10 FeatureManagement: All features have an associated class on the body tag
This is a common need for features, and having these use a standardized
class name will make using them a lot easier.

Change-Id: I0e16c26878e7d4399d2bf57f236523d214951a27
2022-09-01 22:09:48 +00:00
jenkins-bot d59885cf89 Merge "Enable related tabs on Vector" 2022-09-01 20:36:15 +00:00
bwang 9c6f6709c6 Create new sticky toc container
Bug: T313060
Change-Id: Ia263c606dce5a6060b6b29fbaedc49cef3e17a5c
2022-08-31 21:27:06 +00:00
jenkins-bot 62c0b80d4f Merge "Change ULS label for sticky header when 0 Languages available." 2022-08-30 21:45:58 +00:00
Jon Robson 486748ac41 Enable related tabs on Vector
Depends-On: I861e8fe9c80569224548b8569452f8c57a446998
Bug: T313409
Change-Id: I871291c91dfe1f92c1131a2403695394ef3d0533
2022-08-30 14:20:11 -07:00
Jon Robson 9689974d0d AB test: Complain when TOC experiment setup incorrectly
Throw a runtime exception if the TOC experiment is setup correctly.
Otherwise this leads to confusion.

There must be 3 buckets, with 0 unsampled and equally weighted
control and experiment.

Bug: T313435
Change-Id: I09da238ff17b77a053b4dc132624ea19a86253b9
2022-08-30 11:59:42 -07:00
Jan Drewniak 87d0630aa2 Change ULS label for sticky header when 0 Languages available.
Modifies the `getULSLabel()` function to centralize the logic
related to the ULS language button messages.

Renames this function `getULSLabels()` since it retrieves both
the text and aria label for this input.

This logic conditionally returns the values based on whether
or not there are multiple languages available for an
title. It method is used in both sticky header and language
button near the page title.

Bug: T315556
Change-Id: I47e313414ae9c86d057e9b65ec67e522e9e7c464
2022-08-30 11:12:50 -04:00
jenkins-bot be7797e012 Merge "Follow-up: Refactor button/icon class helpers, make portlet classes consistent" 2022-08-30 02:35:50 +00:00
jenkins-bot e00e0b4122 Merge "Support additional content in table of contents" 2022-08-26 20:57:37 +00:00
bwang 8ad777b896 Fix site notice spacing
- Removes grid row gap in favor of margins
- Add container div around site notice to allow margin collapsing

Bug: T315595
Change-Id: I39959f43f20880e83bef945a7535d58cfe0b6412
2022-08-25 11:13:57 -05:00
Jdlrobson 3d719455c4 Revert "Remove grid row gap in favor of margins"
This reverts commit b63244f367.

Reason for revert: Per standup this morning we'll revert this so
that we are back to a known state, and try this again in a second
attempt.

Change-Id: Ie1349fecbab6c49ce63d328aba08162d74145cb9
2022-08-24 16:54:31 +00:00
bwang 3881820483 Follow-up: Refactor button/icon class helpers, make portlet classes consistent
- Make 'updateMenuItem' generic, rename to 'updateItemData'
- Make 'appendListItemClass' generic, rename to 'appendClassToItem'
- Remove 'appendClassToListItem' and replace with 'appendClassToItem'
- Create 'updateMenuItemData', 'updateLinkData', and 'updateDropdownMenuData' wrapper functions to be used in Hooks and SkinVector
- Add and update tests

Bug: T307901
Change-Id: I4b12a0c1aab1224d2658bad30ee629f7266c5b7e
2022-08-23 19:18:03 +00:00
bwang b63244f367 Remove grid row gap in favor of margins
Bug: T315595
Change-Id: Ibf837775d972deb29e9619cc6c12c919aae5155a
2022-08-22 15:49:00 -05:00
Jon Robson 4d96034efe Support additional content in table of contents
Bug: T307823
Change-Id: I034a579b7ef51950726c9ac056d6c940a7d7d472
2022-08-18 23:04:47 +00:00
bwang 5f09892813 Remove gradient from modern Vector, align SidebarAction with portlet styles and classes
Bug: T307771
Change-Id: I92fd11b89d4afbf99dd7ab51990835b9754767a1
2022-08-17 20:41:15 +00:00
jenkins-bot ae44bfa327 Merge "Fix collapsed TOC menu positioning with site notice without JS or major CSS changes" 2022-08-16 19:07:44 +00:00
bwang 160ef15f30 Fix collapsed TOC menu positioning with site notice without JS or major CSS changes
Bug: T310388
Change-Id: Ifa29dd032534a1c6ea6fcea194b0c65103a2cd52
2022-08-16 10:38:30 -05:00
jenkins-bot 8c3a4792e9 Merge "[ToC] Show new/modified sections after publishing an edit (new floating ToC)" 2022-08-16 08:37:30 +00:00
Moh'd Khier Abualruz 407046c759 [ToC] Show new/modified sections after publishing an edit (new floating ToC)
- All Frontend
- All in Skin

Bug: T307251
Change-Id: Icae2f03f0005b7607448127b793ff3c0010e5817
2022-08-15 20:02:49 +00:00
bwang 8eff2d0501 Follow up: Remove .vector-layout-grid, .mw-workspace-container classes
Bug: T313559
Change-Id: If93860d13fb3161c0b66f7ea9e3e1831b0a2fc1e
2022-08-15 10:10:01 -05:00
bwang 006ea3517b Add collapsed TOC to sticky header by moving the TOC
Visual changes:
- TOC icon in sticky header
- Small update to the narrow screens collapsed TOC spacing when open

Bug: T311103
Depends-on: Ic94fda79bd14856ccda14985d5860aa54d3118d0
Change-Id: I977092f951ba2843816609e706bce4b99583f623
2022-08-11 11:25:21 +00:00
jenkins-bot 310bf970bd Merge "Remove .mw-ui-button styles from user-links overflow menu" 2022-08-10 07:39:39 +00:00