Commit graph

218 commits

Author SHA1 Message Date
jenkins-bot 17b57a6f37 Merge "Echo: Add gender support for Mute user label" 2020-06-25 04:32:47 +00:00
Michael Holloway 4180c0c1a0 Change push notification preference column label to "Apps"
Bug: T251462
Change-Id: Ibdec818df6c605d1bc2d2bcb8edb72b62aa35005
2020-06-24 17:31:17 -04:00
Ammar Abdulhamid d029f18570 Echo: Add gender support for Mute user label
Bug: T251687
Depends-On: Ie41331fe37ba08dba343f2b229d2374c0443a074
Change-Id: I563f3f3df84cc12a4256feb158f2e1ccf7c69aad
2020-06-18 21:46:03 +01:00
James D. Forrester a1fb5d5d75 Add ten millionth edit thank you notification, per demand on Facebook
Change-Id: I26a0dd0954f7f3f61014cde371fa0c46c4db78cb
2020-06-17 19:39:39 +01:00
Michael Holloway ce7a46f7ed Add push notifier
Provides a basic push notifier implementation. Since the push service is
not yet in place, all it does for now is log debug output when a
notification is to be sent.

To register the push notifier, add the following configuration to
LocalSettings.php:

 $wgEchoNotifiers['push'] = [ 'EchoPush\\PushNotifier', 'notifyWithPush' ];
 $wgDefaultNotifyTypeAvailability['push'] = true;
 $wgNotifyTypeAvailabilityByCategory['system']['push'] = false;
 $wgNotifyTypeAvailabilityByCategory['system-noemail']['push'] = false;

We'll register the notifier in configuration for now, rather than
hard-coding the default in extension.json, in order to have control over
when and where it rolls out (beta vs. prod, as well as which wikis).

Since the push notifier implementation depends on jobs being processed
by the job queue, I also recommend adding the following configuration
setting to ensure that all pending jobs are processed at the end of each
web request:

 // ensure all pending jobs are processed when a web request completes
 $wgJobRunRate = PHP_INT_MAX;

Bug: T252899
Change-Id: Ie7f222443045d30620ff297b006104ef18a074a8
2020-06-02 13:40:04 -04:00
Roan Kattouw 28f432b150
Add dynamic secondary action to mute/unmute page-linked notifications
Also adds an API module for muting and unmuting pages (and users).

Bug: T46787
Bug: T115264
Change-Id: Icf4e4bfa9fd7fa27b4c40892e3d5ce000eb22d5a
2020-05-27 15:20:08 +02:00
Kosta Harlan 5e9eac03d0 Change pref header to specify it's about page link notifications
If/when we add other notification types, we could switch this string back to
"Muted pages" and nest other notification types underneath, or we could use a
different UI pattern for exposing those preferences.

Bug: T46787
Change-Id: I66cb2795a17994197b8610d04691dfca55ebc588
2020-05-25 19:15:39 +02:00
Volker E a569321595 Add aria-label to SpecialHelpMenuWidget
Bug: T244543
Change-Id: I04c2c47c5d20cf69f9f0602a2e535c05b01f5f3c
2020-05-18 12:35:43 -07:00
Kosta Harlan 1560528dc7 Add page linked event title muted list
* Add a section on the preference form to allow users to mute articles
  from generating "page linked" notices
* The preference will save the article title as an article ID

Depends-On: Ia0ddf78646ec4c8ae0b84b6d5b46ef5e51c8e8c1
Bug: T46787
Change-Id: I67f751eae5fdc5bccff7fe3047227d432c1cb8d5
2020-05-06 12:38:55 +02:00
Akinwale Alagbe b49fdb88c3 Add aria-label to Notifications page “Recent activity” filter widget
Adding `aria-label` to the filter widget, with `listbox` role assigned 
to allow screen readers parse read the content.

