mediawiki-extensions-Echo/modules/model
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
..
mw.echo.dm.BundleNotificationItem.js Properly aggregate the itemUpdate event 2016-07-07 19:08:47 +00:00
mw.echo.dm.CrossWikiNotificationItem.js Add a mark-all-read button and a settings menu to Special:Notifications 2016-07-20 17:25:38 -07:00
mw.echo.dm.FiltersModel.js Add a cross-wiki sidebar to the Special:Notifications page 2016-06-21 14:49:42 -07:00
mw.echo.dm.js Refactoring Echo's front end for MVC 2016-05-18 12:28:45 -07:00
mw.echo.dm.ModelManager.js BREAKING CHANGE: More ISO 8601 for seen time 2016-07-27 02:42:08 +00:00
mw.echo.dm.NotificationGroupsList.js BREAKING CHANGE: More ISO 8601 for seen time 2016-07-27 02:42:08 +00:00
mw.echo.dm.NotificationItem.js BREAKING CHANGE: More ISO 8601 for seen time 2016-07-27 02:42:08 +00:00
mw.echo.dm.NotificationsList.js Fix fade-in/out animation in sorting 2016-08-01 13:49:10 -07:00
mw.echo.dm.PaginationModel.js Relate read-state filter and mark read/unread action 2016-07-18 13:23:57 -07:00
mw.echo.dm.SeenTimeModel.js BREAKING CHANGE: More ISO 8601 for seen time 2016-07-27 02:42:08 +00:00
mw.echo.dm.SortedList.js Refactoring Echo's front end for MVC 2016-05-18 12:28:45 -07:00
mw.echo.dm.SourcePagesModel.js Store local source as 'local' rather than dbName 2016-07-07 12:20:39 -07:00
mw.echo.dm.UnreadNotificationCounter.js Add a mark-all-read button and a settings menu to Special:Notifications 2016-07-20 17:25:38 -07:00