Commit graph

291 commits

Author SHA1 Message Date
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
Translation updater bot 2c334cfea6 Localisation updates from https://translatewiki.net.
Change-Id: I740f5148c0343a707193c4b3c0c6e77ae68e0036
2016-09-01 23:27:00 +02:00
Jdlrobson 4b53afc983 Don't hit the DB unnecessarily
If $wgRelatedArticlesShowInFooter is false, then we'll still test
whether or not the page is a disambiguation page with the Disambiguator
extension. Unfortunately, DisambiguatorHooks::isDisambiguationPage hits
the DB.

Order the tests in RelatedArticles\FooterHooks::onBeforePageDisplay from
least expensive to most expensive so that the DB is queried only when it
must be.

This version of the patch takes into account namespace.

Bug: T127068
Bug: T144409
Change-Id: Ie6ddaa4e9bd8326c8b84dc400b78e9a4f4d0d78d
2016-08-31 20:13:05 +01:00
Jdlrobson 9e67ef6590 Revert "Don't hit the DB unnecessarily"
We forgot how namespaces work:
Catchable fatal error: Argument 1 passed to RelatedArticles\FooterHooks::isDisambiguationPage() must be an instance of RelatedArticles\Title, Title given in /srv/mediawiki/php-master/extensions/RelatedArticles/includes/FooterHooks.php on line 48

This reverts commit 9ede8913c7.

Change-Id: If0f1481854815c12613771041685c7837a95ec65
2016-08-31 18:57:41 +00:00
Sam Smith 9ede8913c7 Don't hit the DB unnecessarily
If $wgRelatedArticlesShowInFooter is false, then we'll still test
whether or not the page is a disambiguation page with the Disambiguator
extension. Unfortunately, DisambiguatorHooks::isDisambiguationPage hits
the DB.

Order the tests in RelatedArticles\FooterHooks::onBeforePageDisplay from
least expensive to most expensive so that the DB is queried only when it
must be.

Bug: T127068
Change-Id: Ie3e7e410026cf354d831ae3c2134cfc0957eb8db
2016-08-31 09:38:34 +01:00
jenkins-bot 45f922fd66 Merge "Cache morelike requrests" 2016-08-29 22:40:41 +00:00
Baha b486500ba5 Add documentation
Bug: T127068
Change-Id: I5b640f8fe90cb2b07e7e5113e5dff398684c0c68
2016-08-29 15:59:57 -04:00
Baha 8afb02b64a Cache morelike requrests
The cache length is 24 hours.

Bug: T126455
Change-Id: Icd328f70ced16cc43fc0ad62c8a1f49ce71d6369
2016-08-29 15:54:53 -04:00
jenkins-bot 62af14cab1 Merge "Use 'classic_noboostlinks' search profile" 2016-08-29 19:44:13 +00:00
Baha 9ca3eb6dda Use 'classic_noboostlinks' search profile
Bug: T141398
Change-Id: I0db2d21fe9e4735e27af6071b2190a5829477278
2016-08-29 15:38:09 -04:00
jenkins-bot 5fcea14d15 Merge "Disable related articles on disambiguation pages" 2016-08-29 19:32:46 +00:00
Translation updater bot 40f01aef70 Localisation updates from https://translatewiki.net.
Change-Id: I36b40158dd7c27d6cb5565638ce3793b1dca7cdc
2016-08-27 23:27:15 +02:00
Sumit Asthana cea66f6cda Disable related articles on disambiguation pages
Uses DisambiguatorHooks to prevent related pages module addition on
disambiguation pages.

Bug: T127068
Change-Id: I166712d7e5df26ad00c725f3e4fe23ec074b3329
2016-08-24 04:12:45 +05:30
jenkins-bot 505f865f2e Merge "Allow skins a mechanism to decide on placement of related pages" 2016-08-23 20:16:04 +00:00
jdlrobson fc7799b9f3 Allow skins a mechanism to decide on placement of related pages
* If a footer-content element is present prepend there
* If no footer-content element given wrap the component in a container that is known to be compatible
with known skins - this has post-content class (for backwards compatiblity with
old Minerva skins) and a class to apply the correct margin to Vector

Bug: T141002
Change-Id: Iac11948f8f5fdaad45d51b905bb7494a84775710
2016-08-23 11:51:33 -07:00
Translation updater bot a5c6c993c8 Localisation updates from https://translatewiki.net.
Change-Id: If46ca3bff99c798e044e9d553446fd55650e370c
2016-08-19 22:42:12 +02:00
Translation updater bot 18c9afbeee Localisation updates from https://translatewiki.net.
Change-Id: I3d19d2b6dc21cd1b15b5c136510c5bd52520f875
2016-08-17 22:40:59 +02:00
Translation updater bot 9259df2e1f Localisation updates from https://translatewiki.net.
Change-Id: I966a08196ea568b3dea269dd9a9ecac8e919c2ce
2016-08-15 23:01:21 +02:00
Translation updater bot 5c2cbe2a16 Localisation updates from https://translatewiki.net.
Change-Id: I2c736fb796512b8c74b7af41793d87263b1d7b04
2016-08-10 22:38:59 +02:00
Translation updater bot c88aedae86 Localisation updates from https://translatewiki.net.
Change-Id: Ia34de69534ca214e4a559053879854ea285d0701
2016-08-09 22:32:22 +02:00
Translation updater bot 9b437d12b7 Localisation updates from https://translatewiki.net.
Change-Id: I07662832f7247f88f617f5945fb3603abe3ec096
2016-08-07 22:40:48 +02:00
jenkins-bot ca5c9326b7 Merge "Upgrade mediawiki_selenium in Gemfile" 2016-08-05 05:42:43 +00:00
jenkins-bot d2ccf02a81 Merge "Use SidebarBeforeOutput hook instead of echo'ing HTML" 2016-08-05 00:39:56 +00:00
jenkins-bot a255683055 Merge "Remove uncessary ParserClearState hook" 2016-08-05 00:39:55 +00:00
jdlrobson 323c250e54 Upgrade mediawiki_selenium in Gemfile
Tests on beta cluster will fail without this upgrade which handles
an HTTP to HTTPS redirect issue.

Bug: T142141
Change-Id: Id09a5c253df81c022883dede940a3a75e0325569
2016-08-04 15:49:40 -07:00
Translation updater bot de2a8a252f Localisation updates from https://translatewiki.net.
Change-Id: Ie0d866614dfb623b7eb70cbb1efe60f5ba6c3ac7
2016-08-03 22:40:50 +02:00
Translation updater bot c5c8f52731 Localisation updates from https://translatewiki.net.
Change-Id: I4754705f4006a427683f6a8c2778e5713003de3b
2016-08-02 22:45:22 +02:00
Translation updater bot bd64292527 Localisation updates from https://translatewiki.net.
Change-Id: I226202d6c8d05fa8277da260f268d03473187734
2016-07-31 22:26:10 +02:00
Kunal Mehta ac5448adcc Use SidebarBeforeOutput hook instead of echo'ing HTML
Ewwwww. This also fixes display in MonoBook.

Change-Id: I5c50722285a0dcf8af09674e3dd80e37128b279a
2016-07-29 20:34:40 -07:00
Kunal Mehta a4c4f6700f Remove uncessary ParserClearState hook
The ParserOutput object is already reset when state is reset, so there's no
point in setting or unsetting properties on it.

And since the only unit test was deleted, remove the hook for that too.

Change-Id: Idf12365e8c4b14e527d923edc1086bdaf349df32
2016-07-28 15:55:02 -07:00