Commit graph

545 commits

Author SHA1 Message Date
jdlrobson 9b75e0b372 Hygiene: Remove unnecessary variable
Improves readability...

Change-Id: Ib0e9cbc083e6c0a384c81815b470063698e0595f
2017-07-14 16:15:35 -07:00
Translation updater bot bcfa59fc81 Localisation updates from https://translatewiki.net.
Change-Id: I0e258a640aa19acb64aa2514d18d1c19be21b0a7
2017-07-14 22:48:20 +02:00
jenkins-bot 38ac4650e0 Merge "Make number of RelatedArticles configurable" 2017-07-06 21:09:06 +00:00
jdlrobson 9126c7d0ef Make number of RelatedArticles configurable
Wikivoyage pages have more than 3 related articles as they make use
of the {{#related:}}  magic word.

After speaking with Nirzar we should allow this project to show more than 3.
This change allows this while keeping the existing behaviour on other wikis and
will pave the way for removing a bunch of code from this extension.

Additional changes:
* Cleanup skinStyles definitions
* Limit cards to 30% maximum width and give margin top to account for
situations where the number of cards are multiple of 3
** In Minerva hardcode the max-width to pixels.
* Margins are switched from hardcoded 10px to percentage based. Yes
this changes the right margin slightly but is more maintable and visually
the same.

Bug: T164765
Change-Id: I41119de3228c2df799f740d4bd00082101c21b97
2017-07-06 11:17:47 -07:00
Translation updater bot 990c33a3dd Localisation updates from https://translatewiki.net.
Change-Id: I72f8e7726444f01692e96d419425477e8bf7de26
2017-07-05 22:39:24 +02:00
Kunal Mehta 8519e02eb7 build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: I35cd178e3825a83f1df9d6dd09b21a543cd8b9cd
2017-07-01 01:41:23 -07:00
jenkins-bot 750f3d73fd Merge "Hygiene: SamplingRate -> BucketSize" 2017-06-22 18:40:08 +00:00
jenkins-bot 970d3547fb Merge "i13n: Don't sample by pageview" 2017-06-20 21:59:31 +00:00
Kunal Mehta 87b7254eaf build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.FunctionComment.Missing.Public

Change-Id: I591fd0cd60147b9f5ddd3d1b9e74f79a0bb3f595
2017-06-20 00:20:19 -07:00
Sam Smith f4c82d3a33 Hygiene: SamplingRate -> BucketSize
In order to avoid further confusion, clarify that we're bucketing users
for experiments.

Bug: T167236
Depends-On: I752cdf068ca25bffb38229380785e7da1a208049
Change-Id: I6508ab8fa3d436ae295eb047e170fdc5417d25fc
2017-06-20 05:26:29 +01:00
Sam Smith 153573dbe5 i13n: Don't sample by pageview
Currently, the mw.eventLog.Schema class samples per pageview. However,
we expect that if a user is bucketed for a session, then all
EventLogging events logged during that session are in the sample.

Unlike Popups in I4f653bba, the RelatedArticles instrumentation does
rely on another mw.eventLog.Schema behavior: distinguishing between
static and dynamic data. This and the use of mw.eventLog.Schema could be
removed in a follow-on change.

Bug: T167236
Change-Id: I9583cb98264efd7dc46b45bbce5323036a100536
2017-06-19 12:20:42 +01:00
jdlrobson 4598d9b567 Remove CardsGateway (unused)
Bug: T167647
Change-Id: I7e2a7777a5f28991d77deab520a55d3bd242104b
2017-06-14 13:10:01 -07:00
Translation updater bot 406cce83b1 Localisation updates from https://translatewiki.net.
Change-Id: I1c2ec1fbd8d04f1c7408158872455c8880af6ca3
2017-06-12 22:44:59 +02:00
jenkins-bot 83d06e997d Merge "Migrate Cards code to RelatedArticles" 2017-06-08 16:54:10 +00:00
jdlrobson 6dee0147f4 Migrate Cards code to RelatedArticles
* Move across all files
* Rename ext-card- prefix to ext-related-articles- prefix
** Since all code using these prefixes is JS
  we do not have to worry about cached HTML

Bug: T137021
Change-Id: I784fd132c36329fa0dcc49fe2804460061940347
2017-06-07 08:35:53 -07:00
Amir Sarabadani 9182831c11 Add CODE_OF_CONDUCT.md
Bug: T165540
Change-Id: Iaa276e0f65c5dd237b851226df1b691007219dbe
2017-06-07 15:41:22 +04:30
jenkins-bot a27fa2bc9b Merge "Session id should not change on every page view" 2017-06-07 08:04:16 +00:00
jdlrobson eb5a86908a Session id should not change on every page view
Bug: T167236
Change-Id: I7a04c5c3f959ce0e7dc50e2bc2fd64d139b78cdb
2017-06-06 16:53:12 -07:00
Translation updater bot d333bd3612 Localisation updates from https://translatewiki.net.
Change-Id: I61403556f4139b0eedf2704518686b934019a5f3
2017-06-01 23:12:44 +02:00
Translation updater bot 4933f5143e Localisation updates from https://translatewiki.net.
Change-Id: Ia4884d1cd66be6fa5d9678215805e125e1816db4
2017-05-11 23:27:46 +02:00
Translation updater bot 1d3659048a Localisation updates from https://translatewiki.net.
Change-Id: I7d558ce043de25d81ecefb49eb1730d1be2266c7
2017-05-06 22:57:59 +02:00
Antoine Musso 1625f53b9d build: add jakub-onderka/php-console-highlighter
Highlight PHP code when parallel-lint fails

Change-Id: Ie7582baa805457a0445a119bfd5fb859f693e51f
2017-05-05 21:51:43 +02:00
Ed Sanders 96fe734e7c build: Update linters
Change-Id: I524c23c92d2d356ba1ce9552c7a0028c670e054f
2017-05-05 15:30:01 +00:00
Umherirrender 627c254157 Add stylelint for less files
Fixed the following rules:
string-quotes
declaration-property-value-blacklist
number-leading-zero

Change-Id: I7c8021070b69cd60ac010e90b3bc13a033d695e2
2017-04-18 18:20:50 +02:00
Timo Tijhof 1b6c46d7dd tests: Don't assume synchronous jQuery.Deferred
Bug: T124742
Change-Id: I8289d88fa61447ba31e7b767727775ead411987e
2017-04-14 18:12:55 -07:00
jenkins-bot ce0db068d9 Merge "Upgrade to eslint" 2017-04-10 17:00:15 +00:00
jdlrobson 298790a944 Upgrade to eslint
We're going to want to use a newer version of JSHint
anyway to support use of ES6 in our browser tests so now
seems a good time to do this.

Bug: T149202
Change-Id: I5526b020cfc12c0e065ad15ed711a0e3a7bff1bc
2017-04-10 14:12:25 +02:00
Translation updater bot c17b894ae0 Localisation updates from https://translatewiki.net.
Change-Id: Ia635cc6ec83c166cda767e78468ece7638b0506e
2017-04-09 22:57:46 +02:00
jdlrobson dbb73c389d Remove Related Articles from desktop beta features
This change removes RelatedArticles from beta features.
It repurposes the BlacklistSkins config to be a whitelist that describes
when related pages should be shown in the footer.

To avoid enabling related pages on desktop, this depends on a config
change that makes use of the new configuration option.

Simplify browser tests to reflect the new status quo.

Bug: T146436
Bug: T160076
Depends-On: I522e0182d1c3d9261bd0561c3ec0c789b6431c7a
Change-Id: I84da1fb33a901a6365375d00d192af35422ff0b0
2017-04-04 23:01:36 +00:00
Translation updater bot e24c22ae13 Localisation updates from https://translatewiki.net.
Change-Id: I00bef18740f4ee72e732f284626539abef3c2eeb
2017-03-14 22:48:10 +01:00
Baha 13c630343e Do not lazy-load an event logging module
Since we're always depending on the event logging module, we can
make it a dependency in extension.json, rather than loading it
lazily.

Bug: T157375
Change-Id: Ia57f390586e123c6010a7daf23a3d851daf079ce
2017-03-06 14:30:39 -05:00
jenkins-bot bf7a9a5b37 Merge "Schema:RelatedArticles revision update" 2017-03-06 16:51:17 +00:00
jenkins-bot 7c1ca17238 Merge "Hygiene: lazy-load event logging code" 2017-03-06 11:19:04 +00:00
Baha 26e4e8d1fd Schema:RelatedArticles revision update
Log the `feature-enabled` event for users who are eligible to see the
ReadMore feature. Otherwise log the 'feature-disabled' event.

Suporting changes:
* Register the latest version of the RelatedArticles schema.

Bug: T157375
Change-Id: I1557de88c7602aa066833bd55b83e6ee51d27178
2017-03-06 10:48:35 +00:00
Translation updater bot 9c6adebed5 Localisation updates from https://translatewiki.net.
Change-Id: I6eedfa48149de4d443de80f3dc87917fa9ea6a9d
2017-03-01 22:39:08 +01:00
Baha a40286c800 Hygiene: lazy-load event logging code
This allows us to decouple the event logging code from the
`ext.relatedArticles.readMore' module. As a result we'll be able to
log events without loading the above mentioned module.

Bug: T157375
Change-Id: I55cf4f40cafc88d6baeb5cc1b41fc2d6bcd2fbb9
2017-03-01 14:45:32 -05:00
Translation updater bot 6f1bfcc0d9 Localisation updates from https://translatewiki.net.
Change-Id: I055df38f891bd4cf360cf503ed527d86cc7f107e
2017-02-24 22:40:29 +01:00
jenkins-bot c483e00b15 Merge "Always show RelatedArticles to users who opted into beta feature" 2017-02-08 10:56:48 +00:00
jdlrobson 36dfaccd2f Always show RelatedArticles to users who opted into beta feature
Additional change:
* Correct how we expose RelatedArticlesEnabledSamplingRate so that
it includes the wg prefix and is consistent with other config values

Bug: T157372
Change-Id: I274de542cf461de60f903ddbc0353a4116016007
2017-02-07 16:05:26 -08:00
Translation updater bot 192e677822 Localisation updates from https://translatewiki.net.
Change-Id: Idc4f9ea8098bd55529f87097a5a72bffea6dfb2a
2017-02-05 22:49:53 +01:00
jdlrobson 0e5eef27ce Don't run the test for minerva stable against the beta cluster
On the beta cluster, the browser test should pass.
Add a new test to reflect the two different states.

Bug: T157165
Change-Id: I2a777436dfa3a14d58855449c39cc144b7149a62
2017-02-03 12:23:56 -08:00
jdlrobson c6bc8f804d Update browser test to run on desktop
This previously passed with a false positive as it replicated
the scenario `ReadMore is not present in minerva stable` by running
on the mobile domain.

This change makes it run on the desktop domain and pass (it now
fails given it runs on Minerva skin)

Bug: T157165
Change-Id: Idb2002b0f2d378cc0b6df73ad1381bfee32448c9
2017-02-03 12:22:30 -08:00
jenkins-bot 3a8127954a Merge "Do not disable footer feature when BetaFeatures is not installed" 2017-02-03 10:11:35 +00:00
Gergő Tisza 3cf6d638f7 Do not disable footer feature when BetaFeatures is not installed
Bug: T146436
Change-Id: I0ac855cdace3f40977ca3af3cfc187856532bba8
2017-02-03 09:51:28 +00:00
Piotr Miazga 8a3aa6fba8 Hygiene: Instead of non-testable class_exists use ExtensionRegistry
Changes:
 - use ExtensionRegistry to check Disambiguator extension existence

Change-Id: Ibb1fa899fe3b07074ef5c69911d0b7a4e09336ae
2017-02-01 10:37:11 +00:00
Piotr Miazga 9a80069330 Hygiene: Don't use deprecated ConfigFactory::getDefaultInstance()
Changes:
 - use MediaWikiServices::getConfigFactory() instead of depreacted func
 - fix wrong param type for ResourceLoader

Change-Id: Id983f3cc57a4d1d23ef8dd0a52e78320dd51e9ca
2017-01-31 15:24:31 +00:00
Piotr Miazga 0806dbdb42 Use mw.experiment to enable related pages only to subset of users
Changes:
 - introduced new config variable: RelatedArticlesEnabledSamplingRate
 - do not trigger RelatedArticles clientside scripts if feature is disabled
 - do not log events when navigator.sendBeacon is not available

Bug: T156039
Change-Id: I7e9773131c5b9aea9e9fb554d4508842cdedede7
2017-01-30 23:29:32 +01:00
Ed Sanders 473108939a build: Re-use MessageDirs in banana conf
Change-Id: Idd89ef9e35ad386e82b1561455de29c24821d584
2017-01-23 14:05:26 +00:00
Translation updater bot 991a29427b Localisation updates from https://translatewiki.net.
Change-Id: Ib86424e1efd12b8d0a4c566ce28fb2a04a986fb9
2017-01-09 15:54:04 +01:00
Translation updater bot 8fd4f33181 Localisation updates from https://translatewiki.net.
Change-Id: Ibadf5bb49060afd6a68486cc7a98577152c24a7a
2017-01-04 22:36:45 +01:00