Commit graph

6510 commits

Author SHA1 Message Date
jenkins-bot 792b9dfc31 Merge "Add ability to run QUnit tests" 2014-08-05 18:45:29 +00:00
jenkins-bot fd6822fac2 Merge "Hygiene: More LESS cleanup in ext.echo.overlays.less" 2014-08-05 18:40:11 +00:00
jdlrobson 01b0f912f3 Hygiene: More LESS cleanup in ext.echo.overlays.less
Change-Id: I2d2daad00a11a156dc0ac693ea99322c9470cc6f
2014-08-05 11:37:43 -07:00
bsitu 4e63ee6164 Hygiene: Update method documentation & split exception to a file
Change-Id: Id77db0f21ee3fdaad4e040c853fadc605df212ea
2014-08-04 17:43:57 -07:00
jdlrobson bb6eef198c QA: Add some basic browser tests
yippee ki yay!
Tests basic functionality
1) presence of Echo button
2) behaviour of clicking Echo button

Change-Id: I6334264e1ee73a59da1e7b0c3f18a1d43b565f3a
2014-08-04 16:22:01 -07:00
jenkins-bot 091d1c9b52 Merge "Hygiene: Port all Echo css to less." 2014-08-04 20:49:38 +00:00
Translation updater bot 3c22ef1012 Localisation updates from https://translatewiki.net.
Change-Id: If6bb59767b11f50154dbd7c92232ca4aef47adf4
2014-08-04 21:53:53 +02:00
jdlrobson 430628ccc1 Hygiene: Port all Echo css to less.
No changes.
Makes styling code more readable.

Change-Id: Ie45f2cd3671bee5b88ba92ca2946d6e77cd59508
2014-08-04 11:43:27 -07:00
Erik Bernhardson 74a56e6fc4 Convert existing notifications to use user-locators
Replace implementation specific code with generalized user-locator
implementations that can be re-used by more notifications in other
extensions.

This patch adjusts the `user-locators` notification parameter to allow
arrays which facilitate passing options to the locator.

Previously(still works):

    'user-locators' => array( 'foo', 'bar' ),

New functionality:

    'user-locators' => array(
	'foo',
	array( 'bar', 42 )
    )

In the second example the callback specified by `bar` will receive
an EchoEvent as the first argument and array( 42 ) as its second
argument.

Change-Id: I7305279bc91d1e40e7054e2fd42a819a35526b82
2014-08-04 11:16:34 -07:00
Translation updater bot a0b7251741 Localisation updates from https://translatewiki.net.
Change-Id: I147db21bede9248a01477d371287e9a9005830a9
2014-08-03 22:09:05 +02:00
jenkins-bot cf418a4ecb Merge "Generalize a couple implementations of EchoGetDefaultNotifiedUsers" 2014-08-02 00:10:42 +00:00
jdlrobson 5b46130173 Add ability to run QUnit tests
Point out there are no QUnit tests :-)
Add .jshintignore file

Change-Id: I02635b8620dda0110c04549724f50f561c5657fe
Note: See also 69034
2014-08-01 15:55:22 -07:00
Kunal Mehta e25eb66a3a Support BasicFormatter::getLinkParams returning raw urls
In some cases like I7e309c04bc2456f4f87554a3d70dd6c77ba22f71 we
only have a raw URL and not a Title object. This supports that
usecase as well.

Change-Id: Ie18698e3ef755ca5a2cecc1f1cfb4254184bb576
2014-08-01 22:40:59 +00:00
Erik Bernhardson 71c7e02858 Directory reshuffle, add dev tools
* Port Flow Makefile to Echo
* Move resources to Resources.php

Change-Id: I75e96cc1e51a7768600ffc083550fc94ea9d1e6c
2014-08-01 22:38:41 +00:00
Translation updater bot 38243e21f5 Localisation updates from https://translatewiki.net.
Change-Id: I6da903f883787d92e10f87b2e95cd43d53a1f33b
2014-08-01 21:32:44 +02:00
Erik Bernhardson f995de90c8 Generalize a couple implementations of EchoGetDefaultNotifiedUsers
There are a variety of generic strategies you could define to choose
which users should be notified about an event, such as 'users watching
the title' or 'talk page owner' (User_talk only).

