Commit graph

1005 commits

Author SHA1 Message Date
Simon Legner 74a76718d7 Use packageFiles in mmv.test
Bug: T337030
Change-Id: Iaea2deec35003e306a8e1f12f890879c80cd8289
2023-05-21 06:41:31 +00:00
Simon Legner d82910fbb3 Use packageFiles in mmv
Bug: T337030
Change-Id: I833c7e91230272b82a2512fd55f1c7c0f61233b4
2023-05-20 10:04:41 +03:00
Simon Legner 35cd0f18c0 Use packageFiles in mmv
Bug: T337030
Change-Id: I90cdfb626c176b27b59db6b92b9edd6b2fe49b68
2023-05-20 09:34:56 +03:00
jenkins-bot 91bb566fec Merge "Use packageFiles in mmv.ui.ondemandshareddependencies" 2023-05-19 16:45:57 +00:00
Simon Legner 4709abae0a Use packageFiles in mmv.ui.ondemandshareddependencies
Bug: T337030
Change-Id: I09b4d1fecd1940a1a767d2033c4449b5002a88a8
2023-05-19 18:08:39 +03:00
Simon Legner 26f4c60495 Use packageFiles in mmv.ui.reuse.shareembed
Bug: T337030
Change-Id: Ic54d1a1a40ee5318f65ee1245e261db7059583ba
2023-05-19 18:05:56 +03:00
Simon Legner d0066039ac Deep-link to the license section of a file page
The necessary anchor link depends on the language used on Wikimedia Commons:

* https://commons.wikimedia.org/wiki/File:GATEWAY_(Moon_Space_Station).png?uselang=en#Licensing
* https://commons.wikimedia.org/wiki/File:GATEWAY_(Moon_Space_Station).png?uselang=de#Lizenz
* Ref: https://commons.wikimedia.org/wiki/Template:License-header

Remove jsduck due to lacking support for ES6 string templates.

Bug: T336708
Change-Id: Ib71e647682835baa71bd375ae3098966ae01f26c
2023-05-19 13:57:54 +00:00
Volker E b64642a527 styles: Remove obsolete mixin
Duplicated in core mixins with `.user-select()` since v1.38.0.

Change-Id: Ia0d36bbd2fd417a7195c235854ddd81ac76e51c1
2023-05-09 18:56:17 -07:00
Volker E 132763dd70 styles: Remove deprecated .background-image() mixin call
Deprecated since v1.38.0.

Change-Id: I5723bddcf4ffa529a5a89118ec4a7d36b480408d
2023-05-09 18:24:39 -07:00
Jon Robson 00b65d02cd Remove jquery.tipsy and use OO.ui instead
Bug: T77402
Change-Id: I63328cf86872019fc9832162b26ffa8075382acd
2023-05-05 16:32:00 +00:00
Jon Robson d41884b8e5 Fix file page integration
Bug: T335997
Change-Id: I1c7b6a9b8f0903670d1ac40e3d29239674f5365f
2023-05-04 11:39:23 -07:00
jenkins-bot acd340b5de Merge "Remove most uses of jquery.tipsy in MediaViewer" 2023-05-02 19:27:10 +00:00
Simon Legner d2ab19fdac Remove most uses of jquery.tipsy in MediaViewer
Tipsy was added in I993bf60909024453a14de85af6239bded02eb8a6 however
has since been deprecated and usage is discourage.

Falling back to standard HTML `title` attribute display seems fine. Some
buttons (such as previous/next arrow) have not had a tipsy tooltip.

To be done separately: TipsyDialog which is used for StatusInfo

Bug: T77402
Change-Id: I2f7ae189734ba6d6e67ca703a42ae899ec56729d
2023-05-02 18:21:57 +00:00
Bartosz Dziewoński 3bca077968 Remove some IE 11 support code
No longer supported by MediaWiki.

