My browser is configured with en-GB as its locale. This meant that
when qqx was passed down, it fell back to my browser's default locale
and thus made the tests fail, as the expected data was set against
lang=en.
Ironically, MMV actually prefers the en-GB date format, and outside
tests even replaces 'en' with 'en-GB' when formatting dates in the
user interface. It was only in the tests that it asserted the 'en'
format that would otherwise never be used by MMV.
Ironically, the reason my locale is affecting the test is because
we switched from hardcoded lang=en to hardcoded lang=qqx which is
meant to disable any influence from localisation. However, when
passed to browser-native Intl API, qqx is not valid and thus
caused us to not have a hardcoded 'en' but a completely variable
UI language based on the developer's browser settings.
Bug: T250045
Change-Id: I94ad25cc7060ac5e9db41c6b6767aa9fd687a0db
image-links section may overflow if file has a long filename,
and a horizontal scroll bar may appear. Add a
"word-break: break-word" rule to prevent it from happening.
Bug: T305328
Change-Id: Ief395b66525b686fdcd7dec0909775065240a724
Take advantage of the regularity of the structure.
Limit selection to .mw-description links, which serves an equivalent
purpose to .image in the legacy output.
Bug: T292657
Change-Id: Ic652576f84e07c9fc8ef8be216a6fc94466198a6
In the next iteration of the MediaWiki UI icon styles, it will
not be possible to mix button classes with icons.
The change will result in a slight increase in height for
the settings cog which will be fixed as soon
as Ibc136a17662ae839f90babb21e0f7e8f27b7a7d5 is applied.
Bug: T191021
Change-Id: Ic976ba8cddde1515db260973b00d501f8fc7b901
Currently for files from foreign repositories, the "More details"
button always points to the foreign description page, regardless of
whether a local description page exists. That is a bit unintuitive,
as the local description page often contains additional info (like
categories) that may be useful for the user.
This patch changes the behavior of the button to link to a local
description page if available.
Change-Id: I7db609a4dda42f28ef913ad6d4256fb5adabeb89
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