This is in preparation for merging the two modules in core and not
exposing oojs-router directly. mediawiki.router is merely 1 line
of code to hold a singleton, and indeed it appears there is no need
for multiple instances to exist given it communicates exclusively to
and from the 'window' object, which is also a global singleton.
Change-Id: Ice09b523dfbefd67493175554eeb525771e8f29d
The MediaViewer and MultimediaViewer* instruments were disabled circa
October 2021 in Ie7dd8739efc.
This patch removes those instruments and any supporting code and data.
Notably, this patch does not remove the mw.mmv.logging.ViewLogger
instrument, which is responsible for logging image views.
Bug: T310890
Change-Id: I97d41be93849b2ae9d1adba6660546ea716657fd
jQuery object gets converted to "[object Object]" which results in an ununique array key in HUP.htmlToTextWithTags cache.textWithTags, instead pass HTML string.
Bug: T308958
Change-Id: If6fc934d263107a0d3346ccea8e91cade72db666
* Declare variables inline, as per the current code conventions.
* Use `assert.true()` or `assert.false()` in a few places.
* Clarify some test names and simplify some surrounding code.
Change-Id: Id0bca942e34564b9c011e89c0b2298cbb4f8a582
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
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
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
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