Bug: T244543
Change-Id: I72a4045abe9a7c391ee3fe471ed944d96259b79e
2020-04-03 20:00:22 +00:00
Raymond a22a916e14 Document message "echo-blacklist"
This way it shows up on [[Special:AllMessages]]

Change-Id: I19ae033b8972029d32018a55e0724a1afbd8e61c
2019-12-13 17:28:38 +01:00
Jon Harald Søby 72963d4167 Add PLURAL to new messages
These new messages should have {{PLURAL}} in the English original
even though the number will be larger than 1. For other languages (like
Russian) the plurals work differently, so having the {{PLURAL}} in the English
message even though it won't have any effect there works as a guide to
the translators (just like the {{GENDER}} does).

Change-Id: I925818bbf3da95e2ffdb629f448f54911752e346
2019-12-13 13:01:59 +01:00
jenkins-bot 8b6efb51bb Merge "Add preference to not receive digests about read notifications" 2019-12-12 11:14:30 +00:00
Ben Houghton 9ae45afdfd Add preference to not receive digests about read notifications
Allows users to opt out of receiving daily or weekly digests containing notifications
they have already marked as read on the web.

Bug: T169386
Change-Id: Ib47248678f88095492fb6896530be5a9f5bb43ca
2019-12-12 06:30:13 +00:00
Pppery db78c1552e Add support for watchlist events
Bug: T203941
Change-Id: I9bcd13cb0a547393696dde0e977b7761cc1fea68
2019-12-11 16:39:02 -05:00
Martin Urbanec 2f26e7cc59 Create system-emailonly category
I need this category to be able to complete T231395,
it doesn't make sense to web-notify user they were renamed
since renaming kills user session, so when they log in,
they already know.

Bug: T231397
Change-Id: Ib49a42969a2134bb89c17f62a7aea7db820374fa
2019-10-30 17:51:39 +00:00
jdlrobson d3c0494a17 Dormant mobile notifications overlay lives in Echo
This code will be enabled when Iba1d7863171268066bf7597182c57a0a2041497f
relinquishes the responsibility for rendering the Echo notification badge
and wiring up of the related JS.

It makes 3 assumptions:
1) Minerva will expose a VERSION property on the skins.minerva.scripts module
to tell Echo it can begin control of the functionality
2) A new hook `SkinMinervaReplaceNotificationsBadge` will run on the server side
allowing Echo extension to render the Notifications badge in Minerva.
3) A new client side hook (echo.mobile) will fire whenever the Echo dialog is opened or
closed.

All code relating to Echo inside MobileFrontend and Minerva is
moved here.
CSS for the modules is kept in Minerva as skinStyles

This code remains dormant until Iba1d7863171268066bf7597182c57a0a2041497f lands.
It pre-registers a "to-be-created" hook SkinMinervaReplaceNotificationsBadge that
substitutes the Minerva badge.

It also watches the export value of skins.minerva.scripts for a VERSION value - when
this appears it will take the signal that it should manage the frontend code.

