Commit graph

676 commits

Author SHA1 Message Date
jenkins-bot 208cb50d33 Merge "Fall back to CirrusSearch's morelike: feature" into dev 2015-11-06 18:48:03 +00:00
jdlrobson e86fc3b159 Fall back to CirrusSearch's morelike: feature
When no related articles have been specified by an editor we instead
hit request pages similar to the current page using the CirrusSearch
extension's "morelike:" feature [0].

Changes:
* Config variable introduced RelatedArticlesUseCirrusSearch which allows
you to turn on use of the CirrusSearch API.
* Introduce a RelatedPagesGateway for dealing with making the API call
  and returning consistent results
* Move the "simple" API call for hydrating related pages fetched from
  the wgRelatedArticles configuration variable into RelatedPagesGateway
* Reduce the bootstrap module to just a bootstrap module!

Bug: T116707
Change-Id: Ia0ced1d7ae57c0939d1f5af275aa9d393f1420b1
2015-11-06 10:23:39 -08:00
Translation updater bot 44ef79949c Merge "Localisation updates from https://translatewiki.net." into dev 2015-11-05 20:48:13 +00:00
Translation updater bot 8ce9069106 Localisation updates from https://translatewiki.net.
Change-Id: I662b0c585a40492fc2750c5fb3df0b5155412a8f
2015-11-05 21:45:04 +01:00
Translation updater bot b7a579ca64 Localisation updates from https://translatewiki.net.
Change-Id: I9f3f17f8d99ddfc254465b9246ac6da0723d588f
2015-11-04 21:22:00 +01:00
jdlrobson 8f191de636 Release version 1.1.0
* Switch default branch to dev for future development

Bug: T117612
Change-Id: I404e412330f9416b863012b5125cbf4fc6d2b4ce
2015-11-04 15:08:10 +05:00
Translation updater bot 5e7dc73beb Localisation updates from https://translatewiki.net.
Change-Id: I21826b4e743666f17c61c67a7cc2ae57b909817c
2015-11-02 22:38:30 +01:00
Sam Smith 816003cb48 Tweak readMore.minerva to reflect upstream changes
As of I6a5b43a, WatchstarPageList requires that options.api be an
instance of mw.Api and fails, loudly, when it isn't passed.

Bug: T117467
Change-Id: I7394dea5ab026de1a6709c56d8db4ff72788b59d
2015-11-02 20:04:37 +00:00
Translation updater bot 697bd7dfec Localisation updates from https://translatewiki.net.
Change-Id: I55aa87bb257db68b52e7e4ba46ddb3c0fb71a4ca
2015-11-01 21:40:47 +01:00
jdlrobson e4685f02be mw.config.get doesn't work that way.
You can't give it a fallback value. This is causing JS errors in
production.

Bug: T116758
Change-Id: Ia459a42250ca6e030025781005e40204f1ede58e
2015-10-29 13:57:50 -07:00
Translation updater bot 72a06e4840 Localisation updates from https://translatewiki.net.
Change-Id: If5b9b60a89b2628661ef2d38bbedad31dcea0b5b
2015-10-29 21:25:53 +01:00
Translation updater bot 87e6fdaf47 Localisation updates from https://translatewiki.net.
Change-Id: I25f06c05cf0b3f89f9b21354d58fcc92c876320d
2015-10-28 21:55:24 +01:00
Translation updater bot 4e8dae3874 Localisation updates from https://translatewiki.net.
Change-Id: I1a1ca6fbaffbbe852640a82a66c6465bbff9fd52
2015-10-27 21:33:19 +01:00
Sam Smith 7c23636954 Add Related Articles section to Minerva
If the page has related articles, is in mainspace, isn't the main page,
and the output is being rendered with the MinervaBeta skin then a
"Related Articles" section is added to the page just before the footer.

Separate loading the information necessary to render the pages, choosing
the renderer, and rendering the data so that multiple skins - currently
Minerva and Vector per the mocks - not just multiple resolutions can all
be handled the same way:

* The bootstrap script (ext.relatedArticles.readMore.bootstrap/index.js)
  for fetches the page image and Wikidata description; loading the
  renderer module; and, finally, notifying the renderer module that it
  should render the data, which it does by emitting
  "ext.relatedArticles.readMore.init" event using mw#track
* The Minerva renderer subscribes to the event and, when it's fired,
  renders the data by passing it to the WatchstarPageList view

Bug: T113635
Change-Id: I651342bdf9796938fa7051828dd13bc6fe774783
2015-10-26 17:13:46 -07:00
Kunal Mehta 81fcc48fa9 build: Updating development dependencies
* mediawiki/mediawiki-codesniffer: 0.4.0 → 0.5.0

