composer:
* mediawiki/mediawiki-codesniffer: 28.0.0 → 29.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingParamTag
npm:
* eslint-config-wikimedia: 0.11.0 → 0.15.0
The following rules are failing and were disabled:
* no-jquery/no-parse-html-literal
* grunt-eslint: 21.0.0 → 22.0.0
* grunt-stylelint: 0.10.1 → 0.13.0
* stylelint-config-wikimedia: 0.6.0 → 0.8.0
Additional changes:
* Also sorted "composer fix" command to run phpcbf last.
* Removing manual reportUnusedDisableDirectives for eslint.
Change-Id: Iab538420d73bbbebfd05cf815ab06773f16da8da
This allows skins to determine where the cards appear in a consistent
fashion with other extensions, and require minimal special handling from
the extension itself.
Also change default settings as to when RelatedArticle cards will appear
- keep the whitelist to allow projects to configure their usage such as
in the case of only wanting it on mobile, etc, but now that it should
just work in any given skin, default it to on for all so that it's easier
for the average third party to install for whatever use.
Note that this default setting change will not affect WMF wikis, as
wmgRelatedArticlesFooterWhitelistedSkins is explicitly set in the
wmf-config regardless.
Bug: T181242
Depends-On: I5b0ad889e633fde88c392577ce5373c81fc5486a
Change-Id: Iebd759c0d1a536768d18953f372664df762d9e04
* The extension already uses 'null' as placeholder in RelatedArticles
instead of empty array. Update the doc comment in RelatedPagesGateway
to reflect this (its code was already using the default operator
to fallback to empty array, given empty arrays are not falsey in JS,
but null is).
* Omit the key from the mw.config output in <head> on page views,
when the value is null, given this is redundant information and consumes
additional space.
Bug: T219342
Change-Id: I367f9d9423d66611d73d56f8a769d86d14d3de8b
Bundle these with the module that needs it instead, this means
1. It is naturally only downloaded on pages where it is needed.
2. It doesn't block download/parse/render of the article HTML.
3. It doesn't delay time to mw.loader.load() for interactive
functionality.
Bug: T219342
Change-Id: I5c6809392b0621bd0d58049597f6c0306e572607
With RelatedArticlesEnabledBucketSize now removed, installation of this
extension will turn it on for 100% users without any mechanism to turn
it off.
Additional changes:
* Bump version
* Add Readers team to contributors
Bug: T202306
Change-Id: I7dc270a06dd3afd4e894c8298165d6d6d4fda8d6
Updates QUnit test files from starting with "test_" to ending with
"test.js" in accordance with the Readers Wed coding conventions.
https://www.mediawiki.org/wiki/Reading/Web/Coding_conventions
Bug: T197884
Change-Id: I3c15385d22d308b8b465985ca55e8b802d72dae4
This is the last remaining use of the module name "ext.eventLogging.Schema"
in Wikimedia Git. It is an alias for "ext.eventLogging.subscriber".
Change-Id: Idf295ef9c550ad7f1a19ac0b84e856d606ab8eb3
RelatedArticles will now only render related articles in the footer of
skins.
Bump version to 3.0.0
Bug: T165991
Change-Id: Ia4e28c0ed76b3aff37c0aea8eb713923312ba23c
Using MakeGlobalVariablesScript hook will add config variables to
the HTML meaning cached HTML will not be able to access it leaving
it as undefined. This will mess up any existing caching.
Additional changes:
Because I'm paranoid, make sure that value is never undefined.
Bug: T170648
Change-Id: Icb8e34104c57b1e69b7e035ef89d5b4c3371132f
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
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
In order to avoid further confusion, clarify that we're bucketing users
for experiments.
Bug: T167236
Depends-On: I752cdf068ca25bffb38229380785e7da1a208049
Change-Id: I6508ab8fa3d436ae295eb047e170fdc5417d25fc
* 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
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
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
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
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
Changes:
- use MediaWikiServices::getConfigFactory() instead of depreacted func
- fix wrong param type for ResourceLoader
Change-Id: Id983f3cc57a4d1d23ef8dd0a52e78320dd51e9ca
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
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
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
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
* Load skin specific styles only in that skin;
* Vector styles are default for all skins unless overwritten;
* Allow monobook styles to inherit from vector styles;
* Do not load visual editor related rules in minerva;
* Remove an unused CSS rule.
Bug: T126149
Change-Id: I1e657de7a45fb4812c42ca7b99624b585dc4b7dd