Commit graph

34 commits

Author SHA1 Message Date
jenkins-bot 3eda03ac98 Merge "Special:Notifications JS even when no local notifications" 2016-07-08 18:19:49 +00: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 90bc75912c Special:Notifications JS even when no local notifications
Launch JS version of Special:Notifications even of the
user doesn't have any local notifications.

Bug: T139512
Change-Id: Ia01a57de307b0d7da6a7d81ec8ee32d02ccc1887
2016-07-06 15:24:46 -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
Moriel Schottlender bbf2ba7e7b Change link to help page on Special:Notifications
Bug: T138395
Change-Id: I6b9476206c53925a9d63b41da4b2fde33c739584
2016-06-22 12:38:38 -07:00
jenkins-bot 45013bb676 Merge "Fix notification pager" 2016-06-01 22:23:31 +00:00
Matthew Flaschen f88c90efce Fix notification pager
Needs to use Echo-specific DB

Bug: T136759
Change-Id: Ibdd71a76e751b0b8d115e86cb7eefab79cc56510
2016-06-01 18:04:11 -04:00
Matthew Flaschen 188e8d7395 No-JS special page: One-click mark as read
Bug: T136361
Change-Id: I7896dbdf25d2c1624f97777f4c8d0af41b195ef0
Depends-On: Ic31f857c749d62a32cafae68dc3f1cbd86e1e382
2016-05-27 17:23:29 -07:00
Stephane Bisson 1bef12c3e7 Stop outputting $nextContinue in Special:Notifications
Bug: T129176
Change-Id: If0d05cb1df0b2e0f93c7367c0848fbcbb04fea8d
2016-05-27 16:46:20 -07:00
jenkins-bot 95bea57983 Merge "Initial version of Special:Notifications Javascript page" 2016-05-27 21:34:44 +00:00
Moriel Schottlender 9262614ded Initial version of Special:Notifications Javascript page
Bug: T129176
Change-Id: I2f55358c16f78e234ec19154b944a4edebfbe639
2016-05-27 13:42:25 -07:00
matejsuchanek 38adb78619 Use native MediaWiki linking to help pages
There was quite a small link under the main title in Special:Notifications
which pointed to a related help page. Now the OutputPage::addHelpLink()
method is used which moves this link to the upper right corner and allows
configuring this on-wiki (instead of LocalSettings.php or so).

Bug: T101057
Change-Id: Ib4aecee8006b8d71bb3cd86f1d4ebdfee9080870
2016-05-27 20:40:41 +02:00
Stephane Bisson 52525249e6 Adjust styling for "Mark group as read"
Bug: T134204
Change-Id: Ia0486fa400be7e96ffc4e1ad47f952c17f40042c
2016-05-26 13:30:49 -07:00
jenkins-bot cdbe707f4f Merge "Set doesWrites() for SpecialNotificationsMarkRead" 2016-05-25 19:58:34 +00:00
Aaron Schulz df5ee8ef8e Set doesWrites() for SpecialNotificationsMarkRead
Change-Id: I782e66a468a0d57ab8a5bb3b38c92f334635a3a7
2016-05-25 11:17:07 -07:00
Stephane Bisson c96bc7ec38 Pagination on no-js Special:Notifications
Bug: T129169
Change-Id: I48aff35352bbda7f8818d456284c5c7adb346bb1
2016-05-23 15:39:43 -07: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
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
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
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
Kunal Mehta 2892108b65 Special:Notifications formatter
I'm not really sure where to stick the primary link. I could wrap the
entire notification in a <a> tag, but all the text becomes ugly (I
suppose we could hack around it with CSS?). For now I just added it
before all the secondary links.

Change-Id: I4f6add9ecfb367660d1a6346825382ad415bdb77
2015-11-25 10:22:04 -08:00
Matthias Mullie a35bf21084 'Load more' check should be based on retrieved data, not what could render
Since EchoEventPresentationModel::canRender can reject notifications,
its result should no longer be used for infinite scroll.

Current code checks if the amount of to-be-rendered data exceeds what
we need to display, but if we reject some notifications that may no
longer be the case, even though there is more data still.

Change-Id: I3e5f8c2d1fc0c63db7b277324c96af043689ddce
2015-11-18 11:06:22 +01:00
Kunal Mehta ba957d399a Allow presentation models to indicate a notification can't be formatted
Adds EchoEventPresentationModel::canRender() for notification types to
indicate that something can't be rendered if for example, a page is
deleted.

In that case, the notification is marked as read in a deferred update.
All callers were also updated to check if the notification was formatted
properly.

Bug: T116888
Change-Id: Idb975feaec893ef86c41cc487102e3539c07e328
2015-10-28 18:28:08 -07:00
Kunal Mehta 1f366807d6 Don't use $wgLang in DataOutputFormatter
Require callers to pass it in.

Change-Id: I94ec940495a681151b289294186121462d4b5b5c
2015-10-26 08:37:57 -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
Kunal Mehta b539621b7f Split up ext.echo.nojs into badge and notifications styles
And rename "nojs" to "styles". It was supposed to mean base styles that
are used by no-JavaScript and JavaScript mode, but it confused people.
Hopefully "styles" is clearer.

Change-Id: Ie8d668fb0d95a9162392c5fa7c3200bcacef1025
2015-09-16 12:52:12 -07:00
Aaron Schulz cf721adf63 Also defer the markRead() master updates
Bug: T92357
Change-Id: Ia85a1e431b27f6ef528dce894e98878ffe2d60d3
2015-09-15 13:05:10 -07:00
Kunal Mehta 3940f523ba Only load nojs Special:Notifications styles on the special page
Bug: T112407
Change-Id: I4112c8b819127dea7c5e2117feedfeecf583ef1f
2015-09-12 21:23:08 -07:00
Aaron Schulz 15772bce36 Defer the "seen time" updates on GET requests
Bug: T94448
Bug: T92357
Change-Id: I241662f9fd9aa13ef7468c9d76c26e58746f215a
2015-09-10 15:56:12 -07: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
Niklas Laxström 81f8df2249 Userlogin is canonical name, not UserLogin
Fixes: PHP Notice:  Found alias defined for Userlogin when
searching for special page aliases for UserLogin.

Change-Id: Ib64d4c76d3915ae752a9c56eb9635653e0da5623
2015-07-08 11:26:27 +02:00
Kunal Mehta 9d08c96fad Move all PHP code into includes/
Mainly because I was annoyed at m<tab>o<tab>d<tab>u<tab> to reach
modules/.

Change-Id: Ib149cb2e2612ccddd0503f9d0c5d05b554860a00
2015-06-07 18:54:14 -07:00