Commit graph

253 commits

Author SHA1 Message Date
jenkins-bot 33fe9a0038 Merge "Cross-wiki notifications integration" 2016-01-15 01:15:42 +00:00
jenkins-bot 2eed540186 Merge "Clarify some notification icons" 2016-01-13 22:53:27 +00:00
Justin Du 7d2a15d3bc Clarify some notification icons
* edit-user-talk
* mention
* user-rights
* emailuser

Bug: T121735
Change-Id: I72e382b9ff9d19c6acc0df507fdff65732b66450
2016-01-13 14:00:37 -08:00
Roan Kattouw 63eef35026 Cross-wiki notifications integration
Bug: T121829
Change-Id: Ifb52ad5605a56d27e5951479326689242a49430e
2016-01-13 09:47:57 -08:00
jenkins-bot 5670a247f0 Merge "Add cross-wiki as a beta feature" 2016-01-13 09:01:04 +00:00
Moriel Schottlender 386fb0e8b4 Add cross-wiki as a beta feature
This commit only adds the beta feature parameters and preference.
The API will need to check whether the feature is enabled.

The beta feature option is behind a feature flag
$wgEchoUseCrossWikiBetaFeature, that must be set to true for
the beta feature to appear on the wiki.

Bug: T114237
Change-Id: I61e1bd62571e55f7f685f64e0c37e7702875e407
2016-01-13 00:54:17 -08:00
jenkins-bot 06525799e4 Merge "Add Kunal, Moriel, Jon to credits; add mailmap file" 2016-01-11 22:25:47 +00:00
Moriel Schottlender 0d8bd17dd9 Log the expand action of a notification group item
Bug: T121945
Change-Id: I171d3e99a5529172177c9ddb9f17429609180321
2015-12-23 11:36:29 -08:00
Justin Du d62649e62c Clarify link and revert icons on notifications
Bug: T121624
Change-Id: I0bd1121226b655f82d6a4d46e8c5547ef4726cc2
2015-12-17 20:04:33 +00:00
Roan Kattouw 348a240c06 Add Kunal, Moriel, Jon to credits; add mailmap file
Change-Id: Iec2ef654ee2431ff125c97e8746d7f4fca17b8ac
2015-12-15 16:30:19 -08:00
Kunal Mehta 479d7a2dd9 Add support for cross-wiki notifications to Schema:EchoInteraction
Adds support in the logger code that is unused for now.

Note that I9bf6f4bcd41d8da5 must be deployed before this can be used on
Wikimedia sites.

Bug: T120158
Change-Id: I1968f36e21139975d25231ac25c22a73dea6fd0d
2015-12-10 10:07:20 -08:00
jenkins-bot fd8c15de1b Merge "Bump Schema:Echo to oldid=7731316" 2015-12-10 04:52:08 +00:00
Stephane Bisson 04d4da2783 Presentation model for edit-user-talk
Bug: T116843
Change-Id: Ia11f5b57747ed0be5d4b00c75925d5fcdde87c43
2015-12-09 13:35:10 -05:00
jenkins-bot 47fd3b5896 Merge "Presentation model for page-linked" 2015-12-09 18:02:15 +00:00
Kunal Mehta 7e72ac4dac Bump Schema:Echo to oldid=7731316
This adds "other" to the notificationGroup enum. This was already bumped
in wmf-config, but not in the extension itself.

Change-Id: If67754cfc40c004cebbf93d8b0e7d221d6620e61
2015-12-08 23:02:09 -08:00
mhutti1 ea64fe4770 Redirect anonymous user to login page from Special:Notifications
Added code to redirect the user and display a short message informing
them of the need to login.

