Commit graph

3373 commits

Author SHA1 Message Date
Roan Kattouw eae458801f CrossWikiUnreadFilterWidget: Remove unused this.localSource
This also means PageFilterWidget can stop worrying about being
given a nonexistent source.

Change-Id: Id999a117c66d0600a4386713c98501cc5ed4236a
2016-06-23 17:44:08 +02:00
Roan Kattouw 6c4bf99da8 ApiUnreadNotificationPages: Output pages as an array rather than an object
Make the frontend code based on page titles rather than page IDs.

Change-Id: I79c6a0e3a7178acdb14039a0c5208e90a7341044
2016-06-23 17:00:51 +02:00
jenkins-bot 190994bab2 Merge "Use the actual total notification count in the special page sidebar" 2016-06-23 11:05:14 +00: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
Stephane Bisson c93800e17c Support for PlaceholderWidget with no link
Bug: T137490
Change-Id: Ia861b5aa3f100124418956a0e09603a9ba29215a
2016-06-22 12:54:13 -04:00
Roan Kattouw e4b79c1bc2 Use the actual total notification count in the special page sidebar
Adding up numbers in the front-end is not enough, because it could
be that not all pages are listed (it's a top 10). So get the
total count from the backend.

Change-Id: Ibbc76691ef88333b92132a514fdba3cde3797e10
2016-06-22 17:11:34 +01:00
addshore c1b4e4d5aa docs: Fix typo of 'begining' instead of 'beginning' in phpdoc
Change-Id: Ibc015f2133393788634d7e8b6119dcc305c6c534
2016-06-22 13:02:13 +00:00
jenkins-bot 45d8fdf24f Merge "Add a cross-wiki sidebar to the Special:Notifications page" 2016-06-21 21:57:48 +00: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
Translation updater bot d6c7df3978 Localisation updates from https://translatewiki.net.
Change-Id: I2bbf5a187292fe6cbe6a7b8356480ef9d734f660
2016-06-21 23:28:24 +02:00
Ed Sanders 1f002745a7 Wrap table-cell buttons in table-row
Removes unwanted 2px bottom margin from footer buttons.

Change-Id: I67c1d5f21d7c62a436010932e3d7b6257e4b73ff
2016-06-21 20:24:20 +01:00
jenkins-bot b846c11910 Merge "Change mark as read buttons to circles" 2016-06-21 19:06:00 +00:00
Moriel Schottlender f84808b83a Change mark as read buttons to circles
Allow for mark read and mark unread through the side button, and
change its style according to spec in the ticket.

Bug: T126214
Change-Id: I78a93c0545bbe2d7c11a0c62557cd2e97e9d3866
2016-06-21 11:54:00 -07:00
Roan Kattouw 92d1d600ae SubGroupListWidget: use timestamp from model, not from listWidget
This ensures that the fallback timestamp is used if the list is
still empty. Not doing this causes the wikis in the cross-wiki bundle
to appear in the wrong order. Also, it makes more sense to use the
model as the source of truth regardless.

Bug: T138115
Change-Id: Icbfdc7e7c7f67179e50f0f692aef1a54568265e6
2016-06-21 13:41:45 +00:00
Stephane Bisson 5a5e1970c5 Improve client-side unread count estimation
- Remove duplicated counter adjustments.

- Differentiate between all IDs to mark as
  read vs. all IDs that represent visible
  notifications when adjusting the counter.

Change-Id: I1b3e52a929c6e920e3b782c9ef028539b3db0c99
2016-06-21 08:27:39 -04:00
Stephane Bisson b3273d23d7 Define global transition vars before using them
Bug: T132954
Change-Id: I9515f79285672aff10545502ba1558dc2443eaff
2016-06-21 08:00:27 -04:00
jenkins-bot bcf7701e3e Merge "Remove automatic mark-as-read-when-seen" 2016-06-21 11:27:24 +00:00
Translation updater bot d92b899227 Localisation updates from https://translatewiki.net.
Change-Id: Iab4494f02f394c39a3ba6c4b36fcd1fb939ce914
2016-06-20 22:19:34 +02:00
jenkins-bot 6b20e63b73 Merge "Clarify mention error log comment" 2016-06-20 16:14:54 +00:00
WMDE-Fisch 3e9b2055b2 Clarify mention error log comment
The case also logs non-existing users.

Change-Id: Id5a360b672df11d214459432c4ebbed5c03c1ba9
2016-06-20 18:01:51 +02:00
jenkins-bot 6d12122f9f Merge "Gracefully handle outdated echo_unread_wikis rows" 2016-06-20 15:51:18 +00:00
Roan Kattouw 792de35994 Gracefully handle outdated echo_unread_wikis rows
Adds $wgEchoSectionTransition and $wgEchoBundleTransition.
If either of these settings is enabled, we will disbelieve
the alert/message counts in the euw table and obtain them
using server-side cross-wiki API queries instead.

This affects both ApiEchoNotifications (for generating the cross-wiki
summary entry) and the count and timestamp computation in NotifUser.

In bundle transition mode, we trust that notifications are classified
correctly between alerts and messages, but we don't trust the
counts in the table. In section transition mode, we trust that
the sum of the alert and message counts is the correct count,
but we don't trust the alert and message counts individually.
If both modes are enabled, we mistrust anything that's mistrusted
by either mode and only trust what's trusted by both modes.
In any event, we do trust that only the wikis with rows in the
euw table have unread notifications.

Bug: T132954
Change-Id: Ibcc8ac102dac3cf06916d67427b42457fdb93db6
2016-06-20 16:21:03 +01:00
matejsuchanek 282ec08110 Add missing parameter to a message
This is already done in EditUserTalk-, Mention- and RevertedPresentationModel,
so PageLinked- should be consistent.

Change-Id: I4786406cabab778250d72c7ed92701b940a0a9f7
2016-06-20 17:14:45 +02:00
Translation updater bot 09a8289491 Localisation updates from https://translatewiki.net.
Change-Id: I0f05f8ba9768ca20c0b1cc0c99cb54e49cc5783a
2016-06-19 22:42:30 +02:00
jenkins-bot 15dc477e04 Merge "Try to extract an excerpt from a revision" 2016-06-19 10:02:39 +00:00
Translation updater bot e690f9bfd3 Localisation updates from https://translatewiki.net.
Change-Id: I07691973a30ab2a58b4525a729d5f616f82f4511
2016-06-18 22:44:39 +02:00
Translation updater bot ce567ae5b4 Localisation updates from https://translatewiki.net.
Change-Id: I80986e8c7574582892de6a998ea477cfabd66401
2016-06-17 22:28:10 +02:00
jenkins-bot 7fad8c8603 Merge "NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys" 2016-06-17 16:48:52 +00:00
Roan Kattouw 2872b5eae2 Remove automatic mark-as-read-when-seen
Bug: T132525
Change-Id: I095704252eaf2f8fe71950a4cfcd42a6fce431ff
2016-06-17 17:09:25 +01:00
Stephane Bisson d55396dee8 Try to extract an excerpt from a revision
Bug: T120152
Change-Id: I91abb2dded9ab7f124aaa798dd07c52576ee791b
2016-06-17 11:26:00 -04:00
Roan Kattouw 1d05d9298c backfillUnreadWikis.php: Add rebuild mode
In rebuild mode, we only process users who already have
a row in the euw table. This reduces the number of users
we have to process significantly. Thanks to Stephane
for this idea.

Also, don't force a recache of the alert and message counts,
it's OK to fetch them from cache. We also don't need to invalidate
any caches in this script, because the transition flag from
Ibcc8ac102 will ensure that the cached global counts are
correct.

Change-Id: I69c54cac47468647df2778b2d82f1b5dd9e574d3
2016-06-17 16:02:01 +01:00
Roan Kattouw 87e515e02b NotifUser: rename preloadKeys() to getPreloadKeys() and make it tolerate uncomputable keys
Change-Id: Id9a39a481533d39f99c9d7f43c573af81fe957cf
2016-06-17 15:49:31 +01:00
Catrope 2771b94af7 Revert "Implement backfillUnreadWikis.php in terms of resetNotificationCount()"
Better idea: invalidate caches in this script, and write
a separate script to recompute existing euw rows.

This reverts commit c83af257d2.

Change-Id: I57bccfb726eada646cb318206d9091a20d59dcf5
2016-06-17 13:43:29 +00:00
Translation updater bot 74917b8fae Localisation updates from https://translatewiki.net.
Change-Id: Ic41fa390fe11e41ffc3b028a4d844652ec05a5df
2016-06-16 22:26:33 +02:00
Stephane Bisson 8520074d28 Maintenance script generates edit-thank notifications
Bug: T120152
Change-Id: I896fc133b781180b3bb8f1fbd2addaa99f9dc653
2016-06-16 17:46:51 +01:00
jenkins-bot 7a6d0f6aa3 Merge "ApiEchoNotificatons: Add nottitles parameter" 2016-06-16 12:09:46 +00:00
Roan Kattouw bbac9ff0c4 Follow-up 05e531c7b6: actually unset notcrosswikisummary
To prevent recursive cross-wiki notifications from appearing.

Change-Id: I63808e32561a350bf8b3286ebc9ec180958059c7
2016-06-15 23:48:54 +01:00
Translation updater bot e7289e2e29 Localisation updates from https://translatewiki.net.
Change-Id: Ia49d8b96869b824f6088b06f28512f0292ed7046
2016-06-15 22:34:33 +02:00
Roan Kattouw 617cd3d29e Add index on notification_event
So we can easily query the notification rows that belong to
a given event row. This is needed for the removeOrphanedEvents
maintenance script to run efficiently.

Change-Id: I99fc31a62b37259d7000577583c8e8a599e400f9
2016-06-14 19:57:06 +00:00
jenkins-bot e6c78fa09a Merge "Allow the primary link to set all bundled notifications as read" 2016-06-14 15:42:35 +00:00
jenkins-bot 1a9656691f Merge "Don't mark alerts as read when seen" 2016-06-14 15:34:11 +00:00
Stephane Bisson e8bc56e5d9 Don't set title for user-rights notifications
Same as I584c1150e4c98bb814e30bf6a6d3eb3e49ef6408
for the notifications generation script.

Change-Id: I3b13db662671a9e57f944171108a3b48544f784a
2016-06-14 10:38:41 -04:00
jenkins-bot 3db290d3be Merge "PageLinkedPresentationModel: Use the correct title for the diff link" 2016-06-14 13:12:37 +00:00
Stephane Bisson 26bc47c1b2 Don't mark alerts as read when seen
This is done the quick way by just turning
off a config option. The full cleanup
is in I095704252eaf2f8fe71950a4cfcd42a6fce431ff

Bug: T132525
Change-Id: I5becaa2f91b7eff6ebe4ce3943e86975c844c884
2016-06-14 08:50:47 -04:00
Stephane Bisson b06b2294c9 Allow the primary link to set all bundled notifications as read
Bug: T136368
Change-Id: If07369cb168d1a085f297293e713d65e49997264
2016-06-14 08:49:23 -04:00
Roan Kattouw bcbb1763be PageLinkedPresentationModel: Use the correct title for the diff link
Also cache the from title, because Title::newFromId() doesn't cache
its results.

Bug: T137798
Change-Id: I5df444d3dacd55fbee09e53d82ac22c77ee9e246
2016-06-14 12:30:03 +01:00
Roan Kattouw 65c6b8cbaf NotificationBadgeWidget: Fix header getting larger when "Mark all as read" present
The "Mark all as read" button had margins that made it just a little
bit taller than the header would otherwise be. This pushed the
bottom border of the header and the top border of the first notification
away from each other.

We only need top and right margins on this button, so drop the
bottom and left margins.

Bug: T137778
Change-Id: I8d47d84c79cbdad707b8cbaa8d43187c054755b3
2016-06-14 11:12:54 +01:00
Translation updater bot 8a4be656df Localisation updates from https://translatewiki.net.
Change-Id: Ib1c4cfa8f0e7047d972f3900b934abe77ecb7a1c
2016-06-13 22:56:07 +02: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
Roan Kattouw 00c5e5ae25 ApiEchoUnreadNotificationPages: Only count bundle bases
Change-Id: I6da4b72c7326dcf1354253aa98fdff8b82678ed8
2016-06-13 20:19:32 +01:00