Commit graph

339 commits

Author SHA1 Message Date
jenkins-bot e6e507a9ee Merge "Use db-replicated objectcache for storing last seen time" 2015-09-02 22:50:43 +00:00
jenkins-bot da6544e275 Merge "Split alerts and messages in Echo" 2015-09-02 22:50:40 +00:00
Kunal Mehta 35c4a37918 Use db-replicated objectcache for storing last seen time
So we're not abusing user preferences for the last seen time.
EchoSeenTime is a small wrapper around ObjectCache that handles the
fallback to user preferences during the transition.

All JavaScript code now needs to use mw.config.get('wgEchoSeenTime').

Bug: T95839
Change-Id: Ia45ba5e30eb4564250539d04d5886d2598ebd49a
2015-09-02 22:42:35 +00:00
Moriel Schottlender 1ac72cc01a Split alerts and messages in Echo
Split the notifications into 'alert' and 'message' badget with two
different flyouts. Also clean up styling and module behavior.

** Depends on ooui change Id4bbe14ba0bf6c for footers in popups.
** Depends on ooui change Ie93e4d6ed5637c for fixing a bug in
   inverted icons.

** MobileFrontend must also be updated to support the new modules
   in this patch  I168f485d6e54cb4067

In this change:
* Split notifcations into alert and messages and display those in
  two different badges.
* Create two separate flyout/popups for each category with their
  notifications.
* Create a view-model to control notification state and emit events
  for both the popup and the badge to intercept and react to.
* Clean up module load and distribution:
  * Create an ext.echo.ui module for javascript-ui support and ooui
    widgets.
  * Create an ext.echo.nojs module that unifies all base classes that
    are needed for both nojs and js support, that the js version
    builds upon.
  * Create a separate ext.echo.logger module as a singleton that can
    be called to perform all logging.
* Clean up style uses
  * Move the special page LESS file into nojs module so all styles
    load properly even in nojs mode.
  * Transfer some of the styling from JS to LESS for consistency.
  * Make the 'read more' button load already with the styles it
    needs to look like a button, since its behavior is similar in
    nojs and js vesions, but before its classes were applied only
    by the js, making it inconsistent and also making its appearance
    'jump' from a link to a button.
* Delete and clean up all old and unused files.
* Moved 'Help.png' icon from modules/overlay to modules/icons for
  later use.

Bug: T108190
Change-Id: I55f440ed9f64c46817f620328a6bb522d44c9ca9
2015-09-02 15:36:37 -07:00
Aaron Schulz 854aae01c8 Defer clearTalkNotification() updates as they often happen on GET requests
Bug: T92357
Change-Id: I3c5aca7748675a62c3f4a48ac53f14002eda95ac
2015-08-26 16:31:58 -07:00
Kunal Mehta 064c1f1514 Load only the EchoInteraction schema client-side
The other schemas are not used client-side, just server-side.

Bug: T105220
Change-Id: I5e5e7b01998cee38693c9f5e22da6e86a5e13e96
2015-07-08 13:17:35 -07:00
Kunal Mehta 4d8b977ff9 Get rid of disabled 'echo-notify-show-link' preference
This preference has been disabled since bug 47562, and doesn't make
sense to keep around given that the flyout is the main interaction most
users have with Echo.

Change-Id: I7e8ddf96dbde9a95ac01a0cc83bad396151d01bd
2015-07-07 17:10:49 -07:00
Alex Monk 6b5a76939b chmod 644 a few files
Bug: T104721
Change-Id: Iee1ef18d3227807110d4e25f0c48f17907adf8ad
2015-07-03 19:31:15 +01:00
Kunal Mehta 23f877fe76 Remove unused 'echo-error-preference' and 'echo-error-token' messages
They stopped being used in 08fc83b6de.

Change-Id: I439d15e6c894b7358ee8add0d9c882eb791909c4
2015-06-24 09:41:20 -07:00
Kunal Mehta 1298f2bb74 Don't hook into ourselves: EchoGetNotificationTypes (part 2)
Change-Id: I51600bbb26594323831d22bc35d34587ff146d47
2015-06-15 17:43:54 -07:00
Kunal Mehta df452abbb6 Don't hook into ourselves: EchoCreateNotificationComplete (part 1)
Change-Id: I5f0f3929a3b0396c98e0f3e74b69ddcee744a0e8
2015-06-15 17:41:10 -07:00
jenkins-bot e6ffb55eaf Merge "Use "elseif", not "else if" in PHP" 2015-06-02 01:01:54 +00:00
Kunal Mehta 4d52bc2534 Use "elseif", not "else if" in PHP
Change-Id: I3a84f1c3ec9d4522f5f7f461a680561c8aeda29e
2015-06-01 17:59:05 -07:00
Kunal Mehta 70761a124c Cleanup LoadExtensionSchemaUpdates hook
* Use standard "on{hook}" naming pattern
* Skip hook if using an external database server ($wgEchoCluster)
* Don't return true, it's not necessary anymore

Change-Id: I488e4636f9499c468b870966614b0762c2ade8ea
2015-06-02 00:55:54 +00:00
Kunal Mehta c2258dd7ce Kill $wgEchoCohortInterval
The Echo cohort study was finished in July 2013 and hasn't been used
since. The code was also checking in reverse order, for example it
checked registration before checking whether the survey was still
active.

EchoHooks::isEchoDisabled() was removed, and all callers were checked to
make sure they were also checking for anonymity.
EchoNotificationController::doNotification() will throw an exception if
the user is anonymous, since it shouldn't be possible to get an
anonymous user into that code path.

Bug: T101047
Change-Id: Iada2f6d2066c0f6bba5cc58aeb03d687632ac5a4
2015-06-01 17:53:29 -07:00
Kunal Mehta 94dd86f255 Simplify registration of EventLogging modules
Let EventLogging register the schema modules by using the
EventLoggingRegisterSchemas hook.

Don't modify $wgResourceModules at run time because that's a hack.
Instead register the module in the ResourceLoaderRegisterModules hook
itself.

Change-Id: I9457546c1ec38cf6896fe6f9f445fe1191afe72a
2015-06-01 11:58:37 -07:00
Kunal Mehta 1d4bf45d88 s/wfRunHooks/Hooks::run/
Change-Id: If26de025b0510027c8f1ba514a797c343a575d78
2015-06-01 11:36:35 -07:00
Aaron Schulz 02f618d620 Use DeferredUpdates::addCallableUpdate for generateEventsForRevision
* This diff part of this logic is fairly slow

