Commit graph

146 commits

Author SHA1 Message Date
Moriel Schottlender 4b137b3208 Followup Ib7f4dc4ea: Bring back message tooltip with 'notice' text
The message for tooltip-pt-notifications-message was removed to comply
with the new naming. The problem is that in the back end, sections are
still defined as 'message' vs 'alerts' and the sections in the user
toolbar are defined with those terms. In no-JS mode (which is before
the user clicks any of the badges) this tooltip is created automatically
by MediaWiki based on class names.

It's easier to return the message key with different text for translation
and wait for the bigger tech debt to correct all instances of 'message'
to 'notice' (including in the API, which would require a much more
massive work)

Bug: T139520
Change-Id: I6368b63e38f64aa065f2580df812de1c63a93716
2016-07-07 17:09:18 -07:00
Moriel Schottlender 7879f0c9f8 Change 'messages' to 'notices' throughout the interface
Bug: T139520
Change-Id: Ib7f4dc4ea1ff4c5d1fccdc5fdf0c66b049162cb2
2016-07-07 15:57:49 -07:00
Stephane Bisson f8a8d392d6 Expandable bundle
Support bundles being expandable
to show their sub-notifications.

Bug: T114356
Change-Id: I1507cae360f45cc87f2d60e966b4d047abfa202d
2016-06-28 15:37:54 -04:00
Stephane Bisson 24caf50ff6 Dynamic bundles
To allow individual notifications to be
marked as read/unread or moderated,
bundles are created by grouping associated
notifications when they are fetched for display
instead of when they are created.

From a product perspective, this change doesn't
introduce moderation or expandable bundles but
it counts each individual notifications.
For instance, the bundled notification
"3 new topics on PageA" now counts as 3
notifications.

Bug: T93673
Bug: T120153
Change-Id: Iacd098573efd92bb1e3fcd7da4cd40cea9522f15
2016-06-27 09:49:13 -04:00
Roan Kattouw 7d97881344 Add support for querying notifications not associated with any page
Uses the magic value '[]' to mean 'no title'. This is a bit ugly,
but I think introducing an additional &notwithouttitle=1 parameter
is uglier and results in more code.

Change-Id: I83278182aeaf3905eb0f3e24c4c6c247720b1e76
2016-06-24 00:37:21 +02:00
Moriel Schottlender 820d2b0fa7 Add a cross-wiki sidebar to the Special:Notifications page
Add a sidebar with cross-wiki sources and pages of unread notifications.
The filter allows the user to fetch notifications from a foreign source
and specific pages if those exist.

Bug: T129366
Change-Id: I57d827a47f80274d75364c2099a9624049a26834
2016-06-21 14:49:42 -07:00
Roan Kattouw 016e6dabda ApiEchoNotificatons: Add nottitles parameter
To only show notifications related to a certain title
(or set of titles).

Bug: T137139
Change-Id: I5c82e02bc8e8553c5b761a771b975f03d943d408
2016-06-13 20:19:32 +01:00
Moriel Schottlender cf99479468 Display a message if there are no notifications in Special:Notifications
The zero results can either be because there are no notifications
at all for this user in the local wiki, or because there are no
results for the specific filter. Both messages are used for either
case.

Also, clean up the display of push/pop pending for the inbox widget
and hide the label in case the message count is 0 or 1 notifications
as it is unhelpful and irrelevant in these cases.

Bug: T136586
Bug: T136574
Bug: T129363
Change-Id: I1465f772bb9f5247df645d6612f951e5fd7d38cf
2016-05-31 23:13:48 +00:00
jenkins-bot ec34b25758 Merge "Unread pages API" 2016-05-31 18:29:07 +00:00
Matthias Mullie f751e96839 Unread pages API
The query shouldn't be too expensive: it'll use an index to narrow
down the resultset for 1 user. After that, it'll be sorted based on
a grouped by value, but that should fit in memory: it'll never be
on more than 2000 entries, which is the max amount of notifications
per user.

