Commit Graph

2017 Commits

Author SHA1 Message Date
jdlrobson 8d8e2d85e6 Language button is quiet with focus, active and hover states
* Add mediawiki ui button styles to Vector and convert language
button to a quiet button
* Restore the arrow for language button with ULS
* Vertically align button to first line of header
* Add a storybook entry for LanguageButton

Additional changes:
* Fix issues revealed by storybook - menu dropdown should
reset generic typography rule for `ul` tags
* Allow quotes usage in storybook without disable rule

Bug: T268241
Change-Id: I483350084fb46a51c50af6aab78c62db6d02df89
2021-03-01 20:01:45 +00:00
Translation updater bot b97ff7e827 Localisation updates from https://translatewiki.net.
Change-Id: I203577c22c2a617d033890a3ab206cb183f679a4
2021-03-01 08:57:06 +01:00
Umherirrender ee4b7fb9b5 build: Updating mediawiki/mediawiki-codesniffer to 35.0.0
Change-Id: If3ede1c45ba7cbbcd2ed91ff600d4c2396087130
2021-02-26 23:21:17 +01:00
Translation updater bot 763ba39a09 Localisation updates from https://translatewiki.net.
Change-Id: I3a039232b53274efb9f648731e09f4309bae7f19
2021-02-25 08:41:01 +01:00
Jan Drewniak d8bdba0026 Reorganize layout variables
Reorganizes the variables into sections in layout.less.

Also removes a few variables that were only used once for the calculation
of other variables (e.g. `@min-width-container-base`,
`@margin-horizontal-sidebar-button-icon-ems`) as well as
variables that were just multiplied by 2, e.g.
`@padding-horizontal-page-container-total`.

Change-Id: I4a3fc3111f7983a55b7992bee09c03a7ab4092b8
2021-02-24 22:23:07 +00:00
Translation updater bot 31a9e6feff Localisation updates from https://translatewiki.net.
Change-Id: If1426f962e1edb124851d753de8ba3063eedd419
2021-02-22 08:57:55 +01:00
Translation updater bot 159ad59806 Localisation updates from https://translatewiki.net.
Change-Id: Ib9b48576d85a71238024974a0076c4f55491ff0a
2021-02-19 08:34:47 +01:00
Translation updater bot 10364af3b2 Localisation updates from https://translatewiki.net.
Change-Id: Ic190490375dd9730946d2bd1aaf95b0f836b9985
2021-02-16 08:33:34 +01:00
Translation updater bot eb28fba3e7 Localisation updates from https://translatewiki.net.
Change-Id: Ica3fb28f0c32ce99f60156fd54ca6f94acbb4b3a
2021-02-15 10:10:20 +01:00
Nicholas Ray f549eb58d2 Replace `mediawiki.util` dependency with `mediawiki.Uri` in `skins.vector.search` module
I can't find any usages of `mw.util` in the Vector search code, but
there is a usage of `mw.Uri` in instrumentation.js.

Change-Id: I358295301403bc33be3a183392ed9e39c2378f6c
2021-02-12 11:23:59 -07:00
jdlrobson 4035d3575f Move resource loader definition to skin.json
Now `wvui` is in core, there is no need for this to be conditional.

Depends-On: I91db16946e7ea46f69a6b57b116962f77ce3cd20
Change-Id: Icceaefc63d227ca772a986ad2c6ce28cbdb0a7d6
2021-02-12 01:49:21 +00:00
jenkins-bot fdd713b244 Merge "Search results should overlay personal tools" 2021-02-12 01:36:06 +00:00
jdlrobson a4f126a76f Search results should overlay personal tools
This removes the problem with the Echo icon being visible on top
of search when the browser is resized to 500px with Echo installed.

Change-Id: I6aba17cb85979617a55e9879518eacdb916ac18b
2021-02-12 00:53:50 +00:00
jdlrobson daf6a798c4 TypeError: data.collapseCondition is not a function
Lots of logspam relating to this error. If data is {}
this error will be thrown which is possible given the
code.

This is possible if a gadget rewrites tabs

e.g.
$( '#p-views ul' ).remove().append($('<ul>'))

