Commit graph

262 commits

Author SHA1 Message Date
jenkins-bot ccebb42186 Merge "Get rid of old flyout formatter code" 2016-02-09 18:34:36 +00:00
Matthias Mullie 9fe71a1182 Get rid of old flyout formatter code
This code is completely useless:
* for format=flyout, the new EchoFlyoutFormatter.php will be run
* and even that one has already been deprecated as it was replaced
  by format=model (flyout html is now built in client)

Change-Id: Iea23abb66397ecc4efb575fe33fdbedc5b4e0f70
2016-02-05 06:56:15 +00:00
Justin Du 2c90793c41 Use new trash icon
*On deletion-related notifications

Bug: T125785
Change-Id: I9c23898ddc7bab70b069a03a2633c750a08a1740
2016-02-04 22:45:43 -06:00
Matthias Mullie cc11b3c81a Allow certain users to be excluded
Right now, if certain users should be excluded, that would have
to be part of the user-locators already. This is annoying because
it's hard to write "generic" user locators when you want to exclude
just a couple of people in certain cases.
In Flow, for example, we have user-locators for users watching a
board or topic. We don't want to send the notification to people
that have also been mentioned in that post (they'll get a separate
notification). We could build that exception into those
user-locators, but then we couldn't re-use them in other places...
This basically means we couldn't use EchoUserLocator::locateUsersWatchingTitle,
we would have to roll our own that also excludes mentioned users.

Instead, this lets you add 'user-filters' (that functionality
actually exists already, but is not currently exposed), which
lists users to not send the notification to, even though they could
be in a user-locator.

Bug: T125428
Change-Id: Ifa0e2d3283f57624af4c5ec264f9f66223508e83
2016-02-04 11:20:59 +01:00
Roan Kattouw 3c543215aa Use globe icon for cross-wiki bundle
Bug: T123757
Change-Id: Ib97c0abb43aacba19e6b8d8a329c836e332927a2
2016-01-15 16:43:14 -08:00
jenkins-bot 7bbd9dc9f5 Merge "Replace review icon" 2016-01-15 01:42:45 +00:00
Justin Du 5205d1ab4d Replace review icon
Bug: T121735
Change-Id: Ia2fc92e168bfafcccd05172de2fbdde3bed0bca6
2016-01-14 17:37:11 -08:00
jenkins-bot 9291cef3a6 Merge "Replace Talk icon with new chat icon" 2016-01-15 01:36:18 +00:00
Justin Du 16297ea72f Replace Talk icon with new chat icon
Bug: T121735
Change-Id: I9ecd019ce494cdbcade258e2f590540a1ca97586
2016-01-14 17:21:45 -08:00
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