Commit graph

3813 commits

Author SHA1 Message Date
Stephane Bisson 6e2236db81 Moderate notifications
* When a page is deleted, moderate associated
  notifications. When it is undeleted, unmoderate.

* When a notification cannot be rendered
  (canRender() returns false), moderate it.

The biggest advantage of moderation over mark-read-and-ignore
is that those notifications are filtered out at the database
level from this point on. They are not re-processed every single
time and do not affect the number of notifications returned by
the API.

Bug: T140327
Bug: T140836
Bug: T141463
Change-Id: Idefe78408fd584c13aaa9174cee3055539d92848
2016-08-19 22:20:04 +00:00
Jakob Warkotsch 1afd529a67 Log potential notification for mentions on changes
This logs whenever a user gets mentioned in a change as
long as a signature is added in the same edit.

Bug: T138938
Change-Id: I2a775d1dcac6a947b353c8bd2f7be70b6384641f
2016-08-19 22:05:16 +00:00
jenkins-bot f48b44bacd Merge "Log edits in multiple sections that could trigger mentions." 2016-08-19 22:00:43 +00:00
jenkins-bot d51d1ebc23 Merge "Make Monobook use the same badge color scheme as Vector" 2016-08-19 21:58:30 +00:00
jenkins-bot 3fe453cd78 Merge "Make dotdotdot menu not be extremely wide" 2016-08-19 21:58:29 +00:00
Roan Kattouw b9b1363ca6 Make dotdotdot menu not be extremely wide
Work around new styles introduced in oojs-ui in I77cd5212c.

Bonus: remove useless styles targeting the dotdotdot popup
in NotificationItemWidget.less: it's not even a popupWidget
any more and it's located in an overlay anyway, so these
styles didn't do anything.

Change-Id: Ifb16b7bb0b01c1eb2551ba4c173042cc759e9b02
2016-08-19 14:48:29 -07:00
Roan Kattouw 383f424576 Move the badges down a bit in Monobook
So that they don't touch the top of the screen.

Change-Id: I0ebfce76522540c879cc1440ea333143ce1855d9
2016-08-19 14:33:48 -07:00
jenkins-bot 50ce51fdf0 Merge "Tweak badge styles" 2016-08-19 21:14:49 +00:00
Translation updater bot 130f777e70 Localisation updates from https://translatewiki.net.
Change-Id: Iad670bc27d9de6e841ef8bd86bcbd1a7afedba7a
2016-08-19 22:38:39 +02:00
jenkins-bot d35c5825d8 Merge "Always use php based diff in EchoDiscussionParserTest" 2016-08-19 15:11:38 +00:00
addshore 5dd9858f4e Always use php based diff in EchoDiscussionParserTest
The previous check here meant that different
setups could run these tests with current diff
engines thus these tests could result in different
successes / failures.

Change-Id: I62a52dee1dd1ecd2ebd36e1aa540245e90a57ddd
2016-08-19 13:34:54 +01:00
jenkins-bot 9604dd8804 Merge "Make server-side logging always check whether schema is enabled" 2016-08-19 09:56:56 +00:00
Matthew Flaschen 2186e9a6b6 Make server-side logging always check whether schema is enabled
We have a convention to put a logger helper function in
MWEchoEventLogging, so also enforce that:
* Rename to actuallyLogTheEvent to logEvent and centralize the
  'enabled' check there.
* Make that protected, so new schemas also use a helper function
  for consistency.

Bug: T143092
Change-Id: I8085fc5898f3420172355c5a2df04aac6add9acd
2016-08-18 21:09:48 -04:00
jenkins-bot f35c0f0715 Merge "Mobile action menu should stick to bottom of screen" 2016-08-19 01:08:40 +00:00
jenkins-bot 61b8e59b2d Merge "Add bold names for mentions status notifications" 2016-08-18 20:22:32 +00:00
Moriel Schottlender 0b28b4c67a Mobile action menu should stick to bottom of screen
Just like we do in the mobile popup, the menu should be accessible
in mobile clicks/taps by being "stuck" at the bottom of the screen.