Bug: T118873
Change-Id: I2145bc1502dbd19d660302d9f19e0d4a2ad5ad50
2015-12-08 11:55:15 -08:00
Stephane Bisson a9f307ceab Presentation model for page-linked
Bug: T116843
Change-Id: Id9894b98a0dd7554a529ff763aaf0f719e36152b
2015-12-08 14:02:19 -05:00
Stephane Bisson 14b842bd34 Add gender support for the viewing user for mention notification
Bug: T119321
Change-Id: I1cd7caa7bfe811bab89a0c6950c1aeaf1739aac6
2015-12-04 16:53:11 -05:00
jenkins-bot f875dfc191 Merge "Track what wikis a user has unread notifications on" 2015-11-21 00:05:44 +00:00
Kunal Mehta b85f978ddd Track what wikis a user has unread notifications on
This implements a backend layer and database storage for tracking what
wikis a user has unread notifications on. It is not yet exposed via any
API.

Whenever the notification counts on the local wiki are reset, a deferred
update is queued to also update the central database table.

Change-Id: Id1498bdeb5811d6848dc66781ffca03e726eab90
2015-11-20 15:54:11 -08:00
jenkins-bot 904e1e5a8c Merge "Presentation model for reverted" 2015-11-19 00:55:46 +00:00
Stephane Bisson 44149b6cbd Presentation model for email-user
Bug: T116843
Change-Id: I99e790d72c7c534665d1d86c38459c5d0e60b91b
2015-11-17 12:44:45 -05:00
Stephane Bisson 3fa832c6c7 Presentation model for reverted
Bug: T116843
Change-Id: Ide03220ad8ad621b5943e36d71e484a21bc8a65b
2015-11-17 10:19:15 -05:00
Kunal Mehta 8145cd1425 Remove old, now unused mention flyout messages
These are no longer used in the interface, 'notification-header-mention'
and 'notification-header-mention-nosection' are used instead.

Change-Id: I08ffe47cf7932637b77f43f6ec374272b5e3ca3e
2015-11-16 15:49:44 -08:00
Moriel Schottlender 88b558f44d Add a presentation model for Echo "Welcome" notification
Bug: T116843
Change-Id: Ia43ce2c467873390c2b36439af1db8932708cda9
2015-11-02 16:02:06 -08:00
Kunal Mehta 94004aeda5 Re-enable presentation model for mentions
T116888 has been resolved.

Change-Id: I5380d06252878b8808e4c81e12de05145a3f992c
2015-10-29 10:52:04 -07:00
James D. Forrester cd8c77df29 build: Enable phpcs rule 'MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment' and make pass
Change-Id: Ied1a479e6f5aa82d03e449ec10d655a921cd37e4
2015-10-29 13:06:14 +01:00
Roan Kattouw 0feccf98f8 Comment out presentation model for mentions since it fatals on deleted pages
Bug: T116888
Change-Id: I93361fb0fc809e9fd4173710d86d824c0a6adefe
2015-10-27 23:44:57 -07:00
Kunal Mehta 56c4b95087 Clean up and refactor formatting system
The workflow to format a notification is
* Get EchoEvent, User, and Language
* Get EchoEventFormatter implementation for notification type
** EchoEventFormatter returns structured data about each part of the
notification (header, body, primary link, secondary link(s))
* Each output type will have a formatter class (e.g.
EchoSpecialNotificationsFormatter, EchoPlainTextEmailFormatter) which
takes a EchoEventPresentationModel and generates whatever it wants
(HTML, plain-text email, etc).

Included is an example conversion of the user-rights and mention
formatters. The previous infrastructure will remain in place for
backwards compatability until other extensions can be updated.

Bug: T107823
Change-Id: I4397872a7ec062148dfcb066ddd8ab83f40486ac
2015-10-19 10:00:23 -07:00
Siebrand Mazeland 33126b69aa Update formatting
In preparation of Code Sniffer based updates.