Change-Id: Id9af5c18f852ba7f1c0d2b53257fe11cb87fc510
2015-05-18 12:59:36 -07:00
Matthias Mullie d150625ce1 Until seentime is recorded, we should treat notifications as unseen
Since we didn't use to save seen time, it is unreliable at first.
I decided to just show them as read then, since we couldn't know
if they had or hadn't been read.
However, it would make more sense to keep them unread until we first
save the time a notifiation is seen: it is in line with the current
behavior (where the badge just stays red, always)

Also fixed a problem where I meant to .get a value but had .set
instead. It wasn't noticable because that function is currently
only called when things have just been seen, so even though it
was wrong, it produced a good result.

Bug: T94634
Change-Id: I7ee447249527feb3914c76cfffd673bbda062b75
2015-05-06 10:53:45 +02:00
Matthias Mullie da07893647 Display red badge based on time of notifications vs last time panel was opened
I tried to stick as close to the existing code as possible.

Special:Notifications is slightly different from the overlay,
however. I made it add .mw-echo-unread class for consistency,
but that JS doesn't record seen time (it only loads older
entries), not does the CSS fadeout apply there (it marks
everything as read as soon as it's displayed, so different
behavior from overlay)

PS: I'm not sure about browser compat for the fadeout. But
even if some obscure browsers don't support this, meh. It's
not an "important" feature that can't be missed.

Bug: T94634
Change-Id: Ibb201823fb52ef8a3d5eaa39b0b724ede8d271d1
2015-05-01 11:39:45 -07:00
Tony Thomas 89b88ce61f Unreachable code in Echo hooks
Removed function EchoHooks::getDefaultNotifiedUsers

Change-Id: I5a2d219c3daea87705776f76744a8e7753e01fac
2015-04-20 21:51:23 +05:30
Erik Bernhardson 70639162f3 Allow multiple target pages per event
Bug: T85064
Change-Id: I338f3d73efb98a3bb66ef64fdeeb66e752a453c2
2015-03-31 07:56:52 +00:00
Erik Bernhardson 80ddd5549b Read revision from master when determining notifications to send
Bug: T93333
Change-Id: Ie41184f522f32835d278f69bc785ec71fddecc03
2015-03-21 02:57:06 +00:00
Timo Tijhof d833b09532 Update mock wgEchoConfig to also run on Special:JavaScript/qunit/plain
Follows-up 8d12ef9.

Tests were failing because wgEchoConfig was undefined and ext.base.js
accesses wgEchoConfig.eventlogging.

This mock should not be needed. Modules should be loadable at any
time and react to the current environment. If they should not do
anything, the client should be able to determine that. Perhaps
an isAnon() or some property wgEchoConfig to indicate this.

It only being loaded from beforePageDisplay() when logged-in is a
load optimisation, not business logic. wgEchoConfig should always
be there, or the code should handle the case of it not being there.

Change-Id: Ide90adf20e583921c9f3bd5cd37057995aa3d2c3
2015-03-21 02:47:47 +00:00
Ori Livneh ef502ed0ef Test if 'EventLogging' class exists, rather than deprecated function
efLogServerSideEvent() is deprecated and will be removed soon.

Change-Id: I79969b443e59a36a6d92ad33b3df98fb21f7f3b6
2015-01-07 10:27:52 -08:00
Kunal Mehta c2c3aba65f Capitalize class name properly
Change-Id: I980062dee776a2653ab74d392731af01b81889bc
2014-10-24 12:16:37 -07:00
Kunal Mehta fae2556494 Add UserMerge support
Depends on Id1726673 in UserMerge to allow specifying
a custom database object to use.

Bug: 67766
Change-Id: Iceb4b8d2fd53c50ed00a4aab9bc374f4bb716466
2014-10-17 10:08:59 -07:00
jenkins-bot f09f11d679 Merge "There is no welcome notification" 2014-09-02 07:34:24 +00:00
bsitu 2d38a4c8a8 There is no welcome notification
Bug: 70139
Change-Id: Ice565a23073dac0c39d61801cad34c9c9419b2dc
2014-08-28 14:29:45 -07:00
bsitu db218b9e1f Set UnitTestsList hook run against files inside tests/phpunit
All php unit tests are inside this directory

Change-Id: Ib5ac7c31bf08e68dbc5f66b9fb06e150569e7104
2014-08-22 17:39:00 -07:00
bsitu cac4050990 Mark notification as read upon visiting a page
Change-Id: I84493fbf742acd90645d484d42f049796a5e48ee
2014-08-14 14:10:55 -07:00
jenkins-bot f001382328 Merge "Add TargetPage model and mapper to notifications" 2014-08-14 20:18:44 +00:00
Bsitu 483e7e80d5 Revert "Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs""
This reverts commit b9574748a4.

Change-Id: I8a8334db446dd6a2d5363a1f6ab12369b813b026
2014-08-14 18:46:26 +00:00
EBernhardson b9574748a4 Revert "Merge remote-tracking branch 'gerrit/master' into two_tabs"
This was supposed to merge master into the two_tabs branch, but it was accidently done against master instead

This reverts commit 06ee936e92.

Change-Id: I98da735b7d5c103399a2478286d1420243df6ba4
2014-08-14 18:27:19 +00:00
bsitu 029668423d Add TargetPage model and mapper to notifications
This will be used for marking a notificaiton as read when
a user visits a target page. The new table should keep the
volume as low as possible for fast data loopup. records
should be removed from the table once it's marked as read.

Change-Id: I605cbc79adfc12d22bd889c5bb513d05c479fe6e
2014-08-13 00:48:07 +00:00
bsitu 180a67c4a7 Hygiene: Add sub-directories to phpunit test
Change-Id: Ie5bb127f1ba36bd799f87535b14cd3712ad08a3c
2014-08-12 22:54:45 +00:00
Florianschmidtwelzow ffd082b738 Remove qunit tests from mobile
ext.echo.overlay isn't loaded in mobile, so don't load the test in
mobile.

Bug: 69316
Change-Id: Iddd68aca84c69bed10a2afe4aea8463890485e26
2014-08-09 02:06:46 +02:00
Kunal Mehta 631d0252f7 Fix Echo breaking
Bug: 66992
Change-Id: I7add48c55e04ef4ea5d0f537c6a1a1ba959f628e
2014-08-08 21:35:58 +01:00
jdlrobson 0ff4295a88 Hygiene: Move the overlay initialisation code into a separate file
Change-Id: I4dcdf9708b700c57679ff878275c5560a62e3a06
2014-08-06 20:29:35 +00:00
jdlrobson 8d12ef9a80 The first ever Echo QUnit tests
Also change coding conventions of Resources to allows use
array for scripts key.

Change-Id: I0c9f358ce3eb62adb07b68623e97c07993c9c45c
2014-08-06 13:26:42 -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
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
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 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
physikerwelt 784ae6f5b9 Fix: getUnitTest does not add test files
While running php phpunit.php --tap --testsuite extensions
in vagrant the unit tests for the echo extension were
not added to the file list.

