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
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
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
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
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
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
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
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
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
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
Uses DisambiguatorHooks to prevent related pages module addition on
disambiguation pages.
Bug: T127068
Change-Id: I166712d7e5df26ad00c725f3e4fe23ec074b3329
* 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
Tests on beta cluster will fail without this upgrade which handles
an HTTP to HTTPS redirect issue.
Bug: T142141
Change-Id: Id09a5c253df81c022883dede940a3a75e0325569
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
Combined with the padding top of the footer, this results in a
massive unused white space area between the related articles box
and the footer, which is now removed.
Extra points: Removed unused less import
Bug: T138185
Change-Id: Iaf008977bce3c003fe0fad7c16ed6bf94aef60f9