When new content is added to a page ( like images LazyLoading ) the
MultimediaViewer reacts mostly correctly, except that is does not
rebuild images indexes for a viewer hence breaking next/prev order.
The patch solves this by resetting the viewer state at MMVB.processThumbs()
letting the viewer to be correctly re-initialized at later stages.
Change-Id: Ib1e3ba05f5bc84d477302e365ad7984de1a84272
Replacing 'grunt-svgmin' with 'svgo' v2.3.0.
Also
- replacing all Grunt based tasks with npm equivalents. 'build' has
before just been for SVG minification and that's the same now in npm.
- changing to JS based '.svgo.config.js'
- re-crushing all SVGs. Note that 'link-hover.svg' and 'link.svg' have
been optimized with reduced precision. All other changes are resulting
from updated SVGO.
Bug: T278656
Change-Id: Ie895edb4e88336ffc56f570b8f80bf7d1e331894
Malformed URIs are difficult to filter due a lack of normalization
across browsers. This is our top error message with over 300 instances.
Catching this would reduce logspam and make our client error logging
much more usable.
Bug: T268060
Change-Id: If1c345af704df82f16c7ef1ecbf63862c1fbee77
Follows-up Id4df92b0ebed3 where a direct call was added into
the OO.Router.prototype which is invalid.
It also didn't add much value as it literally contains just
one line of trivial code that was already used without any
shared state with the actual instance of OO.Router used.
Use location.href directly.
Bug: T77258
Change-Id: I00c018f97d6569a532e51f817a1faa2df4f2fb1a
Amending Base10 to slightly darker `#202122` to fulfill WCAG
requirements in connection to Accent50.
Also adding it as WikimediaUI Base equivalent variable for
future replacement.
Also removing variables not in use any more.
Bug: T248393
Change-Id: I6fb5c288cfeb2bd3c786c2f5ab771074203b8fc0
Renaming 'mmv.globals.less' to 'mmv.variables.less' following naming
pattern of other extensions like MobileFrontend, Echo or Flow.
Change-Id: I376c3fd1463ed225e214f165943576f3e3c7df39
As MDN says, new Date( dateString ) is strongly discouraged, for
exactly this reason. Oy.
Bug: T243160
Change-Id: Ib71b16185f5bd1cd522535716b6e36d2699678cd
This avoids a bug with Firefox's automatic scroll restoration logic,
which seems to always jump to the top of the page upon closing MMV.
Bug: T229484
Change-Id: Ia4261ce268df4d8fb07b4813a6ae72ad88728e91
At the moment, the blur effect is shown all the time when flipping back
and forth between images that have already been loaded. I believe the
code just does not have enough time to get it's job done. Even if it was
a cache hit, the very low limit of only 10ms results in all actions being
considered "long running", and the blur effect been shown.
Given the animation takes 300ms, using a very low threshold like 10ms
seems unfair. Something like 1/2 of the animation time seems more
appropriate.
Change-Id: I8d655be3830fef3f363a0942ac64c932c1e8f7f7
Removing obsolete color, the list items needs to inherit WikimediaUI
palette color `#222` from `.mw-mmv-post-image` instead.
Change-Id: I70354470e0571b6eb8276a3e47167c507b4d717c
* mmv.ui.canvas / error-media-icon.svg:
Used when the media file fails to load (e.g. due to an intermittent
issue with the user's network connection). Rarely displayed,
and the space is reserved (no FOUC). Seems fine to display
slightly later within that use case (or not at all, if offline)
to make the MMV interface itself load faster overall.
Bug: T121730
Change-Id: I760f46c920c3d1f3da2cb385d8cfd81951b628e5
The issue seems to be related with the chronology of the document.title
update and the history.pushState/replaceState call.
Bug: T225387
Change-Id: Ifcd11d5efb3ba64d88b137eccb4b9c763d043004
Object.create( null ) creates an Object without predefined methods like
hasOwnProperty or constructor. This allow to use
key in object
instead of
Object.prototype.hasOwnProperty.call( object, key )
although key is 'constructor'.
Change-Id: I07ef3b97a6b2d1b2fa9f3fb746ffe93a7f325cdf
Some handlers were not correctly unregistered when performing
`unattach`. Thus, `Dialog.handleOpenCloseClick` could be fired more than
once resulting in the dialog been opened and closed immediately
afterwards.
Bug: T186461
Change-Id: I0c3c79644a10d7201ef198f4a4d381c10db4c3af
Steps to reproduce:
1. click on image, 2. press Esc, 3. click on image, 4. press Esc
Expected results: page is visible again
Actual results: navigation to previous page happens
Change-Id: Idd1b6612971b8ea258bb55982e3241986ad1a54d