Commit Graph

493 Commits

Author SHA1 Message Date
Roan Kattouw 5dee570cb2 search: Prepare for Vue 3 migration
Port the initialization code for the Vue search to use Vue.createMwApp()
instead of new Vue( ... ). The former mimicks Vue 3's API for mounting
components.

Without this change, this code breaks in Vue 3 (even in compatibility
mode) because the compat support for new Vue(...) is imperfect. By the
time renderFn is called, the searchForm container has already been
emptied by Vue's internal mounting code.

Instead, inspect searchForm and generate the prop list before mounting,
then pass the props to createMwApp() and mount the component.

Bug: T294476
Depends-On: I1fcdcf7bf87f5af2deb9763a231f2c360ea45b23
Change-Id: I5b6e66051d97e75f8f03b8258894daba22525797
2021-11-05 15:53:34 -07:00
jenkins-bot 04ff34bd0c Merge "Initialize the skins.vector.es6 module before the skins.vector.js module" 2021-11-04 18:11:29 +00:00
Nicholas Ray c741759cab Initialize the skins.vector.es6 module before the skins.vector.js module
stickyHeader.js, a file in the "skins.vector.es6" module, clones the
user menu. Because of this, it must initialize before dropdownMenu.js, a
file in the "skins.vector.js" module, in order for dropdownMenu.js to
bind the correct checkboxHack event listeners to the user menu in the
sticky header.

Therefore, change the es6 module to export its main method. The
skins.vector.js module can then use mw.loader.using to ensure the
skins.vector.es6 module initialization happens first in browsers that
support es6. Browsers that don't support es6 will continue to initialize
the skins.vector.js module.

Bug: T291096
Change-Id: I1bb6f2da9703ed2679eacfdb42b9818efe614ab9
2021-11-03 11:03:18 -06:00
Nicholas Ray 7f58c88934 Add comment to dropdownMenus.js regarding the CHECKBOX_HACK_BUTTON_SELECTOR
Per request [1], a clarifying comment was added explaining that our
checkbox hack implementation has drifted from the core's recommendation.

[1] https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/732732/2/resources/skins.vector.js/dropdownMenus.js#7

Bug: T291096
Change-Id: I3a5bc9d463bace11185affbb21320d86fc1c5d99
2021-11-02 17:58:52 -06:00
jdlrobson 768a07ec6c Add sticky header edit feature flag
Can be disabled via &vectorstickyheaderedit=0 or configuration
change.

This will allow us to fine tune the edit features without blocking
deploying the existing feature.

Bug: T294383
Change-Id: Ic282ea4f2ff0108eeaa154c8a77e4e5fd30daeae
2021-10-26 21:59:29 +00:00
jenkins-bot 34d77d5e41 Merge "Sticky header edit icons trigger via JavaScript" 2021-10-26 17:32:50 +00:00
Clare Ming 741d59df06 Fix title getting cut off in sticky header.
- Add padding to title class selector.

Bug: T289814
Change-Id: Iab167414d10ce256be8e966f115ae164c1bd3331
2021-10-25 20:51:43 -06:00
jdlrobson 0663087dd5 Sticky header edit icons trigger via JavaScript
Current expected behaviour: the editor experience will
load and the user will be thrown to the top of the page.

Bug: T293158
Change-Id: I3585616c2244a6b91ef5f160beb1cf51af3599aa
2021-10-25 22:35:13 +00:00
Fomafix 574bbfd549 Combine return paths in getLanguagesCached
Also use single quotes instead of double quotes and fix typos.

Change-Id: Ibfd855f55f38ea824d38ad858b654d8229838cd1
2021-10-23 12:55:37 +00:00
jdlrobson ca0401789d ES6-ify sticky header code
- Can now use const/let
- No need for feature detection for things like fetch and closest
as we can assume they exist if ES6 support is available

Change-Id: I85b01add13fd74e1514119498815403e42a09af0
2021-10-21 23:44:30 +00:00
jdlrobson b8122cc40b Separate code from ES6 browsers from ES5 code
This will allow us to write ES6 code for the new features which
is limited to those browsers.

For browsers that do not support ES6, the code will not execute
because of the "es6" flag. Doing this will help us avoid issues
like T293402

