Commit graph

660 commits

Author SHA1 Message Date
jdlrobson 94ecc2d917 Breaking change: Remove Sidebar code from RelatedArticles
RelatedArticles will now only render related articles in the footer of
skins.

Bump version to 3.0.0

Bug: T165991
Change-Id: Ia4e28c0ed76b3aff37c0aea8eb713923312ba23c
2017-08-10 12:44:58 -05:00
Volker E 581a247d70 Replace abandoned colors with current WikimediaUI ones
Replacing abandoned `@colorGray8` (`#888`) & `@colorGray9` (`#999`)
with slightly increased contrast, WCAG 2.0 level AA conformant,
`@colorGray7` from WikimediaUI color palette.

Bug: T172850
Change-Id: I750261b83cc79c32e9ccdb2d69bb5e396b20ed35
2017-08-09 17:49:35 -04:00
jdlrobson b7f7d9c351 Having 2 folders for browser tests is confusing.
This patch removes all unnecessary artifacts from the old Ruby tests.
LocalSettings is needed for CI purposes and can be removed once CI
has updated.

Bug: T164024
Change-Id: Ifec8bf2b3cd7d4db105c254248cdfcdf773472ef
2017-08-02 07:42:08 -07:00
Umherirrender 9a83d49ea0 Fix typo in word parser
Change-Id: I01f950621fda1388e1f8fcc79f217d1f639ac357
2017-07-28 17:44:09 +02:00
jenkins-bot 1da8158426 Merge "build: Updating mediawiki/mediawiki-codesniffer to 0.10.1" 2017-07-26 22:10:23 +00:00
Umherirrender 548392824d build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Change-Id: Ie05b9ddc3e351abf4b2b199529b714766055d161
2017-07-26 22:59:51 +02:00
Translation updater bot 4a9d05cedb Localisation updates from https://translatewiki.net.
Change-Id: I531c01465a83025baa323e8ac021da3b13294a81
2017-07-26 22:48:29 +02:00
Željko Filipin bdef261479 Remove all remaining Ruby code
Ruby was used only for Selenium tests, but they are now written in Node.js.

Bug: T164024
Change-Id: I27b589e4a263214e13e3bc0f1b934bc280901abb
2017-07-26 14:33:36 +02:00
jenkins-bot 51b9e835c6 Merge "Replace Ruby Related pages browser tests with node js version" 2017-07-26 12:19:14 +00:00
Željko Filipin a40cfcb134 Replace Ruby Related pages browser tests with node js version
Additional changes:
* Remove all Ruby artifacts
* Update eslint to allow es6 in tests

Bug: T164024
Change-Id: If6c8d32df042b831d52440963606a47c8ce7b552
2017-07-26 11:41:07 +00:00
Jdlrobson b9269e8284 Merge "Restore default MediaWiki codesniffer configuration" 2017-07-25 18:40:40 +00:00
Željko Filipin 4ffb75d6c8 ESLint should ignore vendor folder
On my machine `npm test` fails with a lot of ESLint errors for files in vendor folder. I guess mediawiki-vagrant creates the folder.

Change-Id: I5466ad8c490b39bef9a31f5442fecd2d11895b80
Depends-On: Ib7f0bd15dd0a9255e1e5140907e800478b658b92
2017-07-25 13:43:23 +00:00
Piotr Miazga 88c7a705e2 Restore default MediaWiki codesniffer configuration
Changes:
 - re-enabled all sniffs
 - fixed code to meet MW code standards

Bug: T170589
Depends-On: Ib7f0bd15dd0a9255e1e5140907e800478b658b92
Change-Id: Idb08a3e105226877804a84b120c70e5defa7398c
2017-07-25 02:46:46 +00:00
Translation updater bot 612d11b200 Localisation updates from https://translatewiki.net.
Change-Id: I585e1e3a56de028018adebb42d001966ee260cd5
2017-07-19 22:50:19 +02:00
jdlrobson f748c5907e Add limit via ResourceLoaderGetConfigVars
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
2017-07-14 16:42:53 -07:00
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