This adds a new way to generically implement these in Echo and expose them
to other extensions rather than having each extension implement these
generic strategies themselves.

This patch only converts one notification, edit-user-talk. The remaining
notifications will be converted in future patches. The first user of this
will be Flow for notifying all users watching a particular talk page in
I4e46a9c003fbdde274b20ac7aef8455eab4a5222

The users watching title implementation provided here is minimalist, a larger
refactor to accomidate pages with thousands of watchers is being handled
in I3d3fa9328f348bb48682d3658622952ce82d3925

Change-Id: I19bb6a794d22565f3bb5421de92426d390197796
2014-08-01 12:31:53 -07:00
jenkins-bot 1ba7583985 Merge "Introduce AttributeManager class" 2014-07-31 20:45:31 +00:00
jenkins-bot a2dcf255e5 Merge "Fix a function param in API" 2014-07-31 20:43:13 +00:00
Translation updater bot 97da12ad49 Merge "Localisation updates from https://translatewiki.net." 2014-07-31 20:21:02 +00:00
Translation updater bot cc131e14f1 Localisation updates from https://translatewiki.net.
Change-Id: I4023cf493c79806156f2666840e327317f0354b9
2014-07-31 22:15:32 +02:00
bsitu b26cc21794 static method should be declared with static
Change-Id: I855c09d950a44ae70b7d982e8c3e23b36dde1475
2014-07-31 13:10:35 -07:00
jenkins-bot c9ed159ea7 Merge "Clear up cached Main_page title in test" 2014-07-31 18:52:32 +00:00
bsitu 267a56398e Introduce AttributeManager class
This is a precursor to splitting notifications into
alert and message sections.

Change-Id: Ic685f7026ab9b41407b51317780bbfadd05bf9f1
2014-07-31 11:41:00 -07:00
bsitu 77239e17de Fix a function param in API
The distributionType is still passed to the function, it will
be arry of event types in next patch

Change-Id: Ieae7cfc383c2a024256f7e6b2f91d3b5c323f79b
2014-07-31 11:28:57 -07:00
jenkins-bot f94f24dbc0 Merge "Refactor ApiEchoNotifications preparing for alert/messages split" 2014-07-31 18:12:05 +00:00
jenkins-bot dc5f772bac Merge "Replace EchoBackend with mappers and gateway" 2014-07-31 18:11:44 +00:00
Erik Bernhardson 04f04f8db2 Refactor ApiEchoNotifications preparing for alert/messages split
Change-Id: If4a79a3c775070bcaed62b6330920f7d82c16f69
2014-07-31 18:11:42 +00:00
bsitu d3d99772b9 Replace EchoBackend with mappers and gateway
* Get rid of EchoBackend by separating responsibilities into smaller objects

* Move main fetchNotification logic from API to a more appropriate place

* Add more unit testing coverage

Change-Id: I42f4d7566543332588431c21c220c0d64d026b70
2014-07-31 10:29:52 -07:00
jenkins-bot eb774144b1 Merge "Revert "New hooks for external integration to notification intiialization"" 2014-07-30 21:58:40 +00:00
Translation updater bot d553edad0f Localisation updates from https://translatewiki.net.
Change-Id: I36d0a4f1830920d635f62c0d0f9795276bd0a51d
2014-07-29 21:54:29 +02:00
Antoine Musso 0dbff3bf16 Clear up cached Main_page title in test
In Echo tests/NotificationFormatterTest.php there is a test that ends up
invoking the Linker to create full URL for Main_page and pass it a
fragment.

Title::newMainPage() is really Title::newFromText('Main_Page') which is
cached.  Whenever the fragment is set, it stuck in the cache entry and
later call to Title::newMainPage() yields a Title object which has the
fragment.

That cause Scribunto tests (at least) to fail when Echo tests are run
before it because Scribunto tests expect a Main_Page title without a
fragment.

The ugly workaround is to have the Echo test to reset the fragment.

We could clear up the Title cache between tests though.

