Go to file
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
docs Download tab, basic download and preview 2014-04-02 23:00:28 +00:00
i18n Localisation updates from https://translatewiki.net. 2014-04-23 19:55:56 +00:00
resources Refactor progressbar & blur handling 2014-05-01 21:09:28 +00:00
tests Refactor progressbar & blur handling 2014-05-01 21:09:28 +00:00
.gitignore Adding first pass at jsduck docs 2014-01-21 11:44:58 -08:00
.gitreview Add .gitreview 2013-08-08 11:11:01 +02:00
.jshintignore Fix hash self-reaction 2014-02-24 19:14:45 +01:00
.jshintrc Get rid of lightboxHooks 2014-02-13 17:47:30 -08:00
AUTHORS Big credits patch 2014-02-13 13:38:19 -08:00
COPYING Initial commit - working demo 2013-09-03 16:52:28 -07:00
importml.sh Make importml.sh less Linux-centric, more UNIX-agnostic 2013-12-05 00:19:02 +00:00
MultimediaViewer.i18n.php Update i18n shim 2014-04-22 13:31:20 +00:00
MultimediaViewer.php Merge "Skip userinfo request if no message depends on the gender." 2014-04-23 23:47:34 +00:00
MultimediaViewerHooks.php Split the progress bar into a component of its own. 2014-04-21 22:27:59 +00:00
viewer-ltr.svg Fix images and related CSS for RTL wikis 2013-11-26 00:54:18 +02:00
viewer-rtl.svg Fix images and related CSS for RTL wikis 2013-11-26 00:54:18 +02:00