mediawiki-extensions-Multim.../tests/qunit/mmv
Gergő Tisza fec24e02f7 Refactor progressbar & blur handling
This tries to fix a number of related issues:
* the blurred thumbnail was visible for a split-second sometimes
  when switching back to an already-loaded image. (Presumably when
  JS was sluggish enough to take more than 10 ms to execute.) We
  now check whether the promise is pending before showing a placeholder.
  (More generally, a lot of unnecessary logic was executed when paging
  through already loaded images, like displaying the placeholder, so
  this might make the UI a bit more responsive.)
* the blur could get stuck sometimes - I have seen this a few times,
  but have never been able to reproduce it, so I'm only guessing, but
  maybe the timing was really unfortunate, and we switched back less
  than 10 ms before loading finished. We now remove the blur on every
  branch, just to be sure.
* adding a progress handler to a promise might not have any immediate
  effect, so when switching to an image which was loading, the progress
  bar reacted too late. We now store the progress state per thumbnail
  so it is always available immediately.
* the progress would animate from 0 to its actual state whenever we
  navigated to the image. The change on paging is now instant; the
  progress bar only animates when we are looking at it.
* switching quickly back and forthe between a loaded and a loading
  image resulted in the loading image becoming unblurred. This seems
  fixed now, I'm not sure why. Maybe the "skip on non-pending promise"
  logic affects it somehow.

Also removes some unused things / renames some things which were
confusing, and makes an unrelated fix in the image provider, which kept
amassing fail handlers.

Change-Id: I580becff246f197ec1bc65e82acd422620e35578
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/489
2014-05-01 21:09:28 +00:00
..
model Make License.isCc() really return booleans 2014-04-23 20:30:03 +00:00
provider Skip userinfo request if no message depends on the gender. 2014-04-23 00:59:23 +00:00
routing Add routing classes 2014-04-16 12:40:17 +02:00
ui Refactor progressbar & blur handling 2014-05-01 21:09:28 +00:00
mmv.bootstrap.test.js Replace current URL generation logic with routing classes 2014-04-16 12:51:38 +02:00
mmv.EmbedFileFormatter.test.js Use mw-mmv CSS prefix consistently for all things 2014-03-31 21:33:12 +00:00
mmv.HtmlUtils.test.js Fixes various bugs in IE 2014-04-07 22:00:11 +00:00
mmv.lightboximage.test.js Fix resize issues (Part II) 2014-02-28 10:22:21 +01:00
mmv.lightboxinterface.test.js Restore article scroll after closing Media Viewer 2014-04-14 18:04:30 +00:00
mmv.logger.test.js Merge MultiLightbox into MultimediaViewer 2014-02-25 02:00:13 +00:00
mmv.performance.test.js Update MultimediaViewerNetworkPerformance schema rev. 2014-03-24 04:17:57 +00:00
mmv.test.js Refactor progressbar & blur handling 2014-05-01 21:09:28 +00:00
mmv.testhelpers.js Add routing classes 2014-04-16 12:40:17 +02:00
mmv.ThumbnailWidthCalculator.test.js Fix resize issues (Part III, Fin) 2014-03-05 00:14:54 +00:00