Change-Id: Iffb7098cb22395e33b87352fb4f08516f6f25e6f
2021-10-21 15:55:04 -07:00
jenkins-bot 62347f0a74 Merge "Make dropdown menus toggle with enter key" 2021-10-21 20:22:41 +00:00
Nicholas Ray 876d3ddf39 Make dropdown menus toggle with enter key
Bug: T291096
Change-Id: Ia5d1a33aa04dab09f1454ade4816fdb9d48f1eca
2021-10-21 09:59:58 -06:00
jdlrobson c16fa80006 Sticky header: Add user page link to user menu in sticky header
Bug: T292557
Change-Id: Ia72c214ef6384dfeae21556aa4007eb6075f0057
2021-10-21 15:15:51 +00:00
jdlrobson ae28c427d6 Vector should be notified by addPortletLink to collapsible where needed
Bug: T139830
Change-Id: Ibf17a3df7f9409a02f1a316d5da16b32fabcc5a2
2021-10-19 23:24:28 +00:00
jdlrobson 358d81ddce [a11y] Add title attributes to logout, talk and history and DRY up code.
* Addresses feedback in:
** T289816#7440605
** T283505#7440585
Change-Id: I98abdab8c3eb20567af527e6a8bf75faa5670d6b
2021-10-19 08:47:00 -07:00
bwang a1b523a9d5 Avoid calling forEach on searchbox NodeList for older browsers
Bug: T293402
Change-Id: Ic2d10ca9c664c284fc9b5433b5ff1cc32d98c960
2021-10-18 17:56:05 +00:00
jenkins-bot 041496585b Merge "Revert "Use searchFooterText slot in typeahead search component"" 2021-10-13 15:01:39 +00:00
Bernard Wang 7575cf97a5 Revert "Use searchFooterText slot in typeahead search component"
This reverts commit b7728ddda5.

Reason for revert: Depends on WVUI release

Change-Id: If97551a8609433b569fbc88800a7bf9ffc137587
2021-10-13 14:34:08 +00:00
jenkins-bot 529ccd1a86 Merge "Use searchFooterText slot in typeahead search component" 2021-10-12 21:34:45 +00:00
bwang b7728ddda5 Use searchFooterText slot in typeahead search component
- Create new 'vector-searchsuggest-containing' translation for WVUI search footer text
- Use 'search-footer-text' slot in WVUI typeahead search
- Remove instances of old 'footerSearchText' prop

