mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/MultimediaViewer
synced 2024-11-28 18:10:06 +00:00
fec24e02f7
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 |
||
---|---|---|
.. | ||
img | ||
mmv.ui.canvas.js | ||
mmv.ui.canvas.less | ||
mmv.ui.canvasButtons.js | ||
mmv.ui.canvasButtons.less | ||
mmv.ui.categories.js | ||
mmv.ui.categories.less | ||
mmv.ui.description.js | ||
mmv.ui.fileUsage.js | ||
mmv.ui.fileUsage.less | ||
mmv.ui.js | ||
mmv.ui.metadataPanel.js | ||
mmv.ui.metadataPanel.less | ||
mmv.ui.permission.js | ||
mmv.ui.permission.less | ||
mmv.ui.progressBar.js | ||
mmv.ui.progressBar.less | ||
mmv.ui.reuse.dialog.js | ||
mmv.ui.reuse.dialog.less | ||
mmv.ui.reuse.download.js | ||
mmv.ui.reuse.download.less | ||
mmv.ui.reuse.embed.js | ||
mmv.ui.reuse.embed.less | ||
mmv.ui.reuse.share.js | ||
mmv.ui.reuse.share.less | ||
mmv.ui.reuse.shareembed.less | ||
mmv.ui.reuse.tab.js | ||
mmv.ui.reuse.utils.js | ||
mmv.ui.stripeButtons.js | ||
mmv.ui.stripeButtons.less | ||
mmv.ui.truncatableTextField.js | ||
mmv.ui.truncatableTextField.less |