Bug: 68646
Change-Id: I625492fc8bf0dbd6e10275c3a728f5c1f85768c8
2014-07-29 13:56:28 +02:00
Translation updater bot 82b90a6c0e Localisation updates from https://translatewiki.net.
Change-Id: I6291322e36630c0980fdb2a0311cc423b8c80dff
2014-07-28 21:21:50 +02:00
Translation updater bot a31d3f6625 Localisation updates from https://translatewiki.net.
Change-Id: If2754dcfd87d7f4f38ef1ea5a279ee2eb308297d
2014-07-27 22:18:57 +02:00
Translation updater bot fc18ad5575 Localisation updates from https://translatewiki.net.
Change-Id: Ie5178410bfc26ecd14200151a327d79653f3877c
2014-07-26 21:47:34 +02:00
Legoktm a09d4cbaf5 Revert "New hooks for external integration to notification intiialization"
No usecase has been provided, and additionally the hooks
are not documented. Bartosz also points out that
mw.hook calls are asynchronous and memorized.

This reverts commit 9d3561afaf.

Change-Id: If735b46996fab3def835a54223412ef6d3105395
2014-07-26 01:05:35 +00:00
Translation updater bot eb71ab60f9 Localisation updates from https://translatewiki.net.
Change-Id: Ic3f882d74c5bb07128218eea00e836ecd4d3ec99
2014-07-25 23:04:31 +02:00
bsitu c3f02705b0 Fix incorrect variable name
Bug: 68552
Change-Id: Iddf620954c3709e7c03c0b06e0bf8f3d08df366b
2014-07-25 02:21:18 +00:00
Translation updater bot aed46b4f9f Localisation updates from https://translatewiki.net.
Change-Id: Iced35479862681c2bbb429c980acb415491f7715
2014-07-23 22:50:08 +02:00
Translation updater bot 17cc478cb5 Localisation updates from https://translatewiki.net.
Change-Id: Ie06b7ca5d8e2a88daf6121fd8c4a74bb72887ea8
2014-07-22 23:00:51 +02:00
jenkins-bot 65c43ff179 Merge "New hooks for external integration to notification intiialization" 2014-07-22 18:09:03 +00:00
Erik Bernhardson 9d3561afaf New hooks for external integration to notification intiialization
Adds two new hooks to allow extensions to tie into the notification
loading process.  Between these two hooks and the new isInitialized()
method any extension can run code whenever a notification is displayed.

Change-Id: If351835be5f65ca098e2d235ea8c8e4dc40ae2b4
2014-07-21 16:08:56 -07:00
Translation updater bot 88f2b9939b Localisation updates from https://translatewiki.net.
Change-Id: I503ec49cfc52559382b81d0c2a587f0c8100f57c
2014-07-20 21:07:48 +02:00
Translation updater bot 9ca30825ca Localisation updates from https://translatewiki.net.
Change-Id: I193ac4f181b675a3b577e925bccc05f26c4da26c
2014-07-19 22:03:28 +02:00
Translation updater bot fc37fcc9b6 Localisation updates from https://translatewiki.net.
Change-Id: I081d71a7156addd0e2ed193114cdeb059ddcf05e
2014-07-18 21:27:26 +02:00
Translation updater bot 84eee97e5d Localisation updates from https://translatewiki.net.
Change-Id: Ia50b32c03e384e8364e5663b40eb7793be553af3
2014-07-17 22:57:28 +02:00
Translation updater bot 45c8e7dd1a Localisation updates from https://translatewiki.net.
Change-Id: Ida72ac2dafc929d3fe3d5b7c9d3d9dc44aa7c5e7
2014-07-15 22:05:41 +02:00
Translation updater bot 036d6825a0 Localisation updates from https://translatewiki.net.
Change-Id: Iadeda6a0d86a97a746e8e7cc1fb2b3b4623d5932
2014-07-14 22:00:35 +02:00
Kunal Mehta f551656aa2 Remove EchoEvent::updateExtra, MWEchoBackend::updateEventExtra
Unused functions.
There is also no usecase for this, events shouldn't be altered
after creation except for bundling.

Change-Id: Id175c075d24263119f0455d99342263dd98f9410
2014-07-13 22:53:57 +00:00
jenkins-bot c71c80269d Merge "i18n: remove namespace-dependent part from "echo-pref-tooltip-mention"" 2014-07-13 22:51:35 +00:00
Kunal Mehta dd627ab22b Use localized group names for user rights changes
Bug: 55338
Change-Id: I738c2e8a8811d1bbcae03bd873bf5d076c83e8fd
2014-07-13 22:13:09 +00:00