Change-Id: I92d28f0712b0a3447cc1dd0e2a8eac36e3a9916a
2015-10-23 15:32:25 -07:00
Sam Smith aa30f477bd Clear extension data in ParserClearState handler
While the related parser function sets the accumulated related pages as
extension data on the parser output
(see RelatedArticles\Hooks::onFuncRelated). The ParserClearState
handler, however, sets the empty list as a property, which is then
stored in the DB.

Changes:

* Make RelatedArticles\Hooks::onParserClearState use
  ParserOutput#setExtensionData, mirroring ::onFuncRelated
* Add a unit test for the the handler

Bug: T115698
Change-Id: I3deaf1e8ee78944250c3f26315ee2450b444a035
2015-10-16 20:33:52 +01:00
Sam Smith 45787910d3 Hygiene: Fix PHPCS errors
Also, add more detail to the
RelatedArticles\Hooks::onOutputPageParserOutput DocBlock.

Change-Id: I484ebfe255bc07a11d84f518014c8cc4f73f62db
2015-10-14 11:31:50 +01:00
Siebrand Mazeland 397146eab8 Update indentation to use tabs
Change-Id: Iaa7970fc03ef2182d8fbd68fb0ed8dabd2615e12
2015-10-13 08:45:44 +02:00
Kunal Mehta 1ab33e4886 build: Updating development dependencies
* grunt-banana-checker: 0.2.2 → 0.4.0

Change-Id: I94a118adc53612636eb362cd47da16049f9f4caf
2015-10-11 11:57:09 -04:00
jdlrobson 8782824cfc Remove CustomData dependency
Since CustomData was written ParserOutput now supports the setting
and getting of properties. This patch switches RelatedArticles to use
that. I'm not sure if any other extensions depend on CustomData but
it seems to have served its purpose.

Bug: T114915
Change-Id: I30bd17fd8c43422fe7ab6f58a74565674e15ba1d
2015-10-08 15:57:44 -07:00
Sam Smith 7995ce4a42 Use extension registration
Add extension.json and populate it with information from both
RelatedArticles.php and the RelatedArticles extension wiki page [0].

Migrate the hook handlers to static functions operating on static data
rather than having a single, global instance of RelatedArticles so that
the hook handler definitions can be added to extension.json easily.

N.B. During testing the handlers for both the SkinBuildSidebar and
SkinTemplateToolboxEnd appeared to have the same effect so the TODO was
removed but not the handler for the former.

Additional changes include:

* RelatedArticles.class.php -> includes/RelatedArticles.php
* RelatedArticles -> RelatedArticles\Hooks
* Documenting all of the methods of RelatedArticles\Hooks

[0] https://www.mediawiki.org/wiki/Extension:RelatedArticles

Bug: T87965
Change-Id: I9944b9186746386ee18ca28657bb547c00ae2b8c
2015-10-07 15:54:07 +01:00
Sam Smith cd055fde89 Add extension boilerplate
Copypasta the following files from the BoilerPlate extension [0]:

* package.json
* Gruntfile.js
* .jscsrc
* .jshintrc
* .jshintignore
* composer.json
* phpcs.xml

Add the following supporting files:

* .gitignore
* composer.lock

Finally, fix the existing coding standard violations.

[0] https://github.com/wikimedia/mediawiki-extensions-BoilerPlate

Change-Id: I30c6cf9e0a637bab5d8f47790b9af57183b6e6fb
2015-10-07 15:48:26 +01:00
Kunal Mehta 426422bc96 build: Configure banana-checker and jsonlint
Change-Id: I7d0f6571baf2eef4948db8faea4a97bae0246641
2015-06-19 22:13:04 -07:00
Translation updater bot 43865c8c22 Localisation updates from https://translatewiki.net.
Change-Id: I917d83e3486eba395ddcdac13b7446556dfd5a64
2015-03-23 22:05:14 +01:00
Translation updater bot f62a0835a0 Localisation updates from https://translatewiki.net.
Change-Id: I13fcdd8501b17e773682e6671b429a4dfa26ae14
2015-03-10 22:36:09 +01:00
Translation updater bot b29ebfc4ee Localisation updates from https://translatewiki.net.
Change-Id: I0a1453f210b898e562554f3bce3996b9d19ed641
2015-02-26 21:37:55 +01:00
Ori Livneh 3f33253077 MWException -> Exception
Change-Id: Icd77d1168c007b2d101bfd7e458a7bf1a794e2cb
2015-01-09 19:02:19 -08:00
Translation updater bot 63d2f0f1c4 Localisation updates from https://translatewiki.net.
Change-Id: I771a931a0cecaaa075b901b91fbcc6022969bf52
2014-12-20 22:27:01 +01:00
addshore ebdbab72fa Use public instead of var in classes
Change-Id: I99174cfce792dcd5bc22134950de7303b11fd0ea
2014-08-17 22:11:00 +01:00
Translation updater bot 0f9e51b909 Localisation updates from https://translatewiki.net.
Change-Id: Id0a46b8b8d04850e32c2d45654b6e214f2164208
2014-07-23 22:52:08 +02:00
Translation updater bot 6b455b52c9 Update i18n shim
A performance issue was fixed in the shim(s) generated by
generateJsonI18n.php, so it needed to be updated.