Bug: T142013
Change-Id: I730216e717c2a02ad98bbcc28f66b13c1cbe29ed
2016-08-18 13:12:22 -07:00
WMDE-Fisch 66ecc1f0e7 Log edits in multiple sections that could trigger mentions.
This patch logs multiple section edits that could trigger mentions.

Since we only want to send mentions when userlinks and signature are present
in the same section a new method was added extracting sections and the related
content from an addition. The results are checked whether a section content
contains a signature and might be relevant for mentions.

Bug: T141863
Change-Id: Ib06cd855b2c7fbd51d8ab6602882cb38aadf8350
2016-08-18 14:58:00 +02:00
jenkins-bot 8f7edc6901 Merge "Revert "Dim the title of current wiki if it has 0 notifications"" 2016-08-17 23:01:15 +00:00
Catrope 0e52416fcb Revert "Dim the title of current wiki if it has 0 notifications"
We decided we didn't want this behavior after all.

This reverts commit eadaac1c84.

Bug: T139646
Change-Id: Ib71f8000a59e66968c0fa161e3ab59b9ebdb3b1a
2016-08-17 22:51:28 +00:00
Translation updater bot 25cb212b79 Localisation updates from https://translatewiki.net.
Change-Id: Iaf6b8dbc34c21abd1f1a4b228502fc6e7d103b15
2016-08-17 22:38:20 +02:00
jenkins-bot 133f20bd20 Merge "Make excerpts in bundles not italic, but still grey" 2016-08-17 14:04:57 +00:00
Roan Kattouw f9ac794133 Make Monobook use the same badge color scheme as Vector
In the unseen notifications case, Monobook used badges with
black text on a light red/blue, even though the text
is white on grey in the non-unseen case. Change the unseen style
to white on dark red/blue like Vector, and also make the colors
exactly the same as Vector.

Change-Id: I9d2d1a2614ac1130e027fb952c9288588d25d495
2016-08-16 17:38:46 -07: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
jenkins-bot 435fe70fe0 Merge "Add a rasterized email icons to Echo modules for email" 2016-08-16 23:27:04 +00:00
Translation updater bot acd33a04f5 Localisation updates from https://translatewiki.net.
Change-Id: If41b37157b223dd1d1e10d6ceb3f7c62767ac1fe
2016-08-16 22:41:23 +02:00
Roan Kattouw 3cbddb546b Make excerpts in bundles not italic, but still grey
Bug: T141034
Change-Id: I34c376a97e222257ae660149e0fb8172128eb8c0
2016-08-16 11:48:01 -07:00
jenkins-bot d499577f6a Merge "Take seentime into account in the CheckLastModified hook" 2016-08-16 13:53:05 +00:00
jenkins-bot 3be48f6f2b Merge "Added a period to "Notification-header-reverted"." 2016-08-16 13:47:29 +00:00
Leszek Manicki 975be8fb45 Flip the parameter name and its type in phpdoc of MWEchoEventLogging
Also adds a type hint to MWEchoEventLogging::actuallyLogTheEvent
parameter.

Change-Id: I7538083ec33b5c4538386da22550273d8e882a72
2016-08-16 15:01:57 +02:00
Pmlineditor 98bf9d269d Added a period to "Notification-header-reverted".
Bug: T142917
Change-Id: I38679de5e3fe1142b6b1660c747a573670f16643
2016-08-16 18:30:47 +05:30
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 8947629f52 Merge "Changing "this" to "these" because it refers to plural criteria (filters)" 2016-08-16 00:45:09 +00:00
Quiddity f2c59363c7 Changing "this" to "these" because it refers to plural criteria (filters)
Change-Id: Ie309ccf4a6c7a8817c8ba162c595ba3b2e33c69f
Bug: T143072
2016-08-16 00:36:24 +00:00
jenkins-bot 14da4e33f9 Merge "Log the mark entire cross-wiki bundle as read action" 2016-08-16 00:33:14 +00:00
jenkins-bot dc397a9ec4 Merge "Log Special:Notifications page visits" 2016-08-16 00:23:31 +00:00
Moriel Schottlender 5fefbe4b03 Add a rasterized email icons to Echo modules for email
Make sure we send rasterized png emails instead of SVGs in the
email formatter.