Change-Id: I0d3f391fccdb38758fb3cfd7e84889143d479b1e
2021-02-11 21:19:28 +00:00
jdlrobson 6f16af4212 Round up to nearest kb
The precision we are currently using leads to lots of issues with
core changes and as we grow the new vector.

I think checking in at every 1kb margin seems like a better state
of play for now.

Bug: T270883
Change-Id: Iaa4fb44a471777fdebfb906c465ea67b5bdb3903
2021-02-11 16:51:41 +00:00
jdlrobson 591fd316cf Switch back to skin version 1 for now
Per conversation with Bartosz this should have been done in an
explicit commit and probably needs better messaging.

Change-Id: I63f286d1c22dcb7d0bad956f01e8482e5111face
2021-02-11 14:20:09 +00:00
Translation updater bot febecb5db2 Localisation updates from https://translatewiki.net.
Change-Id: I8cc97b71de43e3ddde1fd726bb7908dbf04d8e89
2021-02-11 08:43:52 +01:00
Jan Drewniak e1f2d2896f Convert max-width layout to relative units
The max-width layout uses a mix of ems and px.
the var `@max-width-margin-start-content` uses ems to define a max
width breakpoint, however the workspace and content containers
`@max-width-content-container` are defined in px.

This leads to layout bugs like the sidebar ovelapping when the base
em unit is not the assumed 16px.

This patch changes the layout px units to ems.

(There should be no visible difference at the assumed 16px font size).

Bug: T270104
Change-Id: If8f284dc5e27c8e1c10f3a6897b7a5e4b8bb357d
2021-02-10 22:58:14 +01:00
jenkins-bot b4a8287589 Merge "Simplify responsive Vector implementation" 2021-02-10 14:29:21 +00:00
jdlrobson 68b989efb6 Simplify responsive Vector implementation
Vector has a wgVectorResponsive flag. This adds a ResourceLoader
module as well

I propose the configuration is repurposed to disable the min-width
on Vector and enable the viewport tag. This will allow us to use
test.wikipedia.org to test Vector at lower resolutions in future
as well as provide a suitable option for 3rd parties wanting to run
a responsive version of Vector that can be opted into using:

```
$wgVectorResponsive = true;
$wgVectorDefaultSkinVersion = '2';

```

As part of this change, the default skin version is set to 2, in
preparation for the next MediaWiki release. Note on Wikimedia wikis we
explicitly set this version so this will not impact any of our deployed
wikis.

Bug: T242772
Change-Id: I878920f49d18c5d60efd3ac45dc7912d2c62086e
2021-02-10 13:05:14 +00:00
Translation updater bot 28388de910 Localisation updates from https://translatewiki.net.
Change-Id: I0910a73a0735d78bed4122b1f61bc86b54e874dd
2021-02-10 08:40:50 +01:00
Translation updater bot e220bc9e74 Localisation updates from https://translatewiki.net.
Change-Id: Ic4ff4f00e898e60b12e6b52ee8c85be61b8592c6
2021-02-09 08:44:05 +01:00
Nicholas Ray b8f1d8c8a5 Bring back hoverability of dropdown menu (e.g. "More" tab)
Looks like I72165ba3784da3fcc9d1dd7076b3a6c96e670a2f removed the hover.
This brings it back.

Note this also makes the language button hoverable and will probably
need an additional specific selector (although the language button has
not been enabled anywhere yet)