Bug: T290392
Depends-on: Ic92721d5aaf6b833c882a26e9a60b42ab91546fa
Change-Id: I34a184cc8f10172a7ebf67981731c3694d008446
2021-10-06 11:37:26 -05:00
jenkins-bot 06475e55e7 Merge "Remove @min-width-logo, @margin-top-sidebar variables from screen.less" 2021-10-05 23:59:41 +00:00
jenkins-bot 29b35c25ac Merge "Add edit icons to sticky header" 2021-10-05 23:49:35 +00:00
Clare Ming 67e7eab714 Add edit icons to sticky header
- Add edit icons.
- Update data passed to sticky header, button templates.
- Show/hide edit icons client-side based on ids in fixed header.
- Disable sticky header when in Visual Editor mode.
- Use Visual Editor hooks to toggle IntersectionObserver.
- Remove extraneous js for setting offsets for other sticky elements (simplify by moving known sticky element th to css - follow up to https://gerrit.wikimedia.org/r/c/mediawiki/skins/Vector/+/722475/comment/7b8ab2db_cd5c7e78/).

Bug: T289723
Change-Id: Ifbab2f1c4d716f8fc261e3d7fa35fc71c6065ec5
2021-10-05 23:31:19 +00:00
Nicholas Ray 87b565a5f0 Remove @min-width-logo, @margin-top-sidebar variables from screen.less
AFAICT these variables are unused.

Change-Id: I675de18cf4b2bb0b7aa913d4ad5801ca0e7eb155
2021-10-05 16:53:52 -06:00
jenkins-bot a2a6aabb6c Merge "Address cache related FIXMEs" 2021-10-05 22:20:12 +00:00
jdlrobson 95e3271e79 Address cache related FIXMEs
Follows up the sticky header search refactors
in caed16e

Change-Id: I5832bc04f0c675ff8bc1a00fff17b6b9f8399e6e
2021-10-05 21:53:09 +00:00
jenkins-bot ba00180eed Merge "Logo scales with font-size" 2021-10-05 19:21:04 +00:00
bwang 8758f87c4b Replace getVectorMenu function with jQuery equivalent
Bug: T292319
Change-Id: I9c9a179b3bcce9eccdf7037818823568f77f2b35
2021-10-04 17:55:49 +00:00
jenkins-bot 17ccb9ab3a Merge "Accommodate other sticky elements with sticky header" 2021-09-30 23:17:26 +00:00
Clare Ming e30c3408cf Accommodate other sticky elements with sticky header
- Update sticky header js to apply top offsets.

Bug: T289817
Change-Id: Id0e7bf7b018fbbfb2a9c1932314bf67f245b465d
2021-09-30 16:35:55 -06:00
bwang 405b52054f Update sticky header to be hidden to screen readers and not tabbable
- Adds aria-hidden="true" to the sticky header
- Adds tabindex="-1" support to Button.mustache and update sticky header button data
- Add tabindex to cloned user menu

Bug: T290201
Change-Id: I270db0485f08af310fb40365703da1efc07d3cb9
2021-09-30 09:47:57 -05:00
jenkins-bot 8419d063cc Merge "Restore original more menu padding in legacy Vector" 2021-09-29 22:20:59 +00:00
jdlrobson 4e8a3186a6 Restore original more menu padding in legacy Vector
One of the goals with desktop improvements is to not make any
visible changes to the original Vector skin.

In T289163 we wrapped links in a span, and moved the font-size
declaration to the span. The padding of the link is now applying
with font-size 16px.

Bug: T289163
Change-Id: Ifbf6f7a4c5cb6fda6389b33fc9962bdb03dd1f43
2021-09-29 21:33:38 +00:00
Nicholas Ray 1209b388e9 Add scroll padding to the root element when the sticky header is enabled
When the sticky header is visible, it has a global impact on the
scrolling UX. For example, it can undesirably overlap elements when the
user clicks on a jump link and when the user tabs through elements in
reverse order. Therefore, we need to add scroll padding to the root
element when the sticky header is enabled (when the feature flag is on
and at higher resolutions)

Known limitations:

* Scroll padding is supported by all the latest modern browsers except
for Safari [1]. This was considered an acceptable tradeoff with the
caveat that this decision may be revisited in the future as we learn
more about user interaction with the sticky header.

[1] https://caniuse.com/mdn-css_properties_scroll-padding-top

Bug: T290518
Change-Id: Ie5eb01d7eafd18ce740be620dfb5c8849386af6e
2021-09-29 14:25:26 -06:00
jdlrobson e12fe1dbb0 Logo scales with font-size
Bug: T291895
Depends-On: Ie86a5b59fbf93a400796a4cac3724207830092b5
Change-Id: I194a11316e8ac68319f41c6a79b2c9cd081a4b66
2021-09-28 21:44:53 +00:00
jenkins-bot 20135a348e Merge "Wire up sticky header search feature" 2021-09-27 22:58:34 +00:00
jdlrobson 125ea5dea9 Wire up sticky header search feature
Bug: T289724
Change-Id: I784ea5eb12b6f43d19769ff48a14d3fd4627853c
2021-09-27 14:47:58 -07:00
jenkins-bot f9405739ed Merge "Vector menu items are wrapped in spans + improve Vector addPortletLink support" 2021-09-27 19:38:36 +00:00
jdlrobson a6c0b21044 Vector menu items are wrapped in spans + improve Vector addPortletLink support
* In legacy Vector, menu items are now wrapped with spans. This
  consistency in HTML is required for splitting Vector into two
  different skins.
* Vector's portlet link items now support icons

Bug: T289163
Bug: T291722
Change-Id: I4464888983ac8b8b5f971e0c679dbeda09a61be5
2021-09-25 05:01:55 +00:00
jenkins-bot 84023ff39c Merge "Allow multiple search components on the same page" 2021-09-24 17:04:14 +00:00
jdlrobson caed16e26f Allow multiple search components on the same page
Styling should not depend on IDs to allow us to have multiple
searches in the page.

Precursor for wiring up search in the sticky header.

This also tweaks performance metrics to track separate metrics
for the sticky header search

Change-Id: I5b4192a8f5a9f95af26c1faf904f7cc994323518
2021-09-23 23:23:58 +00:00
bwang a1f9122eed Prevent gadgets from adding to the sticky header user menu via addPortletLink
Bug: T291426
Change-Id: Ibe8837111011179245745c7b645f046efdbc6ee5
2021-09-23 12:17:55 -05:00
bwang 809a972676 Fix sticky header language button
- Fixes blank sticky header language button when no languages are present
- Adds arrow to sticky header language button

Bug: T289815
Change-Id: I36dc5fb0aad9c3ca1fced0d46e5167e8707f6731
2021-09-21 19:59:16 +00:00
jenkins-bot 5eea8cff03 Merge "Restore legacy new (red) link in legacy Vector to `#ba0000` & `#a55858` for visited" 2021-09-20 15:58:43 +00:00
jdlrobson 5919a26949 Restore legacy new (red) link in legacy Vector to `#ba0000` & `#a55858` for visited
Given we don't want to change the color in modern Vector we must rely on this
ugly hack to change the link color.

This can be revisited when Vector has been split into two skins
which can use 'mediawiki.skin.variables.less'.

Bug: T288739
Change-Id: I17401f897dce4e6adca9d05008899d28ff02517c
2021-09-20 13:13:48 +00:00
jenkins-bot 2f02c28258 Merge "Restrict sticky header to specified namespaces" 2021-09-17 19:27:25 +00:00
jenkins-bot fe953ae505 Merge "Fix aria-expanded status for user menu" 2021-09-17 19:27:22 +00:00
Clare Ming bdad84a7c9 Restrict sticky header to specified namespaces
- Hardcode allowable namespaces, actions for now in relevant js.

Bug: T290347
Change-Id: If482505be5de4b3e5bf130530f27f0d917ecaaa0
2021-09-17 19:07:04 +00:00
bwang d9a002574c Fix navigation menu h2 from showing in legacy Vector
Restores code removed in 50d866dc

Bug: T291264
Change-Id: Ibcdcd0a2dc31a0cdcfa570901765207dc729af6e
2021-09-17 15:03:21 +00:00
bwang b295ccc931 Fix aria-expanded status for user menu
The user menu dropdown was announcing to screenreaders as "Personal tools expanded collapsed". This is due to the core icon classes causing the spans to be display: block. This patch adds !important to the relevant display styles to ensure the statuses are always read out correctly

Bug: T253650
Change-Id: I0b51af5da98af1bd0c0029db54420e395242842d
2021-09-16 13:48:26 -05:00
jenkins-bot 3c894154df Merge "Improve heading structure and heading semantics by removing redundant headings and labels for modern Vector" 2021-09-15 16:43:41 +00:00
Nicholas Ray 93745e4800 Add search to sticky header
Per T289724#7342741, server renders an anchor tag pointing to #p-search
into the "button-start" bucket of the sticky header.

In the future after T289718, this anchor will then acts as a button when
the search module is loaded and searchToggle executes.

* skins.vector.search was modified to accomodate instantiating multiple
search components (one in the main header and one in the sticky
header).

* searchToggle.js was modified to accept a searchToggle element as a
param which the caller can then instantiate when ideal. For the sticky
header toggle, this needs to happen *after* the search module loads.
Before then, the toggle will act as a link.

* Drops one jQuery usage from searchToggle so that it can be jQuery
free. Because the native .closest method is used, IE11 support is also
dropped. However, the script feature detects and returns early if the
API isn't available.

* Makes App.vue accept an `id` prop so that multiple instances of it can
be created.

Bug: T289724
Change-Id: I1c5e6eee75918a0d06562d07c31fdcbd5a4ed6d5
2021-09-14 16:58:07 -07:00
jdlrobson f271c86238 [refactor] DRY up attribute suffixing
This makes the code more readable and allows us to apply
the suffixing in other places in the sticky header.

Change-Id: I44008c18a3faea2089bc93eb5ce7fea1cad1aaec
2021-09-14 23:34:48 +00:00
jdlrobson 21a21f7e93 [refactor] reduce usages of typescript type declarations
While needed for cloned elements, others can be avoided by
using more general Element class

Change-Id: Iaee121a9f746e9729b5ecbdec80915bf05c11655
2021-09-14 23:34:36 +00:00
jenkins-bot 8f2a5c58f2 Merge "Add history and talk page icons to sticky header" 2021-09-14 23:26:06 +00:00
jenkins-bot 056ec56208 Merge "Clean up for adding title to sticky header" 2021-09-14 22:22:01 +00:00
jenkins-bot bd1dab6bb8 Merge "[Storybook] Add Header component" 2021-09-14 21:45:53 +00:00
Clare Ming 5ec728ec60 Clean up for adding title to sticky header
- Update styles for fade out.
- Remove unused styles.

Bug: T289814
Change-Id: I0bdbaf1a1f0306d47df83f61811b0c85056415e0
2021-09-14 15:10:46 -06:00
jdlrobson 52204c0f1a Add history and talk page icons to sticky header
Bug: T290597
Change-Id: Ib590399df09a9da8e181b331d4227b0de30b9a8e
2021-09-14 12:34:47 -07:00
jenkins-bot b7ef3d9a0e Merge "Add page title to sticky header" 2021-09-14 19:31:33 +00:00
jenkins-bot 53d1508f62 Merge "Add user menu to sticky header" 2021-09-14 19:23:13 +00:00
Clare Ming 3362e62ef2 Add page title to sticky header
- Fade out after 500px.

Bug: T289814
Bug: T290596
Change-Id: Ice3054f417707261d7c06769cb92aa170cfadba1
2021-09-14 19:12:29 +00:00
Clare Ming 755f10cd0b Add user menu to sticky header
- Remove unused button, data from sticky header.
- Simplify template to leave sticky user menu placeholder.
- Update js to clone user menu with new ids.
- Include gadget-injected items in sticky user menu.

Bug: T289816
Change-Id: I23fde537efc2a66a2df22cd2633fbab034b73eb6
2021-09-14 12:57:08 -06:00
jdlrobson ad5c127239 [Storybook] Add Header component
* Moves screen variables relating to Header to Header
* Adds a Header storybook entry
* Moves data-logo from Logo template to Header.mustache
* Updates UserLinks to use USER_LINK_PARTIALS
* Renames confusing SearchBox story names
* Updates package.json to use a static folder.
* Use mediawiki.org for sourcing mw-ui-button and mw-ui-icon styles
since deploys there come earlier
* Removes usages of ID selectors

Change-Id: I0e158fa7e62c56a50cfff497d75f0808effd1eed
2021-09-14 18:33:10 +00:00
bwang 687c6a50d8 Improve heading structure and heading semantics by removing redundant headings and labels for modern Vector
- Apply aria-hidden to h3 in Menu template, ensuring the nav landmarks are still properly labeled, but no longer reading duplicate labels to screenreaders
- Remove "Navigation menu" h2 element, which is not needed as the nav landmarks are already labeled
- Remove searchbox h3 element, which is redundant with the search landmark
- Scope all changes to modern vector

Bug: T265993
Change-Id: I4e5da7a0699160fa57234bd126b75243e0157778
2021-09-14 10:47:05 -05:00
Nicholas Ray 326e11dfbf Scope styles that should only apply to the main header to Header.less
We have many styles related to the layout and visibility of search that
are only useful in the context of the main header. Since many of these
elements have classes that will also be in the sticky header, we should
scope these rules to the main header so that we avoid an uphill battle
of styles trying to override eachother.

Additional changes:

* We previously had a mix of #p-search and .vector-search-box selectors
for the same element in the CSS. Header.less now only uses
.vector-searchbox to avoid specificity wars.

* Removed nearly all of the #p-search rules previously found on L147 -
L167 in screen.less after observing nothing relatively bad happening
when they were removed.

Bug: T289724
Change-Id: I2e6c269e29717cd20d8acfaddc3631ea1b8fedfa
2021-09-14 15:34:05 +00:00
jenkins-bot 6a0607afdf Merge "Inherit link colors from core variables and override @color-link-new" 2021-09-13 18:23:06 +00:00
jdlrobson 0238078aaf Inherit link colors from core variables and override @color-link-new
Vector should use the variables defined in core for red links

Bug: T288739
Depends-On: I799b46664f01c5631fb9d1ae4f5c43caeeaac818
Change-Id: Idcf5a54d76a1343d3407821b8a5b8d8ece8af9d0
2021-09-13 17:56:26 +00:00
jenkins-bot 82832b137a Merge "Remove disable dropdown behavior" 2021-09-13 07:05:25 +00:00
Clare Ming e639c9287d Make sticky header functional/visible
- Show sticky header after bottom of first h1.
- Hide sticky header before bottom of first h1.
- Add media query for reduce motion preference.

Bug: T290101
Change-Id: I2b1ecd31ac360a1ef5bf2f016978d6e0665a316c
2021-09-07 16:10:21 -06:00
jenkins-bot 9e9f3ec0cd Merge "[refactor] Remove common UserLinks code" 2021-09-07 16:31:18 +00:00
jdlrobson ff8e29d240 [refactor] Remove common UserLinks code
There is no common UserLinks code. These styles serve
legacy only.

Bug: T288852
Change-Id: Ied191bc1bc5dbd48491fa285b5def265c7d5262d
2021-09-07 15:37:13 +00:00
jenkins-bot 9ffb6cb044 Merge "Restrict sticky heaader visibility" 2021-09-03 21:05:17 +00:00
Clare Ming af317dbc58 Restrict sticky heaader visibility
- Hide if javascript disabled.
- Hide at lower resolutions.

Bug: T289714
Change-Id: I0c669c7fc46fda7bf5055d20cc1cd54d472a9330
2021-09-03 14:19:24 -06:00
jenkins-bot fed987d079 Merge "Simplify how we generate icons and button classes in Vector" 2021-09-03 19:54:03 +00:00
jdlrobson b88f2970f7 Simplify how we generate icons and button classes in Vector
- Separate icon classes from button classes in user links/language
- Upgrades the personal tools language button preference to
a mw-ui-button with icon
- Adds a generic selector for dropdown menus without an icon
- Cleans up user links CSS now mw-list-item class is available
- Removes icon hack CSS

Bug: T289630
Bug: T283757
Change-Id: Ib518858e06549f252d73d57fd4768f446cc561b9
2021-09-03 19:25:31 +00:00
jdlrobson 520dfd2260 Do not hard code Special:Search
Bug: T287540
Change-Id: I234acbaa2cce8f43653507b4298090c50451699d
2021-09-02 20:20:56 +00:00
Clare Ming 21c45837ef Spoof aria-expanded for dropdown menus using checkbox hack
- Mimic expanded/collapsed state of menu without JS.
- Update template, styles, i18n to make accessibility of dropdowns accurate.

Bug: T253650
Change-Id: I58ecebf520d6107554dbb81470dee69a5d4a7f1d
2021-09-01 16:12:26 -06:00
jenkins-bot 94d135ecfa Merge "Build the sticky header skeleton" 2021-09-01 20:35:21 +00:00
jdlrobson 8657171471 Build the sticky header skeleton
The sticky header is currently disabled unconditionally
and nothing is wired up, with placeholders for data and
functionality which will be added in future.

Bug: T289716
Change-Id: I16223ce849267e718aad22b8a24b2327332ac8b7
2021-09-01 12:32:31 -07:00
Nicholas Ray 5ca9d00d55 Set responsive max-width on username in header
Per T287522#7295558, the username should have a computed max-width of
200px above 1200px and a max-width of 155px below 1200px.

Additional changes:

* Use flex-wrap: nowrap on header instead of wrap. I think the former
may have been an unintended consequence of the consolidated links
feature flag clean up.

* Use core's text-overflow mixin for both the username and the usermenu
items

* Change the user menu's max-width to use relative units

Bug: T287522
Change-Id: I536e6371f85ccde75673af46c7667eb447eff081
2021-08-31 17:06:35 -06:00
jdlrobson c8dd4e9ed1 Remove disable dropdown behavior
Now that we bind the ULS dialog to the checkbox element,
(see c08ae11) the default behaviour of the checkbos is prevented,
so it is impossible for the dropdown to ever
be shown when ULS is enabled and clicked so this code no longer
serves any purpose.

Depends-On: I97a69c30b27cb1ded06451389e086229561c3589
Change-Id: Ic9d03dea12ee8bb2d7430eccd70e4343e3805d36
2021-08-31 20:53:41 +00:00
jenkins-bot 3ff5e1b6a4 Merge "Update ULS button states to be consistent with other quiet buttons" 2021-08-31 19:44:15 +00:00
bwang c08ae1152e Update ULS button states to be consistent with other quiet buttons
- JS-enabled ULS button gets a focus state by moving the ULS click handler to the Menu checkbox instead of the h3, and unhiding the checkbox
- JS-enabled ULS button no longer gets a darker background when the menu is open (ULS default style)
- JS-enabled and no-js ULS buttons both rely on mw-ui-button and mw-ui-quiet classes for focus/hover/active states
- Old styles and skinStyles are removed

Bug: T283757
Change-Id: I66073d6128a27afbd80a7adcff03cc7fcefa9556
2021-08-31 10:59:59 -05:00
Nicholas Ray a35b21d2cf Correct positioning of search icon before WVUI loads
WVUI sets the icon as `left: -11px` [1]. Vector should do the same to
ensure the icon doesn't move when WVUI loads. Also set top and bottom
properties to zero so that the height of the icon's container is the
same as in WVUI (32 px).

[1] https://phabricator.wikimedia.org/F34622194

Change-Id: I73fa55f9013dc1bdd51581d357109d4817638d91
2021-08-30 16:59:12 -06:00
jenkins-bot fef51f9023 Merge "Improve readability of anon user menu for screenreaders" 2021-08-27 20:36:16 +00:00
bwang d15005408f Improve readability of anon user menu for screenreaders
Bug: T288293
Change-Id: I10ca58aa492447f179c0ce12eabc0cd1ce4e9d9b
2021-08-26 12:58:10 -05:00
Clare Ming 1efe0a4203 Remove user links feature flag
Update/remove config, constants, hooks, templates, styles, logic, tests, stories to check legacy vs modern Vector where applicable instead of the decommissioned user links feature flag.

Bug: T288852
Change-Id: I5c5831091a10711838a8a2877c782df4996d4596
2021-08-26 10:07:15 -06:00
Clare Ming 129bf5c350 Update vector menu hide dropdown class to use BEMish convention.
- Keep double-dash class name for cached HTML.
- Update instances of renamed class in less + js.

Bug: T253671
Change-Id: Ieb1ce630e8fa84167e2ca8497f66a20183fdaf90
2021-08-24 15:33:41 +00:00
jenkins-bot 040cbb7dc4 Merge "Use the search title if configured" 2021-08-13 18:11:07 +00:00
jenkins-bot 1c93c90902 Merge "Use centralized MediaWiki typescript definition" 2021-08-13 17:23:44 +00:00
bwang 21c273af1f Override user menu line height
Bug: T288540
Change-Id: I30810de5ba36e082a4e8a1f6f93f34c99344dae8
2021-08-12 19:56:05 +00:00
jdlrobson 5a0214afc9 Copy class across to new language link item
If the Vector code runs before the Wikibase code,
the Wikibase code will not work as the CSS selector
will no longer match.

Bug: T287206
Change-Id: I8555b60f2463ad19efadd57bccbb91ae4e2cc528
2021-08-10 13:17:30 -07:00
jenkins-bot aec29ebc2d Merge "Update UserLinks and SearchBox storybook stories to match prod" 2021-08-06 22:49:34 +00:00
bwang 7aeda662a5 Ensure emptyPortlet class cannot hide user links menu
Bug: T28819
Change-Id: Ia477439f28d5a3ac98cfc28385f179ca72946c26
2021-08-05 13:38:17 -05:00
jdlrobson aebb3fb522 Use the search title if configured
Allow commons to use Special:MediaSearch

Depends-On: 	I37b9d3a2b263f496a283f4bfdc769b7dc880ab06
Bug: T287540
Change-Id: I2a2463d704ef5b2264574cdf186836ba00a639f5
2021-08-05 15:45:41 +00:00
bwang d1f1f32418 Update UserLinks and SearchBox storybook stories to match prod
- Update UserLinks data to wrap link content with spans and other markup changes
- Use UserLinks__login.mustache and UserLinks__logout.mustache for rendering UserLink stories
- Add new SearchBox story to account for search collapse behavior in modern Vector

Change-Id: Ib0abce31db60a0c5c88dea17085e2974ac5112b5
2021-08-05 10:08:31 -05:00
jenkins-bot 78223873e3 Merge "Add sticky header feature flag, query param, and class" 2021-08-04 20:02:09 +00:00
bwang 46d98c90f4 Add sticky header feature flag, query param, and class
Bug: T284463
Change-Id: I520832fa1e0a66bb24479e47c8e8f8011e514299
2021-08-04 18:49:56 +00:00