Change-Id: I271ea7f7a6e010284739bfce02c4ec8a077148fc
2016-05-27 17:24:53 -07:00
Moriel Schottlender e5e19dd0f1 Filter notifications by read state in Special:Notifications
Change-Id: I7b47e76ae48eaf4732d99616baa3b4b1ee4ddff5
2016-05-27 13:47:41 -07:00
Moriel Schottlender 9262614ded Initial version of Special:Notifications Javascript page
Bug: T129176
Change-Id: I2f55358c16f78e234ec19154b944a4edebfbe639
2016-05-27 13:42:25 -07:00
jenkins-bot e9482fbd34 Merge "Remove technical error from echo-api-failure" 2016-05-26 22:55:46 +00:00
Stephane Bisson 194b75cfed Remove technical error from echo-api-failure
Bug: T129764
Change-Id: Ia8779ff90b71c1c8b4df5b28fd61bfb891533b06
2016-05-26 13:43:14 -07:00
Stephane Bisson 52525249e6 Adjust styling for "Mark group as read"
Bug: T134204
Change-Id: Ia0486fa400be7e96ffc4e1ad47f952c17f40042c
2016-05-26 13:30:49 -07:00
Stephane Bisson cb6e6e96cd Build lego message for HTML email footer
Change-Id: Ic750ff3eb4e97c0cd23dd39a998c60860a49cf45
2016-05-19 06:19:38 -04:00
Stephane Bisson 46e69972c6 Bring back messages used by old email formatter system
Bug: T135446
Change-Id: I235db93c0f50424da8bc30bcafd717c50a6b0b62
2016-05-17 10:37:39 -04:00
Stephane Bisson 8d351ebe45 New error message for failed to fetch notifications
Bug: T129764
Change-Id: Id35d203964ffce9d03b3083e0c0d9c0eeb3b6099
2016-05-16 08:56:25 -04:00
Stephane Bisson 6f6e10084c HTML email formatter using presentation model
Bug: T121067
Change-Id: I77f466f0b507ffa49a9714ddba95bea8db1d8438
2016-05-12 09:29:24 -04:00
Moriel Schottlender 8f5c718a4f Add 'mark section as read' to Special:Notifications
Allow marking notifications as read per 'section' (days) in the
Special:Notifications page.

Bug: T115528
Bug: T134204
Change-Id: I7324a2c693aa92b9327cf8ff98f125293d5fba10
2016-05-11 20:00:24 +00:00
Moriel Schottlender 15a44768f4 Add mark-as-read button to notifications in Special:Notifications
Bug: T115528
Change-Id: I54dba5f86d28a069659d66dede5b7ab9981213aa
2016-05-11 10:41:32 -07:00
Kunal Mehta b6f742bc46 Add plain text email formatter
Formatters based on presentation models for
individual event emails and digest (daily, weekly)
plain text emails.

Bug: T121067
Change-Id: I4eceaf521315adab7429a8a73ffca70ebcddab86
2016-05-04 13:35:37 -04:00
jenkins-bot f4897e11b2 Merge "Server-side crosswiki requests" 2016-05-04 17:13:23 +00:00
Matthias Mullie ae3e8a6b8c Server-side crosswiki requests
Passing a param 'wiki' with a list of wiki names will now
result in getting notifications from these wikis too.
It'll execute multi-curl calls to the given wikis to fetch
their results.

Bug: T130636
Change-Id: I89df54366501acfe3e5cf6d2f313ee32694ba387
2016-05-03 17:45:45 -07:00
Roan Kattouw d6aba7613e Clarify beta feature description
Bug: T134014
Change-Id: I933169e2d7a6e1cc5a4e7134748702f8efb21b85
2016-05-02 15:16:53 -07:00
Matthew Flaschen 6d6845d9e4 Display special: Add which section (curr. Alert v. Msg.) each type's in
Replace getAlertEvents and getMessageEvents with
getEventsForSection.

