Commit graph

60 commits

Author SHA1 Message Date
Umherirrender dbfcd23b3b Pass correct IContextSource to HTMLForm
The special page is only a MessageLocalizer, not a IContextSource.
Its implements all methods of IContextSource, but are delegated to the
underlayed IContextSource. So pass it directly make phan happy, while
the current code works as expected

Change-Id: Ia9d83f2f71a466a2ba74540f96f165c96fb7ca00
2018-08-11 05:44:52 +00:00
Thiemo Kreuz cb282251a8 Avoid counting where not necessary
Change-Id: I0abbdced4474dabbdecd3bbfae194e79b7c29db1
2018-06-26 07:10:38 +00:00
Umherirrender b166664efc Fix parameter docs
Change @param to @var
Add |null to nullable arguments
Removed comment out code

Change-Id: I535ad4d544284c1e0fb6f39c254761f0810b4cc7
2018-04-06 08:17:17 +00:00
Ed Sanders 34e3d5feba Replace double-check with checkAll from OOUI
checkAll was specifically designed as a
replacement for double-check.

Change-Id: Ibdd6865213107650b9004ab40e12c6a7453b6251
2018-03-22 21:23:33 +00:00
libraryupgrader 83bdf90eb5 build: Updating mediawiki/mediawiki-codesniffer to 16.0.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.MissingCovers.MissingCovers

Change-Id: I2a48e5c27a7307b3982d11875180fc11f2a125d9
2018-02-15 09:51:55 +00:00
Kunal Mehta 0209f4eb2f Don't use deprecated SpecialPage::getTitle()
Change-Id: I20c7d058bb25207705c08fe293800a6d1e0aab0e
2018-02-04 18:53:08 +00:00
Thiemo Mättig 2e9a27558c Minor cleanups to PHPDoc blocks
Change-Id: I5890144521b6b54c798b1590ab8d102d74ada26a
2017-12-15 15:42:38 +01:00
libraryupgrader 7a23ddf4b0 build: Updating mediawiki/mediawiki-codesniffer to 13.0.0
Change-Id: I7b19fab3b1100c4973600ec95ee24160e141c5ac
2017-09-24 09:49:43 +00:00
jenkins-bot e74713a3ba Merge "Add 'Mark all as read' button" 2017-08-13 16:19:56 +00:00
mdew192837 e88185c54e Add 'Mark all as read' button
Currently, the 'Mark all as read' button exists only for JS users.
This patch adds the button for no-JS users as well.

Bug: T96061
Change-Id: I1a62c56306597209540ffd694c8fb7b2a92885c9
2017-08-13 10:55:46 -05:00
Umherirrender 5b4730c9bc Improve some parameter docs
Change-Id: Ie71fb080926781f2905e6264be060203c56185ea
2017-08-09 17:21:10 +02:00
Kunal Mehta aaf061c725 build: Updating mediawiki/mediawiki-codesniffer to 0.9.0
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.ExtraParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamComment
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
* MediaWiki.Commenting.FunctionComment.MissingReturn
* MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
* MediaWiki.Commenting.FunctionComment.WrongStyle
* MediaWiki.FunctionComment.Missing.Protected
* MediaWiki.FunctionComment.Missing.Public
* MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName
* MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment

Change-Id: I8401abf121a7413fa191d7bc535e0ddd6cf8c3f7
2017-06-22 14:13:28 +00:00
Stephane Bisson c46d56b018 Special:Notifications show unread by default if there's unread notifications
Bug: T162927
Change-Id: Ibdfaca90803eb8b12b12eb1781b0692e7336b7d9
2017-04-19 15:20:12 -04:00
James D. Forrester 8c810dff48 build: Update mediawiki/mediawiki-codesniffer to 0.7.1
Also added "composer fix" command.

Change-Id: I25cb61b3b92798f1259d1575a336e2b056d5764f
2016-12-05 15:54:30 -08:00
Roan Kattouw ed613f2e26 Fix missing doublecheck icon on Special:Notifications on mobile
Bug: T146706
Change-Id: I918beabb1bcbe4a66c4252a795d379e2ff6591a9
2016-11-23 16:31:23 -08:00
Moriel Schottlender 97a7d44190 Clean up Special:Notifications output
Transform the php output to OOUI widgets.

Bug: T129172
Change-Id: I65cb5f2a016fc2a3c33a0b1cd2f3f88ed963ab02
2016-09-01 13:38:06 -07:00
Roan Kattouw ff2c58cdc4 Follow-up 8eda2aa3f: actually render the nojs message on Special:Notifications
Change-Id: Id0d931f8465c2abfa41b1053ec2b2d0a632037ed
2016-08-22 16:16:41 -07:00
Matthew Flaschen f36d20ba4d Fix special page visit logging
'version' was missing, making the event invalid, causing it to
not reach the database.

Factor out this field to logEvent

Bug: T121939
Change-Id: I9e4bb5574d69495cb5f53830047c68104c6ad10f
2016-08-22 16:35:50 -04:00
Moriel Schottlender 8eda2aa3fa Include the 'no notifications' message in nojs div
...So it can be hidden if JS is loading.

Bug: T142451
Change-Id: Idd70bdacb79cb45e759b30e711178721db5f80bd
2016-08-16 17:25:14 -07:00
Leszek Manicki ab2bf21ce5 Check if logging is enabled before logging EchoInteraction
Adds a check before logging a visit to Special:Notifications
added in Icfe63fb8daa8e8fba029e22b4de3e4f65517c448

Bug: T143092
Change-Id: I9e58ba35eef6a25a78e96a76facc04819cef37da
2016-08-16 14:39:02 +02:00
jenkins-bot dc397a9ec4 Merge "Log Special:Notifications page visits" 2016-08-16 00:23:31 +00:00
Moriel Schottlender 015acb5407 Log Special:Notifications page visits
Bug: T121939
Change-Id: Icfe63fb8daa8e8fba029e22b4de3e4f65517c448
2016-08-15 17:10:56 -07:00
Stephane Bisson a0cca6c127 Output wgNotificationsSpecialPageLinks js var even if no local notifications
Bug: T142148
Change-Id: Id9225b9aa95a7a8ee8602282ed0d4619c7ce2bf5
2016-08-05 09:26:35 -04:00
jenkins-bot 834c240948 Merge "Adjust mobile view for the new settings cog menu" 2016-07-25 20:12:38 +00:00
Moriel Schottlender 1dd3af10bb Adjust mobile view for the new settings cog menu
Now that we have the cog menu, it should be placed correctly in
mobile and the "preferences" link should be hidden.

Since MobileFrontend doesn't have the personal toolbar, and we
can't cheat by using jQuery and grabbing the url of preferences,
we have to get SpecialNotifications.php to output the urls
to a wg variable and reading it from there.

Bug: T115528
Change-Id: I6a69823d6f75c376c04e9a21d79916321e417178
2016-07-25 19:30:44 +00:00
Stephane Bisson bfcfdded40 Special:Notifications (no-js): filter out deleted events
Change-Id: Ie2e6b3ba388650f28ddc050624a52c410248fbd8
2016-07-25 12:21:14 -04:00
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