In the new system the mobile specific code is limited to the mobile version of
Minerva. The desktop version of Echo loads on Minerva desktop - presenting an
opportunity in future to consolidate both implementations to use the same component.
The mobile version of Vector and Timeless for example will load the mobile overlay
(with existing styling issues that we don't need to worry about right now given
we don't officially support skins other than Minerva as mobile)

Testers:
* Check require( 'ext.echo.mobile' )(); inside initMobile
inside ext.echo.init does not fire until
Iba1d7863171268066bf7597182c57a0a2041497f is checked out.

Depends-On:  I1a66939d2b596094b419de40b370e79f09c85581
Bug: T221007
Change-Id: I09c27a084100b223662f84de6cbe01bebe1fe774
2019-10-09 12:36:11 -07:00
shivanshbindal9 2528e3394f Define preference for poll updates
New preference added so that user can set
* Displaying (n) total unread count in the title
* Displaying notification snippet for incoming notification

Bug: T229732
Change-Id: I35eb68dedf1e087b4668bfec404935f1244b3d0b
2019-08-06 19:42:49 +05:30
shivanshbindal9 6be1eee1db Display notification text for incoming notification
As now polling is used to update the notification count on header icons.
If there are any new notifications then a snippet containing the header
part of the notification will appear using mw.notify().

Bug: T226130
Change-Id: Id38c8ebedebd4c68b9cef0635043d6f9304784dd
2019-07-31 17:54:20 +05:30
Dayllan Maza b3df45dc34 Add option to mute/unmute notifications on Special:Mute
The hook (SpecialMuteModifyFormFields) is used to append
the option to mute/unmute echo notifications from a specified user.

Special:Mute handles posting and saving the fields, the only
requirement is that the field name is the same as the property
that wants to be modified, in this case 'echo-notifications-blacklist'

Bug: T220163
Depends-On: I2b3eee0802cb086091f35ecce13ae77a8e7d518d
Change-Id: I77b3ccfdce9b501eb8ecd58c0d7bbecb78029a7e
2019-07-18 15:47:24 +00:00
Roan Kattouw c8e6ff49c0 Use {{formatnum:}} for 99+ in default echo-badge-count message
As it stands currently, every language that uses different numerals than
English does has to override the echo-badge-count message to provide
their own version of "99+". If a language doesn't do that, numbers up to
99 will display using the correct numerals, but "99+" will be displayed
verbatim. Some affected languages have overridden this message, but most
haven't.

Instead, use "{{formatnum:99}}+" in the English message. This is a no-op
in English and other languages that use the same numerals as English,
but automatically converts the number 99 in languages that use different
numerals. This way the only languages that need to override the message
are ones that use a different symbol than "+" for expressing "or more".

Change-Id: I247260ed9bbb40cff88e5ab873072269221b0ad4
2019-06-27 10:34:52 -07:00
Roan Kattouw 95172c2c7e Remove per-type notify-type-availability (make it category-only)
Bug: T221264
Depends-On: I74f660e88d18d5a27cc1e74f39316bb27aec1cbb
Change-Id: I12cc0312dbfd9a6923b64117e001841a7bfaaf17
2019-04-26 17:36:10 -07:00
Roan Kattouw c8f757a278 Split system category into system and system-noemail
This will allow us to remove notify-type-availability for individual
types, and manage all of it on a per-category basis instead.

Bug: T221264
Change-Id: I78ed6782be8b819cf25cceabb4ea794b15eacafd
2019-04-24 14:08:59 -04:00
Stephane Bisson d5c5480df2 Make thank-you-edit notifications configurable
Add a preference in the notifications section to allow
disabling the 'thank-you-edit' notifications completely.

This is useful to editors active on several wikis. They can
disable it in global preferences and stop seeing them globally.

Bug: T169924
Change-Id: If6716bb98ed2309813536a5834e03833fb537dcf
2019-04-24 08:55:46 -04:00
Stephane Bisson 2fb8db3bca Remove all traces of cross-wiki beta feature
Bug: T221260
Change-Id: I447b5220220fdad68a55629ba5a532db720ca8da
2019-04-17 22:18:13 -07:00
Roan Kattouw f0476b7009 Remove unused messages
Also clean up references to nonexistent messages in qqq.

Change-Id: I3811da1b1420318e5bf747f26244a4bb00d68cc5
2019-04-10 03:37:18 +00:00
Roan Kattouw d002512f09 Pass viewing user as $3 to email subject messages (for GENDER)
Do this by default in EventPresentationModel so it automatically works
for all email subject messages.

Update messages to use this parameter. Also update email subject
messages that were trying to use parameters that didn't exist, and fix
message documentation that was completely wrong about what the
parameters were.

Also update translated messages to account for parameter shifts (in many
cases, these messages were using the wrong parameter or a nonexistent
one).

Bug: T219620
Change-Id: Ia420c4db13c95d91e1bfc4c7950942df5858379b
2019-04-04 14:58:43 -07:00
Kunal Mehta b0687600a2 Remove $wgEchoNewMsgAlert and 'echo-show-alert' preference
Unconditionally enable it for all users.

Bug: T58845
Change-Id: Ie3ba685cef8979fe750c449fec01992b32df0fba
2018-08-12 20:25:15 -07:00
Roan Kattouw 1eef6eeee3 Remove footer notice code
But keep the widget files in case we need them again.

Bug: T190481
Change-Id: Iec7dd472cebbee98ea88a0318c017707c7460ae8
2018-03-28 14:57:44 +02:00
Max Semenik 467b13fe89 Ping users mentioned in edit summaries
Disabled by default for now.

Bug: T32750
Change-Id: I8012b82b6e27cc2612fb2302d0c9feb3f3623d62
2018-02-22 12:37:35 -08:00
Stephane Bisson ca27299f51 Format user-rights reason as plain text
Format user-rights reason as plain text
in both web and email since links
in notification body are not supported.

Bug: T172636
Change-Id: Ief5ff0aff18aad070f4388e075b5aae072d8f101
2018-01-09 08:41:21 -05:00
Matěj Suchánek b7f189ca5a Make edit-user-talk notifications expandable
Bug: T162299
Change-Id: I79a5e52dc8b861bd0ed4a55ce5d80c5a97cddb70
2017-10-20 11:27:47 +02:00
petarpetkovic d8c655e572 Change Echo notification blacklist message
Change "learn more" link
from https://www.mediawiki.org/wiki/Help:Notifications#mute
to https://www.mediawiki.org/wiki/Special:MyLanguage/Help:Notifications#mute.

Bug: T174376
Change-Id: Id9bbdae601b070b07994a4e8e0892cd5fe5edf76
2017-10-02 16:37:10 +02:00
David Barratt 4f69e47622 Better explain how the Mute feature works
Update the English form labels to better explain how the Mute feature works.

Bug: T166626
Change-Id: Ia4294372d633c3b362f7e7fec9e8253b3d321363
2017-08-16 18:27:41 -04:00
Ela efec7fe63a i18n tweak for article reminder category on preferences
Due to team discussion - there is a need to keep the singular-plural

This makes it consistent with the others and allows flexibility.

Change-Id: I990a09cc688dcdae3176c5ecd995d4957a4bc402
2017-07-06 17:46:27 +00:00
Amire80 658459fd9a Improve messages about page reminders
* Changed "article" to "page" in all the messages.
  This is the custom in all MediaWiki messages.
  It ensures that the messages can be used in
  wikis where pages are not necessarily articles.
* Removed unnecessary PLURAL clause. If it's a category title,
  then it's probably constant.
* Correct the grammar of echo-pref-tooltip-article-reminder.
  "When I asked" is always past, and it's probably supposed to refer
  to actions that may happen in the future.

Change-Id: Iddf4ac8bec4f751c570138c9557dc9174772d272
2017-07-03 20:30:34 +03:00
Ela a4974ef1e1 Adding the first step in order to enable the visualization of the Article Reminder feature.
Includes feature flag, presentation model.
Temporarly hooks to new user creation.

Bug: T165755
Bug: T165754
Change-Id: Ic0a2ca07b0cd1597e5534bb1f3b748beb215ddfc
2017-06-30 19:45:24 +03:00
Kunal Mehta 5d2cde1022 Implement per-user notification blacklists
- Disabled by default, is a gated preference by wg variable
- User specifies blocks in Echo preferences
- Uses a TextArea with username separated by new lines as input
- Still allows notifications to come through on a user's talk page
- Cache the blacklist and whitelist

Requested at
<https://meta.wikimedia.org/wiki/2016_Community_Wishlist_Survey/Categories/Miscellaneous#Allow_users_to_restrict_who_can_send_them_notifications>.

Bug: T150419
Change-Id: Ibf548da4aa600bdc7848cba1947436e56ac48a4a
2017-05-24 16:09:04 -05:00
Matěj Suchánek 1a8f784a6c Fix missing number in message
Change-Id: If1a96e8452b3ee64a6ad2a058c4e5b88ee1e5870
2017-04-29 13:29:51 +00:00
Stephane Bisson e81bc9aabe Rephrase notification-header-mention-failure-too-many
Rephrase this message to express the fact that the mentions
below the limit were sent. Only the mentions in excess of the
limit were not sent.

Bug: T144614
Change-Id: I63ff5e089ccdcbc59e25466b841264b18d9556bc
2017-04-28 13:59:02 -04:00
This, that and the other 3f99672d5e Add proper message when user group expiry is changed
There's a lot more that could be done to improve user "rights"
notifications (really user group notifications), but this will do for now.

Bug: T159301
Depends-On: I5d32445f8e5b41599889b8488a2431e7a908f858
Change-Id: I27d52bc5c39219c832bf63a491faa1e421b0c024
2017-04-10 11:38:49 -07:00
Justin Du 67f926707e Add GENDER support to a few Echo messages
* echo-email-plain-footer
* echo-email-html-footer-preference-link-text
* echo-email-html-footer-with-link

Bug: T145439
Change-Id: I2d55a617910efa11effef1a469e6d845eebc5591
2016-12-28 10:43:40 -06:00
Amire80 abc76c9e08 Split API messages to a separate file
There are many API messages in Echo, so to make it easier
for translators, they are now in a separate group.
This is similar in Flow.

Must be merged along with the translatewiki change at
Iecedfe4cb9dc8e62a446a3e1c415a79e116ca27e

Change-Id: I1d3baea708107a7f15bf19671f7386eaf7e33a1b
2016-12-16 15:27:03 +00:00
Brad Jorsch f608d73287 Update for API error i18n
See Iae0e2ce3. Since Echo master requires core master, this just depends
on the master patch instead of trying to maintain BC.

Depends-On: Iae0e2ce3bd42dd4776a9779664086119ac188412
Change-Id: Icc088b31bc99e03ac88dfb44329df55318bf99b5
2016-11-14 12:48:24 -05:00
Moriel Schottlender cc36178e4a Add {{GENDER}} support to dynamic action messages
Make sure we pass the current user to the message, since empty
{{GENDER:|}} doesn't seem to work in PHP.

- Add parameter to documentation
- Add {{GENDER}} syntax to en.json as example
- Add parameter to the message creation

Bug: T144538
Change-Id: Ifc5e3bbe8309cc9ce120b7d61cdc050d7055aacc
2016-09-12 15:30:29 -07:00
Jakob Warkotsch f77d2eff6c Improve mention success and failure messages.
Bug: T143084
Change-Id: Ia6ed8acf33a39971fbe2927ebbb7b403838efc80
2016-09-05 12:33:49 +02:00
Moriel Schottlender f449c68780 Add confirmation popup widget
Mainly used for mobile actions, and should be appended to the
overlay - this widget assumes it should appear and then fade out
with some confirmation message.

Also moved 'doubleCheck' icon to the ooui definitions, including
an inverted icon that is necessary for this widget.

Bug: T141404
Change-Id: I67a44962eaee6b7bd8cac26dcb5277177fa5d224
2016-08-31 14:47:59 -07:00
jenkins-bot 4e99a5095f Merge "Add dynamic secondary actions to notification items" 2016-08-23 17:43:08 +00:00
Moriel Schottlender 480ce92bd8 Add dynamic secondary actions to notification items
Allow extensions to add dynamic actions that perform some
API request and display a confirmation message.

Bug: T132975
Change-Id: Ib16d57c3f1a11a9749564c6e2112bf1ca32c55e8
2016-08-22 16:04:48 -07:00
jenkins-bot 61b8e59b2d Merge "Add bold names for mentions status notifications" 2016-08-18 20:22:32 +00:00