Also, add IDs for linking to sections

Bug: T123018
Change-Id: Ic480320a52a401609d853fc8c75c781b89bb8722
2016-04-28 20:33:52 +00:00
Roan Kattouw 4f7f1a3a09 Repurpose survey call-out in the footer for beta feature invitation
Removing the info popup because we don't have to show
a privacy notice when linking within the wiki.

This adds a database query to every page view for logged-in
users; If78bfc710, once merged, will fix that.

Bug: T117669
Change-Id: I8451db34ae8e94264e4921ecd6df6e4b32c7623a
2016-04-27 07:23:30 +00:00
jenkins-bot 2bc334cc62 Merge "Unlisted special page for displaying notification configuration" 2016-04-23 03:54:08 +00:00
Matthew Flaschen d27f32f9b1 Unlisted special page for displaying notification configuration
This provides a simple unlisted special page,
Special:DisplayNotificationsConfiguration, to document how the
notifications are structured and configured.  It shows:

* Which types are in each category
* Which notify types (web/email) can be enabled for each category
* Which notify types are mandatory for each category
* Which notify types are enabled by default:
** For existing users
** For new users

Bug: T132127
Change-Id: I25b447a69a7c984941dfd703345d7977c0000bfe
2016-04-22 20:31:04 -07:00
Matthias Mullie 57ee975984 Change (opt-out) noforn to (opt-in) crosswikisummary
I thought the name was confusing, and would be even more so
if we get real notifications from other sources.

Meanwhile also split $crossWikiSummary into 2 properties:
- 1 with the class
- 1 to indicate if it should be used

Change-Id: I0e83be7924c8c77680ea1ada3f2bd6a190ce6149
2016-04-22 12:14:21 -07:00
Matthias Mullie e8d1f6a888 Remove param index
It's (mostly) unused, and it would become problematic once we have
notifications from multiple places (where those ids could conflict)

Change-Id: Ib3bb5ae1e5689037b38290c9ce3d8691f52582b0
2016-04-21 13:33:15 +02:00
jenkins-bot 9a10f73af1 Merge "Display only one foreign bundle on mobile" 2016-04-19 16:19:05 +00:00
Stephane Bisson 2851419e6b Bold 'talk page' in edit-user-talk bundled notification
Bug: T131476
Change-Id: I269cfad73a70ec60940bf5e18623261e0fa932b6
2016-04-19 16:07:22 +00:00
Stephane Bisson 62216cab80 Display only one foreign bundle on mobile
Display a single foreign bundle containing both
alerts and messages on mobile.

Bug: T131683
Change-Id: I9d3d160586c31457d3a1825e9cecadde42debf7c
2016-04-19 16:02:41 +00:00
Stephane Bisson f3ce2de964 Add tooltips for 'mark as read' and 'more options'
Bug: T130831
Change-Id: I1533d20019157c05f9354a60661512a33920c336
2016-04-15 16:30:14 -04:00
jenkins-bot f082457d27 Merge "Revert "Add GENDER support to tooltip messages"" 2016-04-02 15:07:59 +00:00
Siebrand 543d75c472 Revert "Add GENDER support to tooltip messages"
There was no need to merge this, and I suggest it is reverted. Parameterless use of GENDER is supported
 already.

"{{GENDER:|male|female|other}}" will switch for the
current user.

This reverts commit c8b80f2003.

Change-Id: I15a0bd79abea9d9f0e9b0547c87e848ebf88b5de
2016-04-02 13:41:56 +00:00
jenkins-bot e9de6bbc29 Merge "Add GENDER support to tooltip messages" 2016-04-01 09:58:38 +00:00
Justin Du c8b80f2003 Add GENDER support to tooltip messages
https://translatewiki.net/wiki/Thread:Support/About_MediaWiki:Echo-pref-tooltip-mention/es

