Go to file
Roan Kattouw bfbfa6be62 Sort wikis by timestamp of most recent notification
Both in the order of the cross-wiki bundles themselves, and
in the message in the notification body.

ForeignNotifications tracks timestamps per wiki per section,
and exposes these through getWikiTimestamp(). ApiEchoNotifications
adds these timestamps to the sources manifest, and also sorts
the list of wikis by timestamp (it'd be nicer to do this in
ForeignPresentationModel instead, but then we'd have to create a new
ForeignNotifications instance which causes a duplicated DB query).

NotificationsModel receives the timestamp for its wiki as its
fallback timestamp, and makes getTimestamp() return this value
during the pre-population phase. This causes its parent to
automatically sort it correctly.

Because the timestamp of a wiki depends on the section (alerts vs messages),
we can't put it in the global sources manifest at the top level
of the API response. Instead, get rid of this global sources
manifest and put all the sources data in the foreign notifications
directly. This allows us to specify different timestamps, and also
allows us to get rid of code in EchoApi that was already remapping
the API response to this format.

Bug: T130298
Change-Id: Ie083fbb1ccaf74fbe804633d87ef03c9e71b120f
2016-03-17 14:21:16 -07:00
db_patches Track what wikis a user has unread notifications on 2015-11-20 15:54:11 -08:00
i18n Localisation updates from https://translatewiki.net. 2016-03-15 22:59:38 +01:00
images Crush all SVGs with svgo 2016-01-15 17:05:17 -08:00
includes Sort wikis by timestamp of most recent notification 2016-03-17 14:21:16 -07:00
maintenance Support generating sample notifications by types 2016-03-02 15:04:56 -05:00
modules Sort wikis by timestamp of most recent notification 2016-03-17 14:21:16 -07:00
scripts build: Enable phpcs rule 'MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix' and make pass 2015-10-29 13:06:44 +01:00
tests build: Enable jscs rule 'requireVarDeclFirst' and make pass 2016-03-07 11:57:31 +00:00
.csslintrc Add Grunt infrastructure for CI 2015-05-01 20:35:23 -07:00
.gitignore Run phpcs through "composer test", disabling failing rules 2015-10-29 12:52:32 +01:00
.gitreview Add .gitreview file 2012-04-28 01:26:21 +10:00
.jscsrc build: Enable jscs jsDoc rule 'requireNewlineAfterDescription' and make pass 2016-03-07 14:29:15 +01:00
.jshintignore Recurse into sub folders for jshint and jscs 2015-11-09 12:52:42 +00:00
.jshintrc Update formatting 2015-10-03 23:28:54 -04:00
.mailmap Add Kunal, Moriel, Jon to credits; add mailmap file 2015-12-15 16:30:19 -08:00
.rubocop.yml Fixed Metrics/LineLength RuboCop offense 2015-09-29 14:59:05 +02:00
autoload.php Merge "Run scripts/gen-autoload.php" 2016-02-13 07:25:53 +00:00
composer.json Wrap CallbackFilterIterator in a condition check 2016-01-26 14:57:18 -07:00
COPYING Add COPYING 2014-01-24 16:00:24 -08:00
Echo.alias.php Add Czech alias of Special:Notifications 2015-12-07 17:21:16 +01:00
Echo.php Include cross-wiki notifications in unread count 2016-02-29 16:02:05 -05:00
echo.sql Allow multiple target pages per event 2015-03-31 07:56:52 +00:00
Gemfile Update mediawiki_selenium Ruby gem to version 1.6.5 2016-02-03 18:03:20 +01:00
Gemfile.lock Update mediawiki_selenium Ruby gem to version 1.6.5 2016-02-03 18:03:20 +01:00
Gruntfile.js build: Remove grunt-contrib-csslint 2016-01-18 19:51:04 -08:00
Hooks.php thank-you-edit: Cast counts as integers before comparing 2016-03-11 11:30:15 -08:00
Makefile Hygiene: Dont run jshint against .less files 2014-09-05 16:45:34 -07:00
package.json build: Update grunt-jscs to 2.7.0 and disable failing rules 2016-02-29 16:42:32 +01:00
phpcs.xml build: Enable phpcs rule 'MediaWiki.VariableAnalysis.UnusedGlobalVariables' and make pass 2015-10-29 17:25:51 +00:00
Rakefile Added Rakefile 2015-11-10 10:25:12 +00:00
RELEASE_NOTES Allow multiple target pages per event 2015-03-31 07:56:52 +00:00
Resources.php Merge "Add MobileNotificationsWrapper for Mobile display" 2016-03-16 17:57:26 +00:00