Bug: T273143
Change-Id: Iac0539313eca5ba8d7ac165d31d2c028e803eacc
2021-02-08 23:11:43 +00:00
jdlrobson 0e0ec99c81 Language button - design fixes
* change color to #202122 (currently it's #54595d)
* padding-right for button text should be 30px (currently it's 40px)
* language icon seems to be displaying at 21x21px (should be 20x20px)
* language icon's margin-right should be 7px (currently is 14px)
* the down arrow should be 10px from the right edge of the button (currently it's 8px)
(requires core change in 661497 to apply)
* increase font-size to 16px (currently it's 13px)
* add a max-height of ~65vh (or something similar)
* add overflow: scroll
* add a border-top (since the menu is wider than the button)

Bug: T268241#6805123
Change-Id: I8891556cb82450db77b90837eeeb72ac78926e29
2021-02-08 19:03:02 +00:00
jenkins-bot 0e0d04b92b Merge "Add mw-interlanguage-selector class to language button & hide menu/arrow when appropriate" 2021-02-05 23:22:01 +00:00
Nicholas Ray e3abac06a6 Add mw-interlanguage-selector class to language button & hide menu/arrow when appropriate
* We add the `.mw-interlanguage-selector` class to the
.vector-menu-heading in the server rendered HTML. `ext.uls.interface.js`
later attaches a click handler to this selector that loads the rest of
ULS.

* We hide the dropdown arrow for js users and only show it again if
ext.uls.interface module isn't installed or is not being loaded.

* When the `ext.uls.interface` module has been loaded, we hide the checkbox
and checkbox hack menu in favor of showing the ULS popover.

Additionally:

* Adds '.vector-menu-heading' class to menu headings.

* Change h3 selector to `.vector-menu-heading`.

Bug: T273232
Change-Id: I6f4572c16ca4096dcda3aac4d585003b93dcccfa
2021-02-05 15:03:07 -07:00
Umherirrender 44cdd3290d build: Remove maxWarnings: 0 from eslint configuration
This interferes with LibUp's ability to automatically downgrade newly
failing errors to warnings and is a deviation from the settings we
typically use.

Bug: T263922
Change-Id: Ia44038a1df1052f633ce18ac6f35253e870ab0c6
2021-02-05 20:16:27 +01:00
Translation updater bot d74ab5ce5c Localisation updates from https://translatewiki.net.
Change-Id: Ia940248550ab2f7ef3a2698e3b10a5b2814f9118
2021-02-05 08:49:16 +01:00
jenkins-bot 3cb3b08ee5 Merge "Style the language button" 2021-02-05 00:06:21 +00:00
jdlrobson 98e7bce753 Style the language button
For now the core button mixins are used. In the longer
term we should aim to leverage wvui.

Bug: T268241
Change-Id: I334af039567c52462bcb4c15f07242c6de8eeace
2021-02-04 23:02:48 +00:00
jdlrobson 36eda30e0f Language button should use a new id to identify itself
This breaks existing integrations with extensions which will need
to be revisited as part of this redesign.

Change-Id: Iabf627e6926d4574f27448400d76210386ebdaa2
2021-02-04 20:27:13 +00:00
Translation updater bot d50eef9cf6 Localisation updates from https://translatewiki.net.
Change-Id: I678abaa7e2df7f484e823cebfb2c745e7af17514
2021-02-04 08:45:50 +01:00
jenkins-bot 0c330185b1 Merge "Add language icon to language button" 2021-02-04 04:03:32 +00:00
jenkins-bot 497b0aad8a Merge "The label of the language button refers to the number of languages" 2021-02-04 02:59:48 +00:00
Jan Drewniak 5014c17570 Place indicators under page title
Fixes error in 03d61e12, indicators should be placed below
page title.

Bug: T248761
Change-Id: I61dcef0567373f28fd479b21ffa940a6e223ac16
2021-02-03 23:19:30 +01:00
jdlrobson f083eb2716 Add language icon to language button
The sidebar currently uses mw-ui-icon so we continue this
practice, however we provide a general rule to ensure all icons
rendered through it default to 20x20. This didn't impact the side
bar icon as that already specifies a height of 20px.

Bug: T268241
Change-Id: I6f8e8400da048a97cbf59c3e6ad918763fc91041
2021-02-03 15:38:30 +00:00
jdlrobson ef0ab0724e The label of the language button refers to the number of languages
Instead of "In another language" the button label will be
"0 languages", "1 language" or "X languages"

Bug: T268241
Change-Id: I293a1d5f4885f76cc5f62169ee24b52c234f9229
2021-02-03 15:34:43 +00:00
jenkins-bot 4b171bf74f Merge "After portlet is included in display of menu dropdown" 2021-02-01 11:02:44 +00:00
Translation updater bot 6a6e95d404 Localisation updates from https://translatewiki.net.
Change-Id: I5f0cd5aefe32a7b6d40b6c490f1acd8819e72518
2021-02-01 08:51:54 +01:00
Translation updater bot d8dbdf101a Localisation updates from https://translatewiki.net.
Change-Id: I8a0a6aba50796b9bb75126439fa9d883d2b19ee2
2021-01-29 08:40:42 +01:00
jdlrobson 3ecc89e5c5 After portlet is included in display of menu dropdown
Bug: T273143
Change-Id: I72165ba3784da3fcc9d1dd7076b3a6c96e670a2f
2021-01-28 14:08:36 -08:00
Translation updater bot eb1d6fd492 Localisation updates from https://translatewiki.net.
Change-Id: I2be6545bb76b49c3f3c8de08ca8e1536e062aa14
2021-01-28 08:39:42 +01:00
jenkins-bot 625c4bd099 Merge "Move #mw-panel into #mw-navigation" 2021-01-27 21:26:31 +00:00
Nicholas Ray 16b34aa750 Move #mw-panel into #mw-navigation
Not only might this make more sense from an accessibility standpoint
(because sidebar is also part of navigation and there is a heading with
that name), but it should also hide the sidebar when printing as there
are core styles that hide #mw-navigation.

[1] 3b381b71e9/resources/src/mediawiki.skinning/commonPrint.css (L31)

Bug: T265217
Change-Id: I7f936defa177ba172e4253ee6450040ffa52e257
2021-01-26 19:31:43 -07:00
Nicholas Ray 1e7ed6b2e1 Make expanding search input dependent on $wgVectorWvuiSearchOptions
Per T270202#6767750 the input should expand when focused before WVUI
loads. However, the input should *only* expand when `showThumbnail` is
`true` in `$wgVectorWvuiSearchOptions` to match how its done in WVUI
where it takes into account the size of the thumbnails. When
`showThumbnail` is false, it should not expand as the input won't match
WVUI and the WVUI load transition will be jarring.

To test locally, toggle between true/false in your LocalSettings.php:

```
$wgVectorWvuiSearchOptions = [
  "showThumbnail" => false,
];
```
Bug: T270202
Change-Id: I70277c1082a504fbd5f6023e9873e8071de7e35d
2021-01-26 17:37:22 -07:00
Nicholas Ray 8c76a17e43 Move Wvui Search A/B Logic to FeatureManager
FeatureManager allows the logic to be centralized and allows clients to
ask about its state. For instance, SkinVector will make use of it in
I70277c1082a504fbd5f6023e9873e8071de7e35d.

Also:

* Adds WvuiSearchTreatmentRequirementTest to test A/B logic

WvuiSearchTreatmentRequirement/Test logic are adapted from
I878239a85ffbecb5e78d73aed5568c56dbd7d659.

Bug: T270202
Change-Id: Ia02349a7b41c7caf26fbd728e0be7d47488b97e5
2021-01-26 17:36:37 -07:00
Nicholas Ray 2789e27a29 Correct config comment
`VectorUseCoreSearch` was changed to `VectorUseWvuiSearch` in
I3a063e0b085765ea1db3c4478fb30c11b0942b75.

Change-Id: Icc9f944ea695999133293bc9e90ac0818f746191
2021-01-26 13:59:41 -07:00
Sam Smith 746315bb5b Add search widget treatment A/B test
If the VectorSearchTreatmentABTest config variable is truthy and the
user is loged in, then pick the Core treatment (defined in the
mediawiki.searchSuggest RL module) or Vector's Vue.js-based treatment of
the search widget based on their user ID. If not, then fall back to
picking the treatment based on VectorUseWvuiSearch.

Supporting changes:

* Update initSearchLoader() in skins.vector.js/searchLoader.js to check
  whether the body.skin-vector-search-vue exists

* Remove wgVectorUseWvuiSearch from the skins.vector.js RL module's config

* Update the performance-related metrics collection to check which
  module is being loaded rather that use the above

Bug: T261647
Change-Id: Idc978392f5db14f0ae2b06ade0175fe534f4ae70
2021-01-26 12:02:01 +00:00
Translation updater bot 62376398d6 Localisation updates from https://translatewiki.net.
Change-Id: I2e8370671e5ad89b32e55a4e4a66541bfa427551
2021-01-26 08:55:39 +01:00
jenkins-bot 93578b0d77 Merge "Create .mw-body-header element for body content" 2021-01-26 02:56:20 +00:00