RCFilters: display timestamp of new changes in refresh link
authorStephane Bisson <sbisson@wikimedia.org>
Thu, 11 Apr 2019 14:58:38 +0000 (10:58 -0400)
committerStephane Bisson <sbisson@wikimedia.org>
Wed, 17 Apr 2019 00:51:25 +0000 (17:51 -0700)
commitc27ffdfecf4616e651b5b11458adf7c2c5a27dc4
tree407d3b875c79a66e27afd9170b72b3a7ec112a82
parent64bd7a7e4b4ca39d74ffd3aeb03dfe7fc4114f33
RCFilters: display timestamp of new changes in refresh link

The timestamp displayed in the link is not from the last refresh
but from when new changes are available.
I don't think this distinction is consequential. The fundamental
meaning is that clicking the link will bring changes newer than
the timestamp.

I considered using a relative timestamp (2h ago) like is
proposed in the task but I didn't think it was worth it
for the following reasons:
1. Client-side formatting with momentjs is hacky
   at best and I couldn't find a way to have it
   respect user's preferences.
2. I don't think it makes the meaning of the timestamp
   in the message any clearer. I'll admit the meaning
   of the current timestamp is not explicit but I think
   it works when you don't think too much about it.
3. A relative timestamp requires a setInterval with
   decreasing interval to keep it up to date.
   ("A few seconds ago" -> "2 minutes ago", "1h ago", etc)

Bug: T200353
Change-Id: I9058d47645914783227d1520adb78e75399b5504
includes/specials/SpecialRecentChanges.php
includes/specials/SpecialWatchlist.php
languages/i18n/en.json
languages/i18n/qqq.json
resources/src/mediawiki.rcfilters/dm/ChangesListViewModel.js
resources/src/mediawiki.rcfilters/ui/FilterWrapperWidget.js