Commit graph

6 commits

Author SHA1 Message Date
Moriel Schottlender ebbe2e81af Make date headings a proper semantic <h2> heading
To support accessibility, make sure the titles in Special:Notifications
are <h2> headings.

Bug: T149955
Change-Id: I4f15694efb04896e9bd7b026d297891047759644
2017-04-13 22:39:28 +00:00
Ed Sanders c8d24ebd17 build: Replace jscs/jshint with eslint
Change-Id: Iee1d1b20ed31e636bfb8fc8cf9b18ff328bf608c
2016-11-23 15:25:59 -08:00
Moriel Schottlender 8d3b4fad2c Round timestamps to the day when displaying date titles in Special:Notifications
Bug: T141915
Change-Id: I5fcb78ac2fa168aa8bba90c467544fe3a6914ec3
2016-08-04 12:58:06 -07:00
Moriel Schottlender f4a955efe9 Fix fade-in/out animation in sorting
The fade in/out animation is asynchronous. This means that if we are
sorting multiple items one after the other, by the time the item faded
out, it will be reinserted back into the wrong position, breaking the
sorting.

This also broke the promise of OO.SortedEmitterList whereby all its items
are always in order.

The way to fix this was to force a better synchronization with the item
order while we hide and show the item in its new place. To do that,
a new widget is created as a fake clone of the old one, in the original
position of the old one. The original item is then reinserted (while hidden)
to the proper location -- preserving order. The fake clone is then faded
out, and the real item is then faded in.

For this to work properly, the cloned item had to preserve some of the
original item's information, like timestamp, foreigness and id. However,
since both the real item and the fake new clone have the same details,
the clone fakes its ID by adding a fraction to it - promising that the
fallback in case of equal timestamps (which happens on the real and
cloned items) will still resolve with some decision about the placement
of the items rather than (falsely but understandably) decide they are
both the same.

Since this whole animation is somewhat of a hack, the list now has a
configuration parameter to turn the animation on.

The animation is on in the popups, but off in the special page.

Bug: T141419
Change-Id: Ic7c35e5ddefc51bf7fde497eab36414b4dddcd9e
2016-08-01 13:49:10 -07:00
Matthew Flaschen c0a464e425 BREAKING CHANGE: More ISO 8601 for seen time
* Add ISO 8601 date format to notification output

  This is actually supposed to be the only output date format used,
  per https://www.mediawiki.org/wiki/API:Data_formats#Timestamps , but
  I'm not doing anything to deprecate the others right now.

* Change wgEchoSeenTime to use ISO 8601.  mwgrep and extension grep do
  not show any usages.  However, since it is a breaking change, to
  minimize disruption, I'm also using this opportunity to change
  'message' to 'notice'.

* Remove wgEchoInitialNotifCount.  I was going to also change 'message'
  to 'notice' here too, but then I saw it was totally unused.
  (It was read in Echo to populate a JS variable, but then it was
  unused.)

* Make sure the Special:Notifications page aggregation by days is
  done by local days, even though the timestamp per item is still
  UTC. This is to make sure the days are displayed correctly in
  the local timezone.

* Change all reverse sorting callbacks to handle comparisons of
  ISO 8601.

Bug: T141413
Change-Id: I20271345c7d350dc3e7f467288e5cdc98e6250cc
2016-07-27 02:42:08 +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