Change-Id: Id5d43332b44a37665d57dc24ef8c432bc65b2f6a
2015-10-03 23:28:54 -04:00
jenkins-bot 3c43555c55 Merge "Use UserGroupsChanged hook instead of deprecated UserRights hook" 2015-09-22 18:24:40 +00:00
Kunal Mehta 073ade0a77 Use UserGroupsChanged hook instead of deprecated UserRights hook
Bug: T113357
Change-Id: If63b08493bcd49be9608d20a0d6fee0b3b205d58
2015-09-22 11:16:59 -07:00
jenkins-bot d248a13f69 Merge "Add an emailuser web notification" 2015-09-22 00:03:44 +00:00
umherirrender 07761b632e Add an emailuser web notification
When an user sent an email to another user with [[Special:Emailuser]] or
action=emailuser, give an echo for the target user to be lookup in his
mailbox.
This option is off by default. It is only useful as web notification,
because an email notification would go to the same address.

Bug: T56130
Change-Id: Ie279457daf51e1c34c998197ce9e76c78ee705e4
2015-09-22 01:58:17 +02:00
Alangi Derick ba4789760c IP addresses should link to Special:Contributions instead of user page for revert
This changes the revert notification (special page version) to link
to the contributions page for anonymous (logged out) editors.
It still links to the user page for logged in editors.

Bug: T55564
Change-Id: Ib1f17fb88237b96cda63dd30ed488a8ffd84750e
2015-09-20 15:53:10 -04:00
Matthew Flaschen f9c5808912 Move edit-user-talk to messages
Also:

* Clear the newtalk flag when they mark all their edit-user-talk
  read.

* Remove the section caching system.  It was designed to avoid
  performance problems with Flow messages, but now that standard talk pages
  are in 'messages', messages should be relatively common (alerts
  were already not cached by this).

* Minor cleanups to reflect that messages are not only Flow (and
  a typo fix in the Gruntfile).

Bug: T108760
Change-Id: I82d7b1d08331693830d6a1749612b55e96b95cf9
2015-09-04 18:36:40 -04: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
Kunal Mehta a7c36b0b86 Flip EchoEvent::getUseJobQueue() default
Rather than making each notification type opt-in to using the job queue,
make them opt-out by setting an 'immediate' => true flag.

Configure the 'edit-user-talk' notification type to be immediate since
it should not lag behind the orange bar indicator.

Change-Id: I707bc01a97082887c3f1c353d45cdf1c1eaeff04
2015-07-01 20:36:47 -07:00
Kunal Mehta 06d9385fbb Don't use $dir
Change-Id: I2e376c15cd6fdddcf037985eb20702c2aaa8c177
2015-06-15 17:45:03 -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
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 0e6976f536 Require Resources.php in entry point
Extension loading should fatal and stop if Resources.php cannot be loaded.

Change-Id: I62f3095438e3702e0a41e1a4ad6721ec31f432fc
2015-06-02 00:55:50 +00:00
Kunal Mehta c78e5202e8 The OBOD is orange
c.f. https://meta.wikimedia.org/wiki/OBOD

Change-Id: Ib3efe9ea59d1b955be86e56cfa8841c2c4daedb6
2015-06-02 00:55:36 +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 e11fa6e094 Kill $wgEchoBackendName
All uses of $wgEchoBackendName were hardcoded to 'Db' and removed.

This exposed a interesting bug in MWEchoEmailBundler which was
instantiating a subclass using the parent class's private constructor, a
"feature" of PHP which is supported in 5.2.6+ (http://3v4l.org/h4Mq3).
While it worked, PHPStorm complained about it so I made the constructor
protected, which makes more sense anyways.

Both EmailBatch and EmailBundler need further refactoring, but that will
be done in follow up patches.

Change-Id: I2032f5b2f4f3a62f830cc5344b25a92074bd0c61
2015-06-01 12:13:11 -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 5e4fc8661e Remove todo that we're not going to do
Echo should not care about the job queue backend, that's MediaWiki
core's responsibility.

Change-Id: I29c349e0fedec31a3ad0f28e020849778e155c00
2015-06-01 11:33:44 -07:00
paladox 2e59b04866 Remove i18n shim
Change-Id: I180cbbced3a9bab95baa37a7a6fc25870e8a6bbf
2015-05-27 10:55:20 +01:00