See also
Bug: 67148

Change-Id: Id78580b4c13bbc3428727c23f1fe3e493ec127ec
2014-07-02 15:52:18 +00:00
Max Semenik 1dd635a773 Add ParserTestTables hook handler
Otherwise, it explodes when trying to run tests via PHPUnit:
Error: 1146 Table 'osmiumwiki.parsertest_echo_notification' doesn't exist (localhost)

Change-Id: I8a3e0171ab022e8e2973ea8bed9aacba73a35f34
2014-06-25 18:06:09 -07:00
Thiemo Mättig e205992d0b Remove unused code and fix missing/broken documentation
General code cleanup as reported by the PHPStorm static code
analysis. I hope it's not a problem that I made a lot of very
different (but all very tiny) changes in a single patch. If you
want to merge this but you think it's better to split it into
several patches first, please tell me.

Change-Id: I2e2c4bb47f8d20e038d28e236e2ff813b30504af
2014-06-04 04:54:00 +00:00
bsitu bc57eb7535 Prevent double email notifications on talk page edit
If a user is watching his/her own talk, an edit to the talk page
may trigger an echo notification and watchlist notification.  We
only want to send one of them

Depends on core patch: https://gerrit.wikimedia.org/r/#/c/114682/

Bug: 53569
Change-Id: Ib1bb71e047789d3a857f028aaa45384022bb35c7
2014-03-14 14:05:49 +00:00
Kunal Mehta 1ea7332cc1 Remove dependence upon $wgPasswordSenderName
Fallback to 'emailsender' message if not set

Change-Id: Id136692b80b7582a515501672259394e8db74112
Follows-Up: Id20e4ec1cdae94fadb278146cd72d5a9b247dccf
2014-02-24 22:09:27 -08:00
Kunal Mehta e35e071e0b Remove namespace restriction for mention notifications
This is unlikely to cause issues since a signature is
still required.

Bug: 55491
Bug: 56311
Change-Id: Ice51ae05b581b98f1d8a90104e1707c3a590b39d
2014-02-21 21:06:05 -08:00
Kunal Mehta 1240492018 Add new messages indicator from a hook
So it works for users without JavaScript

Bug: 56974
Change-Id: I0652a740ca7156257d4459931d80872877339c0d
2014-01-12 03:31:46 +00:00
jenkins-bot 226ee86496 Merge "Only run onUserSaveSettings hook if not in update.php" 2013-12-17 20:49:52 +00:00
jenkins-bot 9450b4add6 Merge "Check supposed revision being reverted is on the same page" 2013-12-17 20:27:42 +00:00
Kunal Mehta 9f7d409c10 Only run onUserSaveSettings hook if not in update.php
Depends on I57a47661f2069efb91340db8188be92d4efb23e9 in core.

Bug: 57335
Change-Id: I4cf977ee4e0dfd5c564334481e9ae2f6bca85b61
2013-11-29 16:56:54 -08:00
Krenair c0b6a0b6ae Don't send rollback notification if nothing changed
Bug: 56574
Change-Id: If727161560ee07482293e8c012b8ba90bb5df505
2013-11-23 06:36:56 +00:00
Kunal Mehta 6ee8570c80 Check supposed revision being reverted is on the same page
Bug: 57474
Change-Id: Idec054930dd20a01ec9d5132cce25378914629fc
2013-11-22 22:20:45 -08:00
Kunal Mehta 86ce24c6d6 Actually run all the unit tests.
Change-Id: Ia411cc32f0d0ac17ce43cbe20be17773cad055a7
2013-11-01 04:31:12 +00:00
Kunal Mehta 8f77ba2028 Remove duplicate "global $wgUser"
Change-Id: I857d09ba3a115a4e042d4c95550ac77f0211c34f
2013-10-20 01:29:00 -07:00
jenkins-bot 1bb1e9ff73 Merge "Remove Echo preference change eventlogging" 2013-09-04 18:09:58 +00:00
bsitu b85615da7e Tooltips in preference page get double-escaped
bug: 53112
Change-Id: Ic39c807506334c3c5d8251384314c09ae96b3c3a
2013-08-20 13:39:05 -07:00
jenkins-bot 347cdf3247 Merge "Revert "(bug 51640) wgUserNewMsgRevisionId is null with only one rev"" 2013-07-30 20:47:16 +00:00
Bsitu 63c1d25d3a Revert "(bug 51640) wgUserNewMsgRevisionId is null with only one rev"
This reverts commit b9e5b2f64a.

Change-Id: I64cd03dd0789f482221f8f38bbf9a034025e45f9
2013-07-30 20:45:03 +00:00
bsitu 2c74f66f18 Add HTML email support to Echo notification
To test the HTML email:

1. install the latest version of php-mail and php-mail-mime package, they are required
   by the core sendmail function to send HTML email
2. set $wgAllowHTMLEmail = true before loading Echo in LocalSetting.php

Change-Id: Ia4b98b14e135742b84f1b0e04589b0efdd24e954
2013-07-23 13:20:33 +02:00
bsitu b9e5b2f64a (bug 51640) wgUserNewMsgRevisionId is null with only one rev
wgUserNewMsgRevisionId is null with only one revision and that revision is
not viewed, this makes it not reliable for determining if there is new
message.  We just switch to check against $user->getNewtalk() instead.

We can still use wgUserNewMsgRevisionId to generate diff links if desired

Change-Id: I4cf50a944aada03151bd17f3610bd59b3bfb2bf2
2013-07-19 11:50:43 -07:00
Krenair 41b72e25fc Don't trigger event when user rights change is cross-wiki or global
Bug: 51418
Change-Id: If962ed70d1c29668d676ab378916db4afb7eb14a
2013-07-16 19:53:16 +00:00
kaldari e8df780d9a Remove the feedback link from the flyout - no longer needed
Change-Id: I0531fdd126c3030097b5485b1140c66fc6306ae0
2013-07-06 00:48:29 +00:00
bsitu 0cb48219cc Remove Echo preference change eventlogging
Echo preference change is already captured in the general
preference change eventlogging, this is just a duplicate

Change-Id: I49cd2ad5776a670e2cd28414e156f5201087ded0
2013-07-03 11:55:44 -07:00
Erik Bernhardson 34fbeaf8c9 Respect revision suppression within Echo
Update the echo formatter to properly display suppressed revision content

Bug: 48059
Change-Id: Iee3c9a41ad24c66b0e2abdd5f1375ebdbd74314e
2013-06-18 11:00:50 -07:00
Erik Bernhardson 052a4818f6 Rename index for sqlite support
SQLite requires unique index names across the full database.  A previous
patch I9b6468221ba6fe501b15c563f3301694262eec65 renamed the index in
echo.sql but forgot to apply the same change to existing databases. This
resolves that mistake.