Bug: T127794
Change-Id: Ia28757bda521ec182f75458c8e52d54847d15681
2016-08-16 00:21:13 +00:00
Moriel Schottlender 879ff56756 Log the mark entire cross-wiki bundle as read action
Bug: T127955
Change-Id: Iddff3592915c1f7d71622c1137abc725985fb3c2
2016-08-15 17:18:27 -07:00
Moriel Schottlender 015acb5407 Log Special:Notifications page visits
Bug: T121939
Change-Id: Icfe63fb8daa8e8fba029e22b4de3e4f65517c448
2016-08-15 17:10:56 -07:00
Moriel Schottlender 951f146b54 Emit sortChange only for read/unread actions
Do not emit sortChange for toggleSeen, because every sortChange
creates a fake widget with a flipped 'read' state. There is no
reason to emit the sortChange event in toggleSeen anyways so it
is safer when only emitted in togglRead.

Also, make sure the controller always updates the correct seenTime
from the API when fetching local notifications. This was done for
the special page method but was overlooked for the fetching of local
notifications. For the most part, it shouldn't be affecting too much
because the SeenTimeModel is initialized with wgEchoSeenTime (which
is local) but updating the controller with the API response is the
safe thing to do, and will also cover cases where a tab was open,
notifications were seen in a different tab, and now the popup was
reopened in a "stale" tab again.

Bug: T143067
Change-Id: Ie261e32db28926d04fe14f7badd9d287ddc52749
2016-08-15 16:53:09 -07:00
Roan Kattouw e1a276fe3d Take seentime into account in the CheckLastModified hook
Bug: T134855
Change-Id: Iee5b0365eba6b7aa13a231e906ed1eb5338d436f
2016-08-15 16:41:44 -07:00
jenkins-bot 6eb2743dae Merge "Make footer notice link blue in Monobook" 2016-08-15 23:06:21 +00:00
jenkins-bot 4f06c04476 Merge "Remove noisy logging of every single thank-you-edit notification" 2016-08-15 22:14:29 +00:00
Roan Kattouw 3bc168589a Remove noisy logging of every single thank-you-edit notification
This was good when we were debugging the feature, but
it's working fine now.

Change-Id: I8267cd798625de32d653d836cbb84212909c702f
2016-08-15 22:07:24 +00:00
Translation updater bot 95271b75fd Localisation updates from https://translatewiki.net.
Change-Id: I12516fb1ad4a7a08a6c6b38d145d5f8b257c196d
2016-08-15 22:58:37 +02:00
Roan Kattouw 8016c9628b Follow-up 4e64643eb: Count pageless notifications when counting pageless notifications
Bug: T137502
Change-Id: I9e861cf97d0d8850dcbe732da496e34d434e4554
2016-08-15 11:35:28 -07:00
Roan Kattouw a4caed52cd Make footer notice link blue in Monobook
We have to override a CSS rule that tries to make all <a>s blue,
but not override it so powerfully that the real link in the footer
notice isn't blue.

Change-Id: I5a91419aab7cf6d6fe10c8e707168b52c2451cd8
2016-08-15 11:13:01 -07:00
Roan Kattouw 7b71d734e1 Tweak badge styles
Bug: T141923
Bug: T142454
Change-Id: Id82681369ffcb41b18ea408fc8bdc7fdd7d65ec6
2016-08-15 11:12:24 -07:00
WMDE-Fisch c81e1b93d2 Fix mention failures not beeing sent.
While manual rebasing the bundle patch the wrong
line was removed.

Also improves tests to check for notifyAgent.

See I1069aeb5523db8710da4e8e21065bf447d031e3c

Change-Id: I33ddeccea153d6f6ae97e5c60e8b47dc24fb4833
2016-08-15 14:25:22 +02:00
Translation updater bot 1113d0b0f7 Localisation updates from https://translatewiki.net.
Change-Id: I794922d4849269598eca32604646ce9fbc049544
2016-08-14 22:26:44 +02:00
Translation updater bot 2fb8318e8a Localisation updates from https://translatewiki.net.
Change-Id: I48092558f2dea2cf6fd22bdf9a6e769e0bd3d88b
2016-08-13 22:28:33 +02:00