Commit graph

420 commits

Author SHA1 Message Date
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
Translation updater bot ec13e9cd90 Localisation updates from https://translatewiki.net.
Change-Id: I117fca70ddd5e14ba309d754520d2798f753d6a0
2016-12-13 22:44:53 +01:00
divadsn e9102f8d35 Large gap left in footer on pages with no related articles
An empty container was left on the page despite there being no related articles.
This should prevent adding the container on pages with no related articles.

Bug: T147217
Change-Id: I074a12e2d6680403551c436a4b00c3b9ab1c8d09
2016-12-12 22:18:28 +00:00
Translation updater bot db95760730 Localisation updates from https://translatewiki.net.
Change-Id: Id285f68c5f0da9cd05c04b3c275d05266c7caaa8
2016-12-05 22:51:21 +01:00
Translation updater bot 291fe0c514 Localisation updates from https://translatewiki.net.
Change-Id: If11017373664f00786c6517a51964486646d6e32
2016-11-15 22:59:18 +01:00
Chad Horohoe 662436626b Whoops, track not trace
Change-Id: I8f51d26259850149fb63cb16383d96ca42d4e6bf
2016-10-24 17:03:27 -07:00
Chad Horohoe 05530a3113 Swapping defaultbranch for trace
The former is a maintenance nightmare when branching.

Bug:T146293
Change-Id: Id553e1c034f3b1c1f887a904b2f314a67e1b1c86
2016-10-24 16:38:16 -07:00
Baha 1bc4b5c1b3 Fix browser tests
The ReadMore checkbox on the beta preferences page doesn't have an ID
anymore. It has a name though, which is used from now on.

The regression was introduced in I8636f32330e23814ba3b4c0f5e22e55aaf77883e.

Bug: T148856
Change-Id: Ieb20c8d9e97d53e6afae3a9fc99ce4dea471b0b5
2016-10-24 15:27:53 -04:00
Translation updater bot ce2378df85 Localisation updates from https://translatewiki.net.
Change-Id: I22d6b9beb66bbbb5f8af8112efc3d19cdcc33ac5
2016-10-18 22:40:10 +02:00
Translation updater bot 7b86d119b4 Localisation updates from https://translatewiki.net.
Change-Id: Iadf9df1ed16047da654625cea103cb229abeca01
2016-10-16 22:43:46 +02:00
Ed Sanders afa49ad491 Update beta feature screenshots to use proper layout and colours
Bug: T144428
Change-Id: I0d02c6c6bce35742084f4c72010639ddae2de0b9
2016-10-12 15:38:21 -07:00
Translation updater bot abf840bb22 Localisation updates from https://translatewiki.net.
Change-Id: I8907dd469912003b78ad1824c00a4466acd5e49d
2016-10-09 22:55:07 +02:00
Translation updater bot 72a57735d6 Localisation updates from https://translatewiki.net.
Change-Id: Ic62c760d39025166406254a3bf8880489eb671a2
2016-10-04 22:40:33 +02:00
jenkins-bot ec0fbca920 Merge "Allow blacklisting skins for showing ReadMore in footer" 2016-09-26 15:31:04 +00:00
Baha 9c1404ce99 Allow blacklisting skins for showing ReadMore in footer
Introduce a new config variable `RelatedArticlesFooterBlacklistedSkins`
to control skins that are allowed to show ReadMore in the footer.
As before Minerva beta mode is always allowed to show.

Depends-on: I366c8656a0f14a7069053b2e6199caac20471ea4
Depends-on: Ie4ac3c11e81eeea9f5b4a7161a64477cb5d60f07
Bug: T144047
Change-Id: I1663ab25083d9d907f288e60d506831bebb67945
2016-09-26 15:26:03 +00:00
jenkins-bot 4490e1b9bb Merge "Perf: don't load a module unless necessary" 2016-09-26 15:12:28 +00:00
Baha 613ed40d23 Perf: don't load a module unless necessary
Move logic that loads related articles in the footer to PHP from JS.
This prevents us from shipping an RL module to a client and not showing
related articles.

Also, make sure not to load related articles in footer on
Special:MobileDiff.

Bug: T144047
Change-Id: I73e39ee6b1223699cd8ac739902315d163d98c3b
2016-09-26 08:01:07 +01:00
Željko Filipin 316073e6ff Fix MediawikiApi::HttpError in Selenium tests
Use https (instead of http) in mediawiki_url environment variable.

Bug: T145799
Change-Id: Ie4d7188a2f3a11f1eaa5163ffd83544e9828e136
2016-09-16 17:02:14 +02:00
Baha 5f98265e7e Increase threshold for loading related articles in the footer
The threshold is now 2 times the window height per Nirzar.

Bug: T144822
Change-Id: Ia72b0532e481211645364a1ed9715f6f07f28fca
2016-09-15 15:11:13 -04:00
Translation updater bot d992571d34 Localisation updates from https://translatewiki.net.
Change-Id: I360c8b259340542c22b4843080d614498649c383
2016-09-13 22:55:19 +02:00
Baha 6941c6df9a Change scroll threshold to viewport height * 1.5
The threshold used to test whether related articles need to be
loaded has been changed to the viewport height * 1.5 from the more
complicated formula used earlier.

The change should help with loading related articles more smoothly.
To eliminate the lag completely the related articles need to be
rendered in the back-end.

Bug: T144822
Change-Id: I9d189163b95533ca43fa3d8632f65b280470f12a
2016-09-13 10:25:53 -04:00
jdlrobson f09f7a717d Beta should be available to test suite.
This old classic returns again.
A browser test fails when this is not enabled as it asserts that
the user is in beta.

Bug: T120715
Change-Id: I2c5339ba959318a3b995a28e22f3df375ae53103
2016-09-12 21:33:58 +00:00
jenkins-bot 26d3633b44 Merge "Cache "morelike" requests for all users" 2016-09-06 16:01:09 +00:00
Sam Smith 8b8db66dd1 Cache "morelike" requests for all users
In order to minimize loading time of RA for as many users as possible,
we need to maximize the number of users that can be served by our edge
caches.

Currently, if you're logged in, then the API uses your language by
default and so responses are always private, i.e. they shouldn't be
cached by a shared cache and can be cached by the browser.

By requesting that the response be in the language of the content, the
API ignores your language and responses become public, i.e. they can be
cached in a shared cache and can be cached by the browser.

Changes:
* Add the `uselang=content` parameter to the morelike request
* Add the `maxage=86400` parameter to the morelike request, allowing the
  browser to cache the response for 24 hours, which'll save the device
  even making the request

Bug: T126455
Change-Id: I6216a088d865f27f7cc3725fc311191da42a27ba
2016-09-05 11:33:12 +01:00
jhobs e68d5b6599 Use mw.viewport to check when to load related pages
Does not change distance threshold.

Bug: T135607
Change-Id: I82dfa78e93f4bb7a8a28d038470265e7fd30c423
2016-09-02 12:01:17 -07:00
jdlrobson f960e7b651 Remove styles for old Minerva design
This CSS rule exists for Minerva's old footer. Considering Related
pages is currently only in mobile beta and the new footer should go
live before related pages does. The cost of maintaining 2 related
pages Minerva designs is not worth it.

In a follow up patch the read more container class will be reintroduced
to Minerva

Change-Id: I2d5c4e73c0cfa3f1107a0fd195d3e09f4e14ef2a
2016-09-02 11:56:17 -07:00