Change-Id: Ibb629149afd9f4ca55cac613124fce42500aa8f9
2013-06-14 13:14:21 -07:00
Erik Bernhardson 68a4587460 Repairs necessary for echo to support Sqlite
Sqlite's lack of an 'ALTER TABLE CHANGE' statement has prevented echo from
supporting sqlite, and by relation has prevented Echo's unit tests from
running within the foundations jenkins CI environment.  This patch detects
if the database is currently an sqlite database and applies a specially
formulated patch that performs a rename/copy/delete operation to get
the equivilient of an 'ALTER TABLE CHANGE' command. Additionally renames
one index to have a more unique echo-specific name.

Bug: 41987
Change-Id: I9b6468221ba6fe501b15c563f3301694262eec65
2013-06-13 14:34:33 -07:00
jenkins-bot dc6e8394fc Merge "Add clickthrough eventlogging to Echo" 2013-06-11 17:53:00 +00:00
bsitu 6ffc1cac4b Add clickthrough eventlogging to Echo
Change-Id: I3d05d1aeca92f9a0265a522cc5027ae18394c5b4
2013-06-11 10:46:41 -07:00
jenkins-bot 8d358ac16b Merge "(bug 49142) Notifications Productivity A/B Test" 2013-06-11 00:24:23 +00:00
jenkins-bot fea4484b68 Merge "Database updates for respecting oversight within Echo" 2013-06-11 00:01:02 +00:00
bsitu 7c19d0243f (bug 49142) Notifications Productivity A/B Test
Change-Id: I209a55bc78fc307603710296b75ebe774ebdcbac
2013-06-10 15:22:27 -07:00
Erik Bernhardson f38ce97efd Database updates for respecting oversight within Echo
Provides the first step of adding and populating a new database field
for Echo oversight deployment.  The new field is populated via a
maintenance script and Event::loadFromRow will accept both new and old
results.  Everything will still run when the 2 now unused fields are
later dropped from the db.

Bug: 48059
Change-Id: I24d4b61a061f94ed9aaaa6087f33b2ab37f773cd
2013-06-10 14:52:18 -07:00
bsitu 7862266326 $wgOut->getContext()->getTitle() may return null
We should just check if it's null before using it as a title object

Change-Id: Ieaf7adb3fccc62c79a6eaad5650840cc5411873e
2013-06-06 13:46:52 -07:00
jenkins-bot 64159dade0 Merge "(bug 47912) Visiting talk page should mark talk notif as read" 2013-05-30 18:46:37 +00:00
bsitu 71f250e0c6 (bug 47912) Visiting talk page should mark talk notif as read
This needs some more manual testing and adding unit testing

Change-Id: Iadfe3cf7927d5318f89ba17f067000f9399060af
2013-05-29 20:43:57 -07:00
Erik Bernhardson aaaa177f2f Tooltips for echo notification settings
Bug: 47094
Change-Id: I3556aafe90d5f9a42f0774e783adb06991bc5088
2013-05-29 16:13:12 -07:00
jenkins-bot d2702cb1e9 Merge "Adding explicit prefix so we don't have to have an exception in prefs" 2013-05-23 17:51:23 +00:00
jenkins-bot 3b96815e40 Merge "Switch to using our own badge instead of jQuery.badge" 2013-05-23 17:42:47 +00:00
kaldari f9481040d5 Switch to using our own badge instead of jQuery.badge
With this change we will no longer be relying on JS for the badge
functionality. This will prevent the flash of unstyled content,
and allow wikis to locally override the styling (since the unread
class is now applied immediately).

I also went ahead and made the badge styling more closely match the
talk page message alert styling per Vibha.

Also removed the old full link optional behavior since we weren't
using it, and it would have been a pain to maintain.

Bug: 48165
Bug: 48001
Change-Id: Ie85d66afd5181d487d0bb2776ae14b121ea50d88
2013-05-23 10:34:47 -07:00
kaldari 9f77b4ab3e Adding explicit prefix so we don't have to have an exception in prefs
If we add an explicit prefix (similar to what the Gadgets extension
does), we won't have to have a special handler for checkmatrix options
in Preferences::filterDataForSubmit().

Depends on core change I4049b666

Change-Id: Ic8420b896bc013840eb3a32420a49f6719f30610
2013-05-22 13:19:08 -07:00
jenkins-bot f997fda13a Merge "Add EventLogging to capture Echo preference change" 2013-05-22 00:46:55 +00:00
bsitu 5602daa277 Add EventLogging to capture Echo preference change
Change-Id: I14cee0bf2e04cc24196b9aa30baa3253c9989463
2013-05-21 17:33:43 -07:00
jenkins-bot 8206dd0980 Merge "Disable unavailable notification checkboxes" 2013-05-17 00:33:58 +00:00
kaldari 383a81811d Adding new talk page message alert for logged in users
Includes new ext.echo.alert module and new preference

Change-Id: I7a4e78b033aa5e1ea18d1bfa2b6b0187930a6611
2013-05-14 10:39:49 -07:00
jenkins-bot ceba6083ad Merge "Add new EventLogging schema: EchoMail along with code refactor" 2013-05-14 00:48:21 +00:00
jenkins-bot c1b200aee7 Merge "Make Echo talk page notification rely on enotifusertalkpages" 2013-05-13 23:25:17 +00:00
bsitu a0de3295a8 Make Echo talk page notification rely on enotifusertalkpages
Instead of introducing a brand new option for this notification, we just
use the existing enotifusertalkpages

Change-Id: Ia63c9b1f4f52007004fa2860115b675aae4872fa
2013-05-13 15:39:02 -07:00
bsitu 97e5e0a92b (bug 48304) Add 'Feedback' link to the Notifications flyout
Change-Id: I86e7b5e6762557743752e433a6e2a007596b1891
2013-05-09 16:13:38 -07:00
bsitu ce78c973f3 Add new EventLogging schema: EchoMail along with code refactor
Change-Id: I7f9ec99d27b69abb14aa89540e424f1e0bcd8160
2013-05-07 16:59:24 -07:00
ebernhardson f6209be60a Disable unavailable notification checkboxes
Updates usage of HTMLCheckMatrix to match recent refactor allowing
options to be forced on or off.  Instead of hiding unavailable
checkboxes now we show them greyed out and unchangable. Depends on
https://gerrit.wikimedia.org/r/#/c/61163/ in core.
Bug: 47743

