Commit graph

2102 commits

Author SHA1 Message Date
Nicholas Ray 8eba1da250 Silence eslint compat/compat for search performance instrumentation
Eslint is throwing compat warnings on every commit in Vector. This
commit silences those warnings.

Change-Id: I0e914c6179745415e916fadd382d86baa72e3e63
2021-05-05 14:37:35 -06:00
jenkins-bot bea00bc290 Merge "Create A/B test harness for Language in header feature" 2021-05-05 17:33:38 +00:00
jenkins-bot 888e17bd47 Merge "Place language button near bottom of Main page." 2021-05-05 17:08:18 +00:00
Jan Drewniak 80d734b4d2 Place language button near bottom of Main page.
In modern Vector, the language button that is placed inside
the page header should appear near the footer, if the page is a
Main page.

This changes some CSS selectors to not depend on the language
button having the `.mw-body-header` parent element.

Bug: T276140
Change-Id: I97bf0c11d0321752d472ac4988618a1db92b7271
2021-05-05 13:42:19 +02:00
Nicholas Ray 49f2b25737 Create A/B test harness for Language in header feature
* Adds ab test config to enable/disable the ab test. Defaults to `false`
(ab test disabled).

* Adds a `languageinheader` query param which only takes effect when the
ab test is enabled. The query param is cast to a bool and determines
which treatment is shown. For example, set query param to
`languageinheader=1` to see the new treatment. Set query param to
`languageinheader=0` to see the old treatment. To bucket based on the
user's id or global user's id, don't set the query param.

* Moves the language in header config work that was previously in
ServiceWiring into a `LanguageInHeaderTreatmentRequirement` class so
that unit tests can be done on most of the logic that determines whether
the language in header will show.

* Adds logic to bucket user based on [global] user id.

Bug: T280825
Change-Id: Id538fe6e09002fae6c371109769f3b7d61e7ac6d
2021-05-04 14:41:53 -06:00
libraryupgrader 932c8d541e build: Updating composer dependencies
* mediawiki/mediawiki-codesniffer: 35.0.0 → 36.0.0
* php-parallel-lint/php-parallel-lint: 1.2.0 → 1.3.0

Change-Id: Ib71722afb42c300ec3d6a3cd3bfab7eddde18bdf
2021-05-04 12:41:27 +00:00
Translation updater bot 1703243a76 Localisation updates from https://translatewiki.net.
Change-Id: Ic99976f71b7ff3accc3615a51fee52f4503f6578
2021-05-03 08:41:02 +02:00
jenkins-bot c6f92d6ae8 Merge "templates: Remove role deprecation HTML comments" 2021-05-01 15:20:28 +00:00
James D. Forrester 70e61dbd8a build: Switch node version to 10.24.0 now CI is on buster
Change-Id: I544f4266966b6ffbd2b43eae54570d452c9db237
2021-04-30 11:46:37 -07:00
Sam Smith 5998d82056 templates: Remove role deprecation HTML comments
Sending these comments to all users incurs small performance penalty on
both sides. Further, the intended audience for the comments is
vanishingly small when compared to all users and we have more direct
avenues to contact that audience, i.e. the Technical Village Pump.

Remove the HTML comments related to the deprecation of the
role="navigation|main" attributes on the navigation and main elements.

Bug: T281025
Change-Id: I4735c435fc31c5ba4fbf99e9d9bf12adc466b02f
2021-04-30 15:44:52 +01:00
Roan Kattouw 402b01e0ca search: Prevent double-escaping of messages passed to typeahead-search
The parameters passed to the typeahead-search Vue component don't need
to be escaped, they're already escaped by the Vue implementation. Use
.text() instead of .escaped() for the i18n messages passed to this
component, to prevent them from being escaped twice.

Change-Id: I5dcf442f6af181a99123bf7426743af01b097729
2021-04-29 11:34:48 -07:00
Translation updater bot 897769a04d Localisation updates from https://translatewiki.net.
Change-Id: I94c3a5b2baf2ea6fbd6bae09dc9b268fa83a98c5
2021-04-28 16:41:35 +02:00
Translation updater bot 1e4f513e60 Localisation updates from https://translatewiki.net.
Change-Id: I05bec89bdd8add4d7af62cee2d5c5cb5b42cf1df
2021-04-28 08:51:42 +02:00
Translation updater bot 1b80a0db16 Localisation updates from https://translatewiki.net.
Change-Id: Ic3f65a3716821b17dc95502a9d0ed73c0b040c84
2021-04-27 08:40:42 +02:00
Translation updater bot 0c5a3f7749 Localisation updates from https://translatewiki.net.
Change-Id: I98dc9ca6a1be9bb6658b30f529c98db219e477a9
2021-04-26 09:14:15 +02:00
Translation updater bot b55b6f4200 Localisation updates from https://translatewiki.net.
Change-Id: Ibf70bba15ba2b4c9f2c61200a63f9737fef8c22c
2021-04-23 08:39:15 +02:00
jenkins-bot 2acf0694c9 Merge "[search] Don't destroy #p-search element" 2021-04-22 20:14:21 +00:00
Translation updater bot 5fd01af17e Localisation updates from https://translatewiki.net.
Change-Id: I5baa90700f1a4feee4575caa6c0522874f1b89d3
2021-04-22 09:34:16 +02:00
jenkins-bot 5820fa0b18 Merge "Scope right-aligned dropdown menus to #right-navigation & .mw-portlet-lang" 2021-04-21 19:15:27 +00:00
Nicholas Ray 2ff3308ac4 Remove 'noexternallanglinks' check from canHaveLanguages
`noexternallanglinks` is a magic word that can be used to
suppress/modify the languages produced by wikibase [1]. Most importantly
though, languages can still appear even with the usage of this magic
word. Therefore, this check can be removed.

[1] https://www.mediawiki.org/wiki/Wikibase/Installation/Advanced_configuration#noexternallanglinks

Bug: T277517
Change-Id: I1f532b3e669564f570b47451693ddb15757a6101
2021-04-21 10:45:06 -06:00
Sam Smith 9914d813d6 [search] Don't destroy #p-search element
The #p-search element is present in at least the Vector, Vector V2,
Timeless, and Monobook skins. This is because the HTML for the element
is generated in MediaWiki Core. At the very least, the
SearchSatisfaction instrument relies on the element always being
present.

Update the skins.vector.search module to simplify the App component
template so that it doesn't render a div#p-search element and mount that
component on the #searchform element instead.

Bug: T274869
Change-Id: Ifde679b62484fda7661fded2d978b78adac9f5da
2021-04-21 14:01:56 +01:00
Translation updater bot 90da534616 Localisation updates from https://translatewiki.net.
Change-Id: I93bb9656c6c06ea3d0f69246e5fa8a3abbea141b
2021-04-21 08:54:55 +02:00
jenkins-bot 83c92290ae Merge "build: Update 'svgo' to latest" 2021-04-19 13:50:39 +00:00
Translation updater bot 94b565a208 Localisation updates from https://translatewiki.net.
Change-Id: I440051ebab3844e22203bd9d0fcf79413b81324d
2021-04-19 08:54:44 +02:00
Volker E 2b5c18d7c9 build: Update 'svgo' to latest
Also change script name to 'minfiy-svg' to align with other npm 'svgo'
using products and to improve readability for non-native speakers.

Bug: T278656
Change-Id: Ib2a8a251a48ea99c8019d63b4f2586fea4079021
2021-04-18 14:51:48 -07:00
jenkins-bot e637cef2c2 Merge "Add config for language in header for logged in/out users" 2021-04-16 17:49:43 +00:00
Clare Ming 8cab50874c Add config for language in header for logged in/out users
Register updated requirement for language in header for logged in and logged out users in Vector's ServiceWiring file. Make VectorLanguageInHeader backwards compatible to handle boolean values when registering LanguageInHeader feature. Update VectorLanguageInHeader variable to array in config to handle different logged states.

Bug: T277588
Change-Id: I37a3a01e83f051cf0679769c8b9b5b41f00d6d72
2021-04-16 10:38:28 -06:00
Translation updater bot 48eecb2d18 Localisation updates from https://translatewiki.net.
Change-Id: I551e3fa999bc747f9048092402b51f38e4bbc265
2021-04-16 09:52:10 +02:00
jdlrobson afaa02ae42 Adjust floating override
Follow up to I3234e7712b8c111b070c35e38425c865ff7213f9
Do not disable the feature entirely as it has other purposes.

Bug: T280260
Change-Id: I47d16eb8186efa83e158713d852b443bce9aee1c
2021-04-15 17:18:29 +00:00
libraryupgrader e352b94055 build: Updating npm dependencies
* eslint-config-wikimedia: 0.19.0 → 0.20.0
* ssri: 6.0.1 → 6.0.2
  * https://npmjs.com/advisories/565

Change-Id: I4db94efccd2d6b58b994b080a99c5c066b829892
2021-04-15 13:54:37 +00:00
Jan Drewniak f52c2f8a4a Scope right-aligned dropdown menus to #right-navigation & .mw-portlet-lang
Removes the global rule for right-aligning the Vector dropdown menus
and instead scopes that alignment to dropdown menus that appear
inside #right-navigation and the language button in modern Vector.

Bug: T275158
Change-Id: I6c00ccc365f70682841d9eda9d31bbe25c757aa0
2021-04-14 23:31:59 +02:00
Translation updater bot 50dcf4f7a5 Localisation updates from https://translatewiki.net.
Change-Id: I7dd1498a6d8f2ae4f22345e241e84d62be5b8e66
2021-04-13 09:23:44 +02:00
jenkins-bot dd19a1924c Merge "Reorganize LESS files to match ResourceLoader conventions" 2021-04-12 20:45:43 +00:00
Translation updater bot bf80910a79 Localisation updates from https://translatewiki.net.
Change-Id: If236b8fbf6ec044ce821713cb8bc882d4c36c7e2
2021-04-12 08:41:53 +02:00
Translation updater bot 7687748dc0 Localisation updates from https://translatewiki.net.
Change-Id: I2c313e7e737d1bbd2d8f1af76d7384ab0c24cf9a
2021-04-09 09:01:25 +02:00
Jan Drewniak edd2f4ff85 Reorganize LESS files to match ResourceLoader conventions
Separating most LESS files into 2 ResourceLoader modules and a common
folder:

- skins.vector.styles
- skins.vector.styles.legacy
- common

This changes aims to clearly separate the old (“legacy”), the new
(“modern”) and the common styles which were previously all placed under
`skins.vector.styles/`.

Inside each directory are separate folders for `layouts` and
`components`.

The entry files, `skin.less` and `skin-legacy.less` are moved into the
specific folders and a third, `common.less` entry file is created that
contains the common imports for both old and new Vector.

Aliases have been added to the Storybook Webpack config to avoid adding
the story file changes to this patch. Images coming from CSS `url()`'s
have also been temporarily disabled in Storybook until Storybook can be
upgraded to use Webpack 5, and use array values for aliases, in a
follow-up patch.

This patch also slightly changes a footer layout specific rule so that
existing `padding` remains unchanged in rendering due to new common and
component structure.

Bug: T264309
Change-Id: I1cd2681a2b61edb7be56c38f9bb3994827d7e322
2021-04-08 15:47:56 +01:00
libraryupgrader 2e9917d587 build: Updating y18n to 4.0.3
* https://npmjs.com/advisories/1654 (CVE-2020-7774)

Change-Id: I69ab4c5db75906cb6b774aadf772a47cdbce9cdf
2021-04-08 09:10:48 +00:00
Translation updater bot 7bbe0e1df6 Localisation updates from https://translatewiki.net.
Change-Id: I0a1246d8046d1edf891cc6d51cd34bcac93a89c1
2021-04-08 08:42:48 +02:00
Translation updater bot ec6bca52ee Localisation updates from https://translatewiki.net.
Change-Id: Ieefae3f13c641ac58859e0d9df47086038e8ecab
2021-04-07 08:54:20 +02:00
jenkins-bot 2e8f193072 Merge "Remove redundant mw-indicator styles from layout-default.less and layout.less" 2021-04-06 21:25:04 +00:00
Translation updater bot fcdc1cd80b Localisation updates from https://translatewiki.net.
Change-Id: I7021fbaffd6142087793eeb6c162a5a717e8d820
2021-04-06 12:06:01 +02:00
jdlrobson bdd7eaacf1 [legacy] Restore old floating style inside Vector
This is a modified revert of Ia1eec412111e8f6af3b45affdc186d9eafd4262c.
This is not applied to modern Vector, for reasons given on ticket.

Bug: T279008
Change-Id: I3234e7712b8c111b070c35e38425c865ff7213f9
2021-04-05 15:07:07 -07:00
Bernard Wang 55fdf38714 Remove redundant mw-indicator styles from layout-default.less and layout.less
Bug: T278362
Change-Id: I76f39a9f4cf7404e7d50a272ebce08d53594ef5f
2021-04-05 16:58:41 +00:00
jenkins-bot 1b42cd8dd4 Merge "[styles] LanguageButton: Amend icon color by setting opacity" 2021-03-30 23:10:51 +00:00
Volker E 5a1a382c17 [styles] LanguageButton: Amend icon color by setting opacity
Amending icon color by setting `opacity` accordingly to Design Style
Guide requirements.
Also using `em` base sizing for accessibility reasons in order to
make icon resizable on user text zoom preferences. And adding some
comments and mediawiki mixin usage.

Bug: T277660
Change-Id: Ia226857a38d3b3d5b4583e95905ef55e406c5cb2
2021-03-30 22:13:50 +00:00
jenkins-bot d6b7ef0a8e Merge "Hide languages-in-header button when no additional languages" 2021-03-30 18:23:55 +00:00
Jan Drewniak 980c8453ce Hide languages-in-header button when no additional languages
Hides the languages-in-header feature if there is only one
available language.
Also factors the additional classes required for the language
button into a separate function.

Note: Hiding the language button is a temporary solution
until T275147 is resolved.

Bug: T276950
Change-Id: I241abc6061bba12a6a209074fa4c2d2c89cea930
2021-03-29 23:07:26 +00:00
jenkins-bot 15e343dede Merge "Clean up VectorHooksTest" 2021-03-29 20:20:03 +00:00
DannyS712 7dfec540ec Clean up VectorHooksTest
Fix order of parameters in assertions.
Remove unneeded "\".
Make constant a class constant.

Change-Id: If372dec96b54d466a066163420c6fd9da177c66c
2021-03-27 02:25:22 +00:00
Translation updater bot c1a6d14fe9 Localisation updates from https://translatewiki.net.
Change-Id: I053d9f262c5947827570aa5a94c9980a8838d336
2021-03-26 08:53:07 +01:00