Change-Id: I10228205785527b273c1fd06af85fcc26df9e583
2016-03-31 22:50:17 -05:00
Moriel Schottlender 2df435c1fb Styling changes to the footer message
Change-Id: Ie57c0f981671392b751a9774de7be6bb187de3b8
2016-03-24 15:42:10 -07:00
jenkins-bot cf99b3214e Merge "Add footer notice widget for invitations for feedback" 2016-03-22 19:32:57 +00:00
Moriel Schottlender e50ef3841a Add footer notice widget for invitations for feedback
Add a mw.echo.ui.FooterNoticeWidget that includes a link to
a feedback survey, and three config variables:

* $wgEchoShowFooterNotice: Enable this feature per wiki
  (Defaults to false)
* $wgEchoFooterNoticeURL: The URL for the survey
  (Defaults to '')
* User preference 'echo-dismiss-feedback-alert': determines
  whether the user permanently dismissed the feedback alert.
  (Defaults to false)

Bug: T128937
Change-Id: I918a70beaba7b173e764519fe4fe0f780b61082d
2016-03-18 17:02:31 -07:00
Roan Kattouw b484c4c4d3 Change bundle collapse label from "Collapse all" to "Collapse"
Bug: T130358
Change-Id: Ief7d057a2221d85d8b3702c57914092cf0a10c12
2016-03-18 16:10:50 +00:00
Siebrand Mazeland 8f9bd4be91 Use strong and em instead of wiki markup bold and italics
Change-Id: I9ef1846984c5d5192f73715ed9341740b5a6e8c0
2016-03-18 04:54:24 +00:00
jenkins-bot 8b15325346 Merge "Make plural support for large values (100 or more) explicit in l10n" 2016-03-17 21:53:40 +00:00
jenkins-bot 299006ab69 Merge "Add i18n/en.json authors" 2016-03-17 20:42:25 +00:00
Amire80 1de453d0c6 Add i18n/en.json authors
The names wereound by running `git shortlog -s -n`
on i18n/en.json and on the old Echo.i18n.php.

Change-Id: Ie3837e0a6df6d368ee1e0952fd29bdd2fa209486
2016-03-17 13:30:46 -07:00
jenkins-bot c7cdd8bf20 Merge "Always show a cross-wiki notifications preference, even if the beta feature is disabled" 2016-03-17 10:05:03 +00:00
Matthew Flaschen cac85b635f Make plural support for large values (100 or more) explicit in l10n
This involves:

* Making this value no longer admin-configurable.
* Changing getNotificationCountForOutput to return only a single value
  Since there is no + in the formatted value anymore, we can actually
  use the same value for both.

  This is a B/C break, but hopefully worth it to simplify the method
  call.

  For now, the excess parameter is just marked unused.  It could be
  removed at some point if the translations are updated.

This must be merged at the same time as:
* Flow - Ibfa56b1af9e8c56b4c5f900e0d487bc09688b2a2
* MobileFrontend - Ibf784b279d56773a227ff261b75f2b26125bbb63 (well, MF
  can be merged first)
* translatewiki - I2a4b6938aed49e4101deb6b9351c43656a863490

Also, change 1 to One/one, per Siebrand on the task.  This can easily
be dropped/undone if we don't want it.

Also, remove reference to no-longer-existent notification-page-linked-bundle

Bug: T127288
Change-Id: Iabeaae747f99980c0610d552f6b38f89d940b890
2016-03-16 18:43:16 -04:00
Moriel Schottlender 8657ef5e90 Allow mark-as-unread in notifications
Add a 'mark as unread' to all unread notifications and allow them
to be marked unread. These notifications will no longer be automatically
marked as read when the pages they refer to are visited.

Bug: T73564
Change-Id: I677d3c0399e46fd7c35531df1cc0e61db2d4eb1b
2016-03-11 14:05:10 -08:00