Change-Id: Ib16ecd8fc2ca8060deabf39142d5294a7b8f316f
2023-05-02 15:54:46 +02:00
Jon Robson d556e73a00 Router handling code should be centralized into mmv.bootstrap
- mediawiki.router is available inside mmv.bootstrap so move
the handlers into the bootstrap file
- Remove direct loading of images from mmv.js instead modify
event handlers to modify the location which will trigger the loading of
the image
- Copy what we previously did in MobileFrontend (Bartosz's idea)
to allow page refreshing and escaping overlay on page load.
- Remove some no longer relevant tests

Bug: T236591
Change-Id: Ie5d33fca5174db58380a63f5cf97f44e5df10d42
2023-05-01 17:22:39 -07:00
jenkins-bot e5f9cb140a Merge "Use .text( '\u00A0' ) instead of .html( ' ' )" 2023-05-01 18:54:17 +00:00
Fomafix 90a1949444 Use .text( '\u00A0' ) instead of .html( ' ' )
On reading the HTML by .html() in the tests the content is still
' '.

Bug: T154300
Change-Id: I2f43909c5539a5882af354fc8f64b03e43697647
2023-05-01 18:41:48 +00:00
jenkins-bot d23984ac52 Merge "Avoid HTML in jQuery constructor" 2023-04-29 16:46:05 +00:00
Fomafix 412765d8b5 Avoid HTML in jQuery constructor
See: https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript#Creating_elements

Change-Id: I6e037eb03d932bb50edecbfbbd56a06f24c287f8
2023-04-28 16:57:24 -07:00
Fomafix 8013fde051 Use formatversion=2 in API requests
The response of prop=imageinfo is now an array instead of an object.
Therefor it is not needed to interate over the elements anymore.
The array contains exact one element if one title is used in the query.

The function getNormalizedTitle not needed anymore because the
requested title is always the first element of the array.

Change-Id: I7a226d3950615a2152c3f55127b218cac2d21fcc
2023-04-24 20:32:11 +00:00
jenkins-bot 7ce1741121 Merge "styles: Replace old variables calls with skin variables" 2023-04-19 14:25:23 +00:00
Fomafix a8ccfb4092 Remove .join( '|' ) for API parameters
mw.Api automatically joins parameters which are from type array.

Change-Id: I17d7ba6f2fdc36963e984062827d69ff45656a93
2023-04-17 11:50:01 +00:00
Volker E bee73f7520 styles: Replace old variables calls with skin variables
Replacing 'mediawiki.ui/variables.less' `@import`
with new skin-aware 'mediawiki.skin.variables.less' standard.
Also replacing and removing scattered WikimediaUI Base variables
with new skin variables.

Also
- replacing several static values with new Codex design tokens featuring
  skin variables for following properties:
  - `background-color`
  - `color`
  - `border*`
  - `border-radius`
- replacing local variables with new skin variables where applicable.

Bump required MediaWiki core version to >= v1.41.0.

Bug: T319381
Bug: T332541
Co-Authored-by: Volker E. <volker.e@wikimedia.org>
Depends-On: I04f9e48a1cf9dee915cf51e1e12b17ff0a595a06
Change-Id: Ie834b3f652bd22d9bf96c112166a5b7fcc3ecf2d
2023-04-16 03:32:27 -07:00
Taavi Väänänen fb4ad597a0
Refresh Geohack URL
Change-Id: I86719937bca606f757f6f144bc287a0e61b09915
2023-04-10 17:58:25 +03:00
Umherirrender a9dad10f32 stylelint: Enable selector-pseudo-element-colon-notation
Via stylelint --fix

Change-Id: I9ea62e799573164a37181bc9b991c817a3786732
2023-04-04 08:18:59 +02:00
Timo Tijhof cd4da296c2 mmv: Use mediawiki.router instead of underlying oojs-router module
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
2023-03-06 02:34:13 +00:00
Gergő Tisza 298f1f77d2
Use checkered background for transparent WebP images
Bug: T327019
Change-Id: I445f1fdd562100f5788d31ec8dd506f8242a29c2
2023-01-15 21:57:04 -08:00
Arlo Breault b0f83b39fb Use Parsoid's regularity to find caption
Follow up to Ic652576f84e07c9fc8ef8be216a6fc94466198a6 where this was
hinted at.

The comment about active formatting elements is removed due to
I7b4e9df8490357f44d31d6a869fa9b7a15f029ea.

Bug: T321440
Change-Id: Ifb12dac64bd7a7fb8444ac2ada557868502cf213
2022-10-27 20:17:05 +00:00
jenkins-bot 3519a635a8 Merge "Fix credit fallback not updating when switching image" 2022-07-11 23:34:35 +00:00
Ed Sanders bf04f98306 MMV lightbox: Allow notifications to appear on top of the lightbox
Bug: T312778
Change-Id: I1e4a32325b36721b51ffb199df3471fc75e9498e
2022-07-11 16:01:14 +01:00
Ed Sanders f08e51741c Remove monobook selectors that assumed the '*' selector might not be available
None of the browsers we send JS to don't support the '*'
selector, so we can remove the fallback for monobook.

Change-Id: I691a71fc8bf4cfa62e8056fdf1021f6513517f75
2022-07-11 16:00:24 +01:00
Sam Smith 34e4968b2c Remove instrumentation
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
2022-07-05 17:41:24 +00:00
dylsss 9d265ee1d0 Fix credit fallback not updating when switching image
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
2022-06-07 23:29:49 +01:00
jenkins-bot 67035ba546 Merge "Support mw:File as well as mw:Image" 2022-05-26 20:40:21 +00:00
Ed Sanders e131da48f9 build: Update eslint-config-wikimedia to 0.22.1
Change-Id: I275ecfa03b3df8554b30f2a0f6d94d4b66da8088
2022-05-20 00:05:49 +01:00
Ed Sanders 3a61a45a53 build: Update stylelint-config-wikimedia to 0.13.0
Change-Id: I1b6de87b8a1b48220104af42a4e43d81a289438c
2022-05-19 23:58:01 +01:00
Ed Sanders 73e59d396d style: Remove vendor-prefixes no longer required
Change-Id: Ide19cd0decb8a6ef26ccb94bfc89376b3a886748
2022-05-19 23:48:51 +01:00
Arlo Breault 65cba344ad Support mw:File as well as mw:Image
Bug: T273505
Change-Id: I5734593936e620b4c74789080263ef1ea3b99c9d
2022-05-19 17:46:46 -04:00
Timo Tijhof 0f092b6cb3 tests: Minor clean up of mmv.ui.metadataPanel.js and other tests
* 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
2022-05-13 22:13:01 +01:00
Timo Tijhof 5e1dece304 tests: Make mmv.ui.metadataPanel.js pass with non-English locale
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
2022-05-13 21:49:51 +01:00
stang 52f2d40c8e Add word-break rule for mw-mmv-image-links to prevent overflow
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
2022-04-03 15:55:52 +00:00
Arlo Breault ae5a7aeac1 Separate processing for Parsoid thumbs
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
2022-03-04 18:36:26 -05:00
Arlo Breault 681e1afe36 s/thumbContain/thumbContainer/
Change-Id: I57738c705b3be7aade3e5ba64c879eecc1727383
2022-03-04 18:34:06 -05:00
Sébastien Beyou a10359e6e6 Replace deprecated jQuery.throttle/debounce
This requires MediaWiki 1.38 for mw.util.throttle.

Bug: T213426
Change-Id: I3f689eea837ef72de9ab7afb68578093eab8db20
2022-02-10 13:22:52 +01:00
Ed Sanders b03af20581 eslint: Lint Gruntile.js using server rules
Change-Id: I6f6f7391668412b2bb572a8d77da8e137fa169bb
2022-02-07 16:38:38 +00:00
Iniquity 5803ea79eb Remove discussion and help links from footer
Bug: T133899
Change-Id: Ide631cd8bd98ff5084a8c406515c53b8a0cb033a
2022-02-06 01:15:02 +00:00
James D. Forrester 7dbee90cce Avoid ableist language in comments and test names
Change-Id: I55047f95da7c05f631f4009cbe25d8515dd937f1
2021-12-09 19:48:17 -05:00
Volker E f074ab467b Replace obsolete LESS box-shadow() mixin
With unprefixed property.

Change-Id: I2b4117e6dd7082d544e09969441e5a5f912f7d1d
2021-09-11 02:31:19 -07:00
seddon b007aaa741 Err: param required cant be empty/0 ThumbnailWidth
Bug: T277893
Change-Id: I5b440be10aa30527270515f6921596b8000a9f83
2021-08-25 20:34:32 +00:00
seddon a397ce8f88 Lightweight fix to FF Nightly/Fission scroll issue
Bug: T229484
Change-Id: Id1624e8822b81deedf8c58a3df83bd992946869b
2021-08-04 09:49:30 +00:00