Change-Id: I309d6ffcc739a8f547c9c2ff2d0f6042745f02c7
2014-04-22 13:39:31 +00:00
Translation updater bot a7823d5665 Localisation updates from https://translatewiki.net.
Change-Id: I6a9758e5b60cdd878e0b4ccc8a6d8f125a4984de
2014-04-16 18:14:09 +00:00
Translation updater bot ee2a5d9c66 Localisation updates from https://translatewiki.net.
Change-Id: Ib333a1fac7351cf0f07bfeb63362bdfeb153b0fb
2014-04-09 19:40:00 +00:00
Siebrand Mazeland 09f973f56a Migrate to JSON i18n
Procedure per https://www.mediawiki.org/wiki/Manual:GenerateJsonI18n.php
with shim.

Change-Id: I4a71a12bebd4546e26d76f09e121ff38950074c6
2014-03-28 21:44:00 +01:00
Translation updater bot 206b558f90 Localisation updates from https://translatewiki.net.
Change-Id: I5c569a12b53645c1da1846b2ec012a02ebe71c8c
2014-01-28 21:21:41 +00:00
Translation updater bot 7ebe52965a Localisation updates from https://translatewiki.net.
Change-Id: I1689314755d228334154faf94e550ef1fe5142d3
2013-12-07 01:48:01 +00:00
Translation updater bot 1a0cc39a83 Localisation updates from http://translatewiki.net.
Change-Id: Ide0d3bf5b40f78c69d5f47bb73a5a394de8972d6
2013-11-11 20:19:43 +00:00
Translation updater bot 10cb1fcbda Localisation updates from http://translatewiki.net.
Change-Id: I8b02bda7399e72a802e384917935e164266bcc9b
2013-11-03 19:57:55 +00:00
Translation updater bot 36c918b85e Localisation updates from http://translatewiki.net.
Change-Id: Ia58073e3fa0064e710db3aadc4eedf8012f65d1a
2013-09-29 20:12:59 +00:00
Translation updater bot f709547818 Localisation updates from http://translatewiki.net.
Change-Id: Ibb79345c0721f358e2516bf40a723efd430779c6
2013-08-25 20:05:40 +00:00
Translation updater bot 19ce7d3228 Localisation updates from http://translatewiki.net.
Change-Id: I2ab07b67bc165de8e88fc9ca70fc69d34238e935
2013-08-18 19:39:33 +00:00
aude 91603a43eb (bug 51870) fix html in toolbox for related articles
issue with the bug is that the ULS cog wheel appears
in the wrong place, among fixing some other details.

Change-Id: I4a655d94f9f7be8e082d20b07ca1113525c56ef8
2013-07-26 12:27:03 +00:00
rillke f9bae4a9bd RelatedArticles: Heading level in sidebar: h5 to h3
The heading level in the sidebar needs to be changed because it also
changed in core.

Bug: 51625
Change-Id: I094182c3e7f94a68c96726bd3e26ad7c3690fe9f
2013-07-18 19:50:08 +02:00
Translation updater bot ad7abd6e6c Localisation updates from http://translatewiki.net.
Change-Id: Ica8fced44c5f3967119273b24ef91191e4ebae44
2013-07-11 19:14:13 +00:00
Translation updater bot 1d968ddce3 Localisation updates from http://translatewiki.net.
Change-Id: I91446c0b793a6954c75c390db3f18858cadd8016
2013-06-03 11:53:15 +00:00
Translation updater bot ce7f3d6278 Localisation updates from http://translatewiki.net.
Change-Id: I60e96428506e712b0f00c2498ede303b63641097
2013-04-07 20:55:38 +00:00
Translation updater bot d669e18453 Localisation updates from http://translatewiki.net.
Change-Id: I32df5ffec62c3cc03c6a3d16bf15b6279e0ca745
2013-02-18 20:58:42 +00:00
Translation updater bot 9256b30d53 Localisation updates from http://translatewiki.net.
Change-Id: I8a80c911554173fc9c9601ff46d253f5188cdcbd
2013-02-16 23:20:43 +00:00
Translation updater bot 1754b475b1 Localisation updates from http://translatewiki.net.
Change-Id: Iee864dece13561e9210696b98d7fafc65c88989a
2013-02-12 20:26:44 +00:00
Translation updater bot 67736e053a Localisation updates from http://translatewiki.net.
Change-Id: I76913f0b9224b8b3074834d835fc7c30df7e694d
2013-02-11 20:23:26 +00:00