Change-Id: I9284a2ad29de654062e54a78a76c10dd49c35ed7
2013-05-07 10:25:35 -07:00
jenkins-bot bdb4038ceb Merge "(bug 47910) Minor edit should not trigger talk page notif" 2013-05-06 20:50:36 +00:00
bsitu f47349e303 (bug 47910) Minor edit should not trigger talk page notif
This patch makes Echo talk page notification mimic the existing Orange Bar and Email talk page notification
for minor edit.

For the Orange Bar, minor edit notification is sent if the editor does not have nominornewtalk
permission.

There are additional rules for the email, minor edit notification is sent if global $wgEnotifMinorEdit
is true and notification recipient has enotifminoredits option on.

Change-Id: Ib3835c4dd57a3686b227c44710a14ab06cded166
2013-05-06 10:31:55 -07:00
kaldari e1e62e691c New logic for how Echo interacts with new message alerts (OBOD)
Previously Echo prevented all user_newtalk data from being generated
for logged in users. This broke the hasmsg API and also prevented
anyone from being able to implement client-side growlers or alerts
based on this data. The new approach is more conservative - it allows
updates to the user_newtalk table, but prevents the alert itself
(orange bar of doom) from being displayed to logged in users. This
will provide more flexibility for future development regarding talk
page alerts (both for extensions and gadgets).

Note: This change is dependant on the new core change I2105bdd2.

Bug: 47962
Change-Id: I3f35a56b3f1795c2b21a6e4af8fc93b5e61b7d3c
2013-05-06 10:13:14 -07:00
Krenair 9e2b948b66 Do not send notifications for page links when the page is a redirect
Bug: 48045
Change-Id: Ib61574732bde3f7a8aeec4a33a379cc3d1aab60b
2013-05-03 17:31:23 +01:00
kaldari 6e9138d55a Allow mention notifications from project pages
(Such as Wikipedia:AN, Wikipedia:AN/I, Wikipedia:RfA, etc.)

Bug: 47964
Change-Id: If4e404b4fc8f4e16800f340f9a1050f66f663213
2013-05-02 18:06:51 +00:00
jenkins-bot 68248ccd7f Merge "Link to the notifications FAQ from Preferences" 2013-05-02 00:19:45 +00:00
Erik Bernhardson 113fe8cd84 Link to the notifications FAQ from Preferences
Bug: 47094
Change-Id: I22c420ff31e8b54ea306effedac42e029d29250e
2013-05-01 17:15:37 -07:00
kaldari f6f287f4a2 Making sure IP users get orange bar notificaitons
Change-Id: Iec38c8458fad43997239ef8aea87b1166a481bb7
2013-05-01 09:57:39 -07:00
kaldari 62155661de Making sure that email notification settings stay in sync.
Also registering UserLoadOptions hook (oops!)

Finally, getting rid of old override system that is now obsolete.

Change-Id: Ie264981eb20f1e3d3c83721bc376d79e2f5a1430
2013-04-29 21:51:42 -07:00
lwelling 069249cd62 Add a hook to smoothly deal with old user preferences during migration
Catches people who have opted out of old style talk page notifications and opts them out
of equivalent new ones.
Needs $wgRecentEchoInstall = true in LocalSettings.php so it can be turned off when no
longer needed.

The migration has 1 million rows to write on enwiki so will take some time

Change-Id: Ie6201df378bf8df813b3d461ea9a8521d99b1bb9
2013-04-29 16:31:09 -04:00
jenkins-bot 0e671b1c7e Merge "Removing options that belong in other extensions" 2013-04-29 17:14:25 +00:00
jenkins-bot bd590aaab6 Merge "Changing how the enotifusertalkpages user option is handled by Echo" 2013-04-29 10:00:11 +00:00
Matthew Flaschen d3b67e2122 Change icons to use img tags, allowing easier customization:
* Icon can be defined using a path or a URL
* Extensions don't need custom CSS, but add icon through BeforeCreateEchoEvent
* Sites set their notification icon in LocalSettings.php or equivalent

Bug: 46585
Change-Id: Ifc02b653d07de19229dfb2604305e32f3bd595fe
2013-04-29 06:05:40 +00:00
kaldari 5b40cfbc58 Changing how the enotifusertalkpages user option is handled by Echo
If we're using Echo to handle user talk page post notifications,
hide the old (non-Echo) preference for this. If Echo is moved to core
we'll want to remove this old user option entirely. For now, though,
we need to keep it defined in case Echo is ever uninstalled.
Otherwise, that preference could be lost entirely. This hiding logic
is not abstracted since there is only a single preference in core
that is potentially made obsolete by Echo.

Change-Id: I6c8b2143a5fd719486f7e6cbaa3d7635f507ffca
2013-04-28 15:21:05 -07:00
kaldari 00a4bc69f4 Removing options that belong in other extensions
Bug: 47757
Change-Id: Ia8be4967d962176f1e58ee6488f4cc9bfe75b655
2013-04-26 16:28:29 -07:00
lwelling 073ef28599 Set echo preferences for new users after their account is created
Default settings for existing users are intended to be low volume and not annoying
New users need more encouragement and incentive to return

Change-Id: Id37ad8289a5c968ae8be6a8c424a19d6cbc7e071
2013-04-24 21:03:25 -04:00
ebernhardson c999480a65 Hide preference for disabling fly-out notification
Bug: 47562
Change-Id: If295d802f5210ba7493eaff55a4330b8035e506c
2013-04-23 12:16:01 -07:00
Krenair 2e9a1c5fc3 Use slave database to reset notification count on preference change
Per Bsitu's comment on I5244ef9f

Change-Id: Ibfd598fd736808e69877ffb892f3781ff742a630
2013-04-20 16:06:25 +01:00
jenkins-bot 5833846c44 Merge "Add 'Mark all as read' button to overlay" 2013-04-18 18:41:47 +00:00
jenkins-bot 5f21312587 Merge "Email digest header tweaks" 2013-04-18 18:20:57 +00:00
kaldari 9448c6cab0 Add 'Mark all as read' button to overlay
Button is only shown if there are more unread notifications than
fit in the overlay.

To avoid performance issues, this version only works for cases where
the number of unread notifications is less than the maximum count
(99 currently). Otherwise the button to mark all as read isn't
displayed (it's also limited on the server-side for good measure).

Bug: 47092
Change-Id: Ifcb0a436e2b31062741c441cca239d35ddefa0e1
2013-04-18 00:29:36 -07:00
kaldari d4a15e3ee4 New presentation of email notification settings per requirements
We have a new shorter header and add labels for the two options.

Change-Id: If63720afe35f2edfa90b2c74d93fe355abd5da61
2013-04-17 17:44:20 -07:00
bsitu c7922a366c Email digest header tweaks
Plus adding escape to some of the messages

Bug: 47095
Change-Id: I296de4e5ebe92b737837c7ddcf3f631b16a9cf8b
2013-04-17 14:43:31 -07:00
jenkins-bot d9a4bb7bb9 Merge "Pref for showing notifications" 2013-04-17 17:15:51 +00:00
Kaldari 6388779640 Pref for showing notifications
If this pref is turned off, we revert to the old orange bar talk
page notifications. Depends on core change Ifc8fbaf8.

Bug: 46550
Change-Id: If21f3aac51e484c5e077c7f4b5a2218e8b71ed2a
2013-04-17 09:55:05 -07:00
bsitu 5d32291b12 Remove the code the tries to create an invalid notification
Although invalid notification would be checked and not be created, it's better to get rid of any attempt of creating invalid notifications

Change-Id: I4bdbf7e0706b3613c7cf31ab07570fb4d1cdd045
2013-04-15 13:34:24 -07:00
kaldari f8157260ca Making sure notification counts are reset on user option changes
Bug: 47131
Change-Id: I5244ef9f7bf9d1217c0c0df6691d8cf689c47cf5
2013-04-12 15:26:25 -07:00
bsitu d44ed993a2 Add email bundling function to Echo notification
* This patch needs intensive testing on Redis delayed job queue
* This patch is -2 mainly for redis/phpredis are not ready on test/test2/mediawiki

To test this locally, you need to:
* set up Redis and phpredis locally
* add the following to localSettings.php
    $wgJobTypeConf['MWEchoNotificationEmailBundleJob'] = array(
        'class'       => 'JobQueueRedis',
        'redisServer' => '127.0.0.1',
        'redisConfig' => array( 'connectTimeout' => 1 ),
        'claimTTL'    => 3600,
        'checkDelay'  => true
    );
* set $wgMainCacheType to CACHE_DB or memcache
* set $wgEchoBundleEmailInterval to smaller number for testing purpose, 0 to disable email bundling

Change-Id: I9313e7f6ed3e13478cec294b5b8408fe8e941faf
2013-04-11 11:25:14 -07:00
jenkins-bot 20f6ca3dde Merge "Switching to new message scheme for prefs per feature requirements" 2013-04-11 18:18:41 +00:00
kaldari cca427faeb Switching to new message scheme for prefs per feature requirements
Change-Id: I84f440d29d3311c580d3ae5ac5b46c151e051e44
2013-04-11 10:22:18 -07:00
bsitu e40a243d59 remove unused table and columns
1. echo_subscription
2. echo_event.event_timestamp

Change-Id: I9f6d4041b16c6d1d0414ee8e81536a59d0aba3d4
2013-04-09 10:56:28 -07:00
bsitu 6a3624b0e4 Add web bundling function to Echo notification
* add web bundling feature
* unify event_timestamp with notification_timestamp
* remove echo_subscription
* update article_link to page_link notification with new logic
* remove duplicated function from MWDbEchoEmailBatch since it's defined in parent class

Change-Id: I2fa91c44edb020209b468fe13f894d9db3732e69
2013-04-04 10:53:46 -07:00
Kaldari 556ad065f2 Merge "Initial version of user-right notification" 2013-03-21 17:49:24 +00:00
bsitu efebd39118 (bug 45337) reverts/rollback should not trigger link notif
Change-Id: I7ca7687f271aae53a000affdc10c1ed3758dcb83
2013-03-18 14:56:56 -07:00
bsitu c4039b757b Initial version of user-right notification
Change-Id: I1b2c618df26084068edfb568de314809d8af6702
2013-03-18 11:19:26 -07:00
bsitu 345fdb81e2 (bug 46051) mentioned users should not be as object in database
Change-Id: Id96ade333d8150fdc357db47cba9a609f9e7e108
2013-03-13 12:30:20 -07:00
bsitu fd72ce7606 Fix eventlogging schema check logic
ResourceLoaderRegisterModules Hook is triggerd on HTML generation, which happens after POST action.  We should move the logic of checking if a schema is enabled out of this hook.

Change-Id: Ic5696aeca378d13d04ce901ce56a2d0e8a9ab802
2013-03-06 13:36:51 -08:00
Kaldari 8357f4bd75 Implementing new prefs system for Echo
Change-Id: Id745ed6cf1c92695569597fab6ea662bac8c76c0
2013-03-05 12:20:17 -08:00
jenkins-bot 95f1d50c18 Merge "Add first version of EventLogging schema to Echo" 2013-03-03 03:45:46 +00:00
bsitu fc5c341692 Add first version of EventLogging schema to Echo
Change-Id: I4b6033ffc2ec8d1597f2b447f100c58a8c3a7f3e
2013-03-01 15:53:07 -08:00
Reedy 62a433573f Numerous bits of method parameter documentation
Change-Id: Ie4b2657b5e010311b779aa587aa7fa9fc3f19abb
2013-03-01 10:56:58 -08:00
Andrew Garrett dc6a3cb6d0 Add a "mention" notification
Any user whose user page is linked in a comment on a talk page will get a notification of that.

Weaknesses: Currently this mention notification is additive.
We may want to restrict it to only cases where the user would not
otherwise be notified of the comment

patch set 3:
	* user + instead of array_merge for merging subscription users
	* rename $user to $agent to avoid name confilict in generateMentionEvents()
	* add check for possible null object
	* users should not receive 'mention' notification on their own talk pages

patch set 4:
	* add more descriptive comment
	* check for empty notification list before creating mention event

patch set 5:
	* Fix a parse error, change [ to {

patch set 10:
	* rebase

patch set 11:
	* adding flyout messages, updating params for other messages

Change-Id: I76b80db1f325d9569f36c506d14c8c875bba4a34
2013-02-24 20:38:11 -08:00
Kaldari af06e26de6 Adding dismiss functionality to special page
Includes new web preferences for Echo

Also adding ability to set dismissability per notification type

Still need to arrange subscription options into a friendly format

Still need to add dismiss functionality to flyout

Change-Id: I484a24b424e69be3640e63b76f82735edae6f13a
2013-02-12 11:33:50 -08:00
bsitu 78ad57d43a Abstracting MySQL in Echo so storage type can be swapped easily
Patch Set 6:
	* remove redundant JobQueueDB because it's the default
	* remove extra ;

Change-Id: I25dc0203ed5be1e4989242a87f4fde9c8799de28
2013-02-08 10:34:50 -08:00
Kaldari 6e69812e3a Merge "Redirect should not trigger 'article-linked' notification" 2013-01-17 18:40:43 +00:00
bsitu f65a3842fd Update ArticleSaved hook to use correct request object
'Revert' via the API apiEditPage.php does not trigger reverted notification, this is probably due to the fake request object swap inside this API, which is making the param wgUndidRevision with empty value inside the hook, replace $user->getRequest() with $wgRequest solves this problem.

Change-Id: I5d12d31f370f2633e85d6533242da26ece950630
2013-01-16 17:46:23 -08:00
Kaldari c3e9ad0534 Support for limiting notifications to a specific user group or groups
Change-Id: I396bb6cb540bb6e8bdc190ddb1b67e15166c6852
2013-01-16 17:22:10 -08:00
bsitu 4cf5adf25f Redirect should not trigger 'article-linked' notification
Change-Id: I2d38a804f23a0e9b9d578f8d6e69b10d20cf24a2
2013-01-15 16:13:58 -08:00
bsitu 39416e503d (bug 43701) - LinkedPage was linked by 127.0.0.1 from page
If multiple pages are transcluding a page, a link update on the page being transcluded would trigger notifications for all the transcluding pages, we only need to fire the notification for the page being transcluded.

The solution in this patch seems to work but I have not fully investigated all possible scenarios. -2 for now

Change-Id: I6932ffb2e5dba3da40db17bd37ce2cc6cb8aee17
2013-01-08 15:57:28 -08:00
Kaldari 320d044b90 Adding More Info link to Special:Notifications
Also revising some of the formatting, per Vibha.

Change-Id: Id8415c898e81f98c3eb1599ef5980d74ba509081
2013-01-08 14:23:24 -08:00
Kaldari cb45681f05 (bug 43629) inlcude all content namespaces, not just NS_MAIN
Change-Id: Ia1998a12f182805955aaab143fa6072b91cb6fd6
2013-01-07 13:48:18 -08:00
bsitu a5cc1c6836 (bug 43625) - Strange notification
pages with 0 id should be filtered out

Change-Id: Idfccc3e7c430e929f7ef312548ad92e7d9f40dfe
2013-01-04 11:58:30 -08:00
bsitu 4a1cb54b17 limit article-linked notification to main namespace only
Change-Id: I814a6e8c500e3eb761106c131d70a229ee4f0989
2013-01-03 17:36:12 -08:00
bsitu 961f86bd33 add article-linked notification
Patch Set 6:
	1. use 'linked' icron
	2. update message from cross-referenced to cross referenced

Change-Id: I8c70454e59b5f9f86f92825cfc75dcf5d9bcb336
2013-01-02 10:40:39 -08:00
Krenair 4f8bab2e67 (bug 43446) Sort event preferences by priority
Change-Id: Ib6b4745676bb3487a2ed7418446d6d80a156950b
2012-12-28 22:16:34 +00:00
Bsitu bfdd733e7c Merge "Remove redundant preference for talk page emails" 2012-12-20 00:30:13 +00:00
Kaldari ab1d910abe Remove redundant preference for talk page emails
Change-Id: I725075abef309d8626979ebd010794aafd75aada
2012-12-19 15:22:05 -08:00
bsitu ceac07b7a0 Disable standard user talk page notification
Echo would send its own notification, it is confusing to send both to the user

Change-Id: Ib9f22ec0a94fa2bc4ab3ac4ac846cec871445829
2012-12-19 14:35:45 -08:00
bsitu 2813576364 Only show email digest preference options if batch is enabled
Change-Id: I5b34ded16afad0d2bd50661bfae06dc7da7e48e9
2012-12-14 12:49:40 -08:00
Bsitu 8919becfd8 Merge "Put the Notifications link after the talk page link if we're using full link" 2012-12-14 02:03:44 +00:00
Kaldari a46dc2a82d Put the Notifications link after the talk page link if we're using full link
Change-Id: Ifc3bb87575fd21b3f228cf1b8083a78939d7d529
2012-12-13 18:01:04 -08:00
Kaldari f897c02385 More prefs functionality for Echo
Patch set 16:
	* change some of the message rendering from plain() to escaped()

Change-Id: I9b971bd11171e73cd4d0c4ea10f817f4e19024f2
2012-12-13 16:57:15 -08:00
Kaldari 704147d1d2 Fixes to the toolbar link for notifications per Vibha
New badge behavior - Show badge even if zero notifications
Enable long and short links - i.e. 'Notification (X)' or just '(X)'

Depends on core change https://gerrit.wikimedia.org/r/#/c/38258/

Change-Id: Idc2288a4ddd0bf788ccdadb96d4744d223edaf0a
2012-12-13 14:07:32 -08:00
bsitu 6b8571403a Initial check-in for email batch
patch set 3:
	* add gender support to various messages
	* tweak variables a little bit, e.g. move class variables to function local variables
patch set 4:
	* update various email to e-mail in i18n file
	* add support to process only valid echo events
	* add global email footer
	* add the new table schema to core schema file
patch set 5:
	* remove trailing white space
	* add missing semicolon to return statement in Notifier::notifyWithEmail()
patch set 8:
	* some change based on newest feature requirement

Change-Id: I3298617dab4c04c4d6d486469120fc2d0c986b66
2012-12-12 12:00:13 -08:00
bsitu efe5f6817f Fix fatal error
Fatal error: Call to undefined method WikiPage::getContext()

Change-Id: Ib7c7f5cd529930cd469ecce7e66fcc810e7549aa
2012-12-05 17:29:22 -08:00
Kaldari 3ec54376a5 Setting up preferences for Echo, adding comments for some functions
Removing watchlist features that are now out of scope

Change-Id: Icbc35a4204ed89fe6c3bfdd1fb33c525ef5dc75c
2012-12-03 11:54:34 -08:00
bsitu cd349b11ac (bug 41866) Fix invalid notification in the flyout and page
1. Skip invalid notification events
2. Add formatting to notifcation count, for example, if the count is over 99, we just show 99+

patch set 2:
	* fix trailing whitespace
patch set 3:
	* remove extra whitespace and indentation
patch set 4:
	* change function name from gatherValidEchoEvent() to gatherValidEchoEvents()
	* add more descriptive documentation

Change-Id: I81a135c24f64fa1aace4dd2631e9b88bbe22d3d0
2012-12-03 11:41:16 -08:00
Reedy f7c91e2e0d Don't run the same SQL file 3 times
Change-Id: I1c9a210cfa69522d1cb404c661da9a78f56c605a
2012-11-10 20:25:12 +00:00
Kaldari e2bf80da8f Checking that revert notification is enabled before firing it
Change-Id: I9775b8ef1ec137f5622ee07758f50d58c50e12c9
2012-11-08 12:02:16 -08:00
Andrew Garrett 466c87d999 Echo: Add "reverted" notification for when a user's edit is reverted.
* Supports 'undo' and 'rollback' currently
* Also includes adding the edit summary used to all edit notifications.
* Also fixes a minor bug that made it seem like all EchoNotificationJobs were failing.
* Added revert icon to CSS

Change-Id: Id22470107b071cdbce33da7cf3dfd09d22947644
2012-10-31 17:01:20 -07:00
Siebrand Mazeland 3a43ea2e05 Maintenance for Echo extension.
* Update docs.
* Remove unused local variables.
* JSLint/JSHint suggested updates.
* Merge CSS lines.

Change-Id: Ib2a2e8129d5ff8aca6c612a39d22698f078df9d5
2012-10-06 19:31:31 +00:00
Tychay 419f7b1cbb Merge "Add welcome notification for new users." 2012-09-04 19:03:09 +00:00
Siebrand Mazeland 69d91fa1b6 Update documentation and deprecated methods.
Basically having fun with the code analyzer.

Also:
* remove unused local variable assignments
* missing return values
* CSS optimizations.
* Initialize possible unset variables.

Change-Id: I77aa08ecb48eeda08f14dc38d7f35d57ea9fa110
2012-09-02 11:30:38 +02:00
Krenair 5714adf8f4 Add welcome notification for new users.
Change-Id: I14032b71ebe63bb6ef951ba0c14d6acf44e69d6b
2012-09-01 01:31:20 +01:00
Siebrand Mazeland 950f74eba8 Follow-up I2c10cb69: Auto-formatted using IDE.
Change-Id: Iedeaca3c31195a5cf7df8dd38d6332cfabffcc67
2012-08-31 23:50:46 +02:00
Krenair 9559105b59 Use whitespace between function parameters and the brackets.
Change-Id: I2c10cb69f1f1726b63d25579c6a35c882cc1fe7e
2012-08-30 17:04:39 +01:00
Reedy 89bb4371e5 Make EchoHooks::getUnitTests() return true
Change-Id: Ib2cc725b7e172f4efbfbcc00b2fb81d76008b61a
2012-08-07 19:54:42 +01:00
Andrew Garrett 5a955cc9d9 Some final fixes for deployment
Change-Id: Idfde86bba1966a8741f2f4a318c3745cc2e8e658
2012-08-02 12:50:46 -07:00
Andrew Garrett 2378a39950 Echo: A few adjustments based on feedback from Ryan Kaldari and Benny Situ.
Change-Id: If430c02793a1843253ccc18512075befc99a3eb6
2012-08-01 15:08:58 -07:00
Andrew Garrett 1d47038e62 Echo: Make it possible to specify exactly which events are active with $wgEchoEnabledEvents
Change-Id: Iecf77f1e0dd80a209ef9be013fb2adf44e69a604
2012-08-01 12:11:52 -07:00
Reedy 0238982af0 Update code/documentation
Add FIXME

Update some code to new standards

Change-Id: I4240f651ca85001eabaf91eed0c896741b01a76d
2012-08-01 10:54:17 -07:00
Andrew Garrett db36c1f382 Stop triggering the yellow "you have new messages bar".
Transitional arrangements: Because pre-Echo events will not
have Echo notifications, the yellow bar will remain for them.

Change-Id: Id6b0f4c5d5592e3529f264a7235ee321b25fa740
2012-08-01 10:51:28 -07:00
Catrope 429b608270 Merge changes I9051e4bf,Ie6cae76e
* changes:
  Formatting updates for Echo.
  Echo: Implement advanced notifications for vanilla talk pages.
2012-08-01 17:47:26 +00:00
Andrew Garrett 0699d8f402 Formatting updates for Echo.
First implementation of "two line" formatting.
Messages have a title and optional content.

Distinguishing writing on "your talk page" from another talk page in messages.

Change-Id: I9051e4bfb66d1c25c1bf68ec092b52fd90544336
2012-08-01 10:37:17 -07:00
Andrew Garrett 6ff170cada Echo: Implement advanced notifications for vanilla talk pages.
Uses the class EchoDiscussionParser to understand actions taken on
vanilla MediaWiki discussion pages.

Currently notifies on these occasions:
* A new comment is added to a discussion on your talk page or that
  you have participated in.
* A new topic is added to your talk page.

There are vague plans to expand to these classes of events:
* Your comment is edited or removed.
* A large section is moved to your talk page.

and these classes of users:
* Users watching discussion pages.

Change-Id: Ie6cae76ed2e0ecf607059e39ac1aa480a275ec89
2012-08-01 10:17:36 -07:00
Andrew Garrett 5f666bd7a7 Fix non-JS to use the correct message
Change-Id: Ifd451aeb6755dd77b0e988298546ee125b010e4c
2012-07-31 16:29:30 -07:00
Andrew Garrett efb463cca9 Echo: Refactor various code to allow for XMPP and badge notifications.
Change-Id: Ic372756501ad3438ab67a5c96791ba2ffe70c886
2012-07-31 14:19:15 -07:00
Andrew Garrett c3b77b543e Merge "Echo: Disable standard email notifications" 2012-07-18 16:28:41 +00:00
Andrew Garrett 922fbc1e17 Echo: Disable standard email notifications
Change-Id: I3d613792175f68606483ba729a79b625a7ebcb02
2012-07-17 15:19:32 -07:00
Andrew Garrett fc0b870486 Echo: Reset user notification count when adding a new notification
Change-Id: If4057ba9f6a016189c60836c64333ac0b0572450
2012-07-17 13:39:45 -07:00
Andrew Garrett aa7d7b1e72 Fix fatal errors that were causing notifications to fail
Change-Id: I89fe025b12fe853c3fc40dd2350feae884c61458
2012-07-16 17:04:27 -07:00
Andrew Garrett 6bbbb0c74c Echo email notification: Make sure users actually want to receive email notifications by checking their preferences first
Change-Id: I3fe51a8b418034b872a1ccf77e845f46e5f9e111
2012-06-08 15:31:24 +10:00
Andrew Garrett 5c841cafe3 Add an "overlay" to personal links showing new notifications.
Change-Id: I1a350e5d051bd0e776e5043f0ba189a576ac7ee7
TODO: Add date/time stamp to notifications as shown in overlay
2012-06-01 21:02:30 +10:00
Andrew Garrett ed388e1916 Fix SQL issue: make event_variant field nullable.
Change-Id: I5937d4e2f6be1e3face7094dfd5cdf5414ab3007
2012-05-18 11:10:41 +10:00
Andrew Garrett 8da85396d6 Initial commit of Echo, a notifications framework for MediaWiki.
This version is very rough.

For an example set of Minimum Releasable Functionality, this version will notify users on
changes to their watchlists or to their user talk pages.

However, it is still missing a conversion script to turn watchlists into echo subscriptions.

For now, notifications can be viewed through the new special page Special:Notifications, or through the API module provided.

Change-Id: I5867226e3e6195fbed81f4b5803e2310f057ffc4
2012-05-13 00:53:21 +10:00