When opening the viewer set the body background and the theme-color
to match the background of the viewer. This provides a better
experience for (esp. mobile) browsers.
theme-color has to be overriden, as it can be inferred from the top
of the browser window, but images can be all kinds of colors, so it
is better to be explicit.
Bug: T368659
Change-Id: I313745a31bf17eef612dd89630b1bbc4cb57fd45
The license links listed on the right are vertically pretty tight
next to eachother. Add some line-height to make them more readable.
Bug: T365192
Change-Id: Idd0e3d845188178656017ac3158b0a3451c24294
- Use square cdx icon only buttons
- gray transparent brackground
- opaque background on hover, active, focus
- Some fixes to the positioning and offsets of buttons and dialogs
- Move the dialogs to be in the same container as the buttons
This is better for accessibility but also fixes the z-index issue
Bug: T365192
Change-Id: Idbc2a309fbca15bd528aaed7ca9bed584487c4f3
mmv.displayPlaceholderThumbnail overrides this value using ImageInfoProvider.
Bug: T64039
Follow-Up: Ic7c5889064492fc88dae33271b635c5327b091e1
Change-Id: I08d024f81336a76439f51b7684446f8725ddb905
When opening the media viewer, we immediately display a black frame,
as we wait for the dependencies etc to load.
Add a codex indeterminate progress bar to this phase as we wait, so
the user has feedback that something is happening.
Bug: T77230
Change-Id: Ibba98150ac2e8034fbfcd586309632704cf0b606
Repo was only used in two locations:
1. StripeButtons.set for `isCommons` - can be replaced by `descriptionUrl.includes('//commons.wikimedia.org/')`
2. EmbedFileFormatter.getSiteLink (unused)
Furthermore:
- Simplify StripeButtons (we only have one button)
- Unwrap info objects consisting of `ImageModel` and `Repo`
- Remove unused EmbedFileFormatter.getSiteLink
- Inline EmbedFileFormatter.getCaption and EmbedFileFormatter.getLinkUrl
- Fix JSDoc type `ImageModel`
Reduces mmv bundle size from 28012 to 27246.
Bug: T77349
Change-Id: Ia4388fe4d5e1d6112a992e826453cd5799a6a4b4
Initialise the corresponding dialogs upon first use by deferred loading of the mmv.ui.reuse module. Reduces code size of the main mmv module.
Bug: T77349
Change-Id: I672419e1a8af47d192843f7e7a4a038c0d8da2a3
This removes the thumbnail blurring.
The initial page thumbnail is still in place.
This too can be slightly improved as sizing up to the MMV frame is
done via JS right now, and causes a noticeable change. But we can
simply do this with CSS immediately i think.
Bug: T71609
Bug: T65504
Change-Id: If2a92689be9ee7ecd64561dc224991f31274d58a
- Instantiate LightboxImage object in mmv.bootstrap
- Add LightboxImage.position field: relative position of this image to others with same file
- Add optional routing suffix /:position
Bug: T64039
Change-Id: Ic7c5889064492fc88dae33271b635c5327b091e1
This module contains the restriction icons. The main mmv module shrinks from 196.88kB to 174.97kB.
Bug: T77349
Change-Id: I78d16b487f5272a8f779f3484c883d113db1878b
White on white got a bit confusing. Use a much heavier
box-shadow to give better distinction for the elements.
Alternative is to use a border of the subtle color, but doesn't look
as nice to me.
Bug: T365192
Change-Id: I0bf760f0987b2c04a66b00f24398561588bd719a
Seems to be a leftover from performance instrumentation I97d41be93849b2ae9d1adba6660546ea716657fd.
Change-Id: Iaba7d23fd526db772528d3ccb74889e7000b3d71
UI interactions should always provide some visual feedback,
and the mw.widget version of this triggered a notification.
Bug: T340258
Change-Id: I1f9850541d23e362c2cd73c3797d1f03bcfc7ca1
Those icons have been replaced with Codex equivalents in I6f7b6d0f9b96168ab6d835811141ab4cede214d1.
Bug: T340258
Change-Id: I3ec630f414e2b71743d3440339c13be54db62a79
- Use Codex styles for mmv.ui.reuse
- Replace unofficial component dropdown with Codex Select and Button
components.
- Drop OOUI dependencies
Bug: T340258
Change-Id: I539d1b5f0d7e3c02f767807da57324ea6a36ad5b
Discussed with Justin and Matthew (designers):
- Dropping the image in "Disable Media Viewer"
Discussed with Jon:
- Resizing the next/previous arrows
Bug: T340258
Change-Id: I6f7b6d0f9b96168ab6d835811141ab4cede214d1
Invoking encodeURI on the imageFileTitle makes sure that a "%" character is properly URL-escaped.
Bug: T337540
Change-Id: I538b7f813b546134848e93cea4744de8f4da9e90
The latest update of 'svgo' dependency includes three optimizations on
converting path commands, which
- improves closing paths and how we determine if to use absolute or
relative commands.
- round arc or convert to lines based on the geometric sagitta
- convert cubic Bézier curves to quadratic Bézier curves where possible
Also
- removing obsolete 'grayscale.svg' which was introduced in
I0f2c2b24aece3b but seems to have not been in use. It itself is not
reasonable, as an SVG filter needs an element to be applied to, which
this SVG didn't feature.
- unifying npm command to qua standard notation `minify:svg` and add
“parent” command `minify` as well.
Bug: T354875
Change-Id: Ie4d8ef85b9b9d28943a7216f0b5ed6392592a43e
* The file page has a button that does not match the font size of
the page. This is also the case for the overlay.
* The icons are too big on the file page. This reduces their size.
Bug: T345749
Change-Id: I4f4edc0aa7adc0c72773a939c43108019bc4295b
Use the eslint rule
"no-var": "error"
in resources/.eslintrc.json and in .eslintrc.json
to require the use of `const` and `let` instead of `var`.
Bug: T337102
Change-Id: I3b3d6d426966a97c13f62494443f62bd5b790920
Skip thumbs found by the newly added selector (from 4d4e86ec) to skip
when also matched for the parsoid part of the multimedia viewer.
Bug: T348275
Bug: T349448
Follow-Up: I5ec67accab4e1cbfa90544087750016e1baab85d
Change-Id: I0c45b877565fd54b3e1cc766e4ee745a48cdea27
This was used internally by `jquery.fullscreen` but now that we
have all the logic inside this file, we don't need to store this
information two places with a copy in `this.$main.data()`. We can
use this.isFullscreen directly as they are always the same.
Change-Id: Ie15729a038bc9c1f6278c0b068c0706620d95e93
a.thumb is no longer outputted when $wgParserEnableLegacyMediaDOM is
false (fdd8f864 ), use the new class from 350721cc
Bug: T348275
Change-Id: I5ec67accab4e1cbfa90544087750016e1baab85d
Dots needs escaping
resources\mmv\model\mmv.model.Repo.js
129:11 warning Unsafe Regular Expression
security/detect-unsafe-regex
169:11 warning Unsafe Regular Expression
security/detect-unsafe-regex
The plugin does not like the backtracking for "https?", but that does
not looks like a performance problem when given long strings here.
Change-Id: Iac4c88b591c2e8ebb2ce037bbd99b774319a261c
Use localstorage to store MMV preference for anon and temp users,
use regular user preference for non-temp accounts only
For embed default to wikitext for temp and regular users, html
for anon users
Bug: T340534
Change-Id: Ic19e8a6b6fbdeb2c86be14a33a306dd0f3088b1b