Commit graph

2276 commits

Author SHA1 Message Date
jenkins-bot 81947cbd67 Merge "Remove unused $contentNavigation from getTemplateData method" 2021-05-14 20:20:54 +00:00
Nicholas Ray 7ab2edb2fa Remove unused $contentNavigation from getTemplateData method
This is not used in the method and, from the surface, appears to be
extraneous.

Change-Id: I63b1eba54f8ce11296c187b292010e415a2915af
2021-05-14 12:13:14 -06:00
jdlrobson 6998c536d4 Both UserMenu stylesheets should be shipped in modern
Since we have feature flagged the new user menu feature, it is
imperative we load both sets of styles until the feature has
shipped. This allows us to switch seamlessly between the two
without worrying about cached HTML being served with updated CSS.

To do this, we add a new class to both user menu's distinguishing
the legacy version from the modern version. The styles are then
scoped to these new selectors.

This also fixes some regressions with the legacy user menu in
modern Vector when wgVectorConsolidateUserLinks is disabled.

Notes:
* No caching selector is needed for #pt-userpage given it can only
ever be output for logged in users.
* ID selectors in general are bad, so scoping to mw-portlet-personal-user-menu-legacy
isolates the legacy component allowing it to be rendered alongside the modern UserMenu

Bug: T276561
Change-Id: I068c5233bb25a7b141e66a6726b5761841f83eb2
2021-05-14 10:13:09 -07:00
Jdlrobson efaf3aadf3 Remove mw-body-content from HTML that is not the article body
The `mw-body-content` class is currently decorating various things,
however should be limited to the body of the article. This allows
us to identify the wrapping element without resorting to a selector
that makes use of an identifier and to separate styling concerns of
UI (indicators and site notice) from article content.

Bug: T279388
Change-Id: I4c1b15d90bacbc9b13782a1d8f52e838ce8ecd83
2021-05-14 00:01:52 +00:00
Clare Ming 63f9dd81e3 Cleanup styles for personal user dropdown menu.
Remove redundant styles. Update personal menu dropdown to more closely reflect design of OOUI dropdown elements. Extract legcay-specific, modern-specific styles for UserMenu into separate partials. Create new shared UserMenu component.

Bug: T276561
Change-Id: I1e56cd5b3b24ac1b5cae684301b8e3a84ea33a5c
2021-05-13 23:19:54 +00:00
jenkins-bot 234659e3e3 Merge "Allow languageinheader query param to fully control treatment of languages" 2021-05-13 20:04:15 +00:00
Nicholas Ray de5a640c0b Allow languageinheader query param to fully control treatment of languages
Before this commit the `languageinheader` query param would only take
effect if the A/B test was enabled AND the query param was set. Per
T282543, we want the query param to take effect regardless of the state
of the language/AB test config.

To see new treatment, set `languageinheader=1`.
To see old treatment, set `languageinheader=0`.

Bug: T282543
Change-Id: I6a06e90b6e46a6fd7506a5ddeaf071b893ebfe8e
2021-05-13 12:04:12 -06:00
jenkins-bot 13e45adb28 Merge "search: Wire up submit event handler" 2021-05-13 15:39:12 +00:00
Sam Smith 7f780961a6 search: Wire up submit event handler
Bug: T274869
Change-Id: I5fab22564fa2fe140858cc214aac017d7bd6c68e
2021-05-13 15:29:18 +01:00
Translation updater bot 25ee080773 Localisation updates from https://translatewiki.net.
Change-Id: I98f8bafd0769dc34953b1d1221075a0d9bc295e2
2021-05-12 09:26:57 +02:00
Translation updater bot 87058d8caa Localisation updates from https://translatewiki.net.
Change-Id: I627f494ab9ec1dfe6a0448ecec98efc1a02c887e
2021-05-11 09:10:51 +02:00
jenkins-bot 50430ea06a Merge "search: Update styling for the search loading state" 2021-05-10 20:55:31 +00:00
jenkins-bot b41e224ec6 Merge "Refactor: Renaming mustache variable page-isarticle to is-article" 2021-05-10 09:38:08 +00:00
Jan Drewniak c22dc8d95b Refactor: Renaming mustache variable page-isarticle to is-article
Modifies this variable name to use proper hyphen-case and
prioritizes the type of variable rather than it's source.

This prioritization makes sense in Mustache templates because the
variable is a boolean and is used exclusively in if statements,
e.g. {{#is-article}} ... {{/is-article}}

Change-Id: I72e9baf0a979d922b8217aabe8cf0c40699f891b
2021-05-10 08:55:06 +00:00
Translation updater bot 18e74b2292 Localisation updates from https://translatewiki.net.
Change-Id: I54821846ebfced651cde76b622ac74f2a9eb5e96
2021-05-10 08:59:33 +02:00
bwang 964e214e87 search: Update styling for the search loading state
Bug: T273093
Change-Id: Ifd7f07411597be844cb7de79e416975261069506
2021-05-07 17:04:42 -05:00
Jan Drewniak 9027d57804 Fix: update to 80d734b4, hide language dropdown when ULS loads
Bug: T276140
Change-Id: I70997fbc54554b8d1b9c271a5ca93f2a47f1ee92
2021-05-07 12:24:30 +02:00
Translation updater bot 865cc4a566 Localisation updates from https://translatewiki.net.
Change-Id: I1858001c141885236e191c94abb78ea29f7d51ac
2021-05-07 08:47:06 +02:00
jdlrobson e7a4ecf9db Refactor: Clarify functions that return booleans and template booleans
We prefix templates that are booleans with "is-" and tend to prefix
functions that return booleans with "if" or "should"

This renames the new "shouldConsolidateLinks" method.

Follow up to I1c305d89bece147a6f1b478441119c3169abfbdd

Change-Id: I6a5908b8b35ca6bceec8b864e3ac651fc7e8ced8
2021-05-06 23:51:56 +00:00
jenkins-bot 840bc5b0cd Merge "Consolidate user links into personal dropdown menu for logged users." 2021-05-06 20:17:33 +00:00
Clare Ming dc0b679bfa Consolidate user links into personal dropdown menu for logged users.
Pull personal menu items except for user page link into a consolidated dropdown menu based on feature flag using Vector hooks. Add consolidate user links feature flag for logged in/out users. Update styles for personal toolbar. Add logic to template to show legacy toolbar or consolidated toolbar based on feature flag variables.

Bug: T276561
Depends-On: If4e143aada711d210ae45d33b97a6be0685b6a41
Change-Id: I1c305d89bece147a6f1b478441119c3169abfbdd
2021-05-06 12:49:39 -07:00
jenkins-bot 545eb7fb2b Merge "LanguageButton story should load mediawiki ui button styles" 2021-05-06 09:10:29 +00:00
Translation updater bot ca113fd066 Localisation updates from https://translatewiki.net.
Change-Id: Ic6433b90bd8143042dc322da59c6cacb5d1d5a2a
2021-05-06 08:56:58 +02:00
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
Jdlrobson d2c7805fa8 LanguageButton story should load mediawiki ui button styles
Discovered while testing I97bf0c11d0321752d472ac4988618a1db92b7271

Change-Id: I8634717ea58544b2d226fbb114bea43639a6542d
2021-05-05 09:41:10 -07: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