Commit graph

797 commits

Author SHA1 Message Date
Krinkle bfc93418c8 Merge "Remove @embed where it needlessly delays loading of the UI" 2019-09-27 16:19:42 +00:00
jenkins-bot dd4f996ae4 Merge "Revert "Clicking on the black wrapper should close MVV"" 2019-09-23 19:16:59 +00:00
Esanders 24fcde2546 Revert "Clicking on the black wrapper should close MVV"
This reverts commit c7c8059a0a.

Bug: T133900
Bug: T231895
Change-Id: I0583487249ca4bb29bf68fb218a3ddf2251893e7
2019-09-23 18:51:33 +00:00
James D. Forrester e75c8f3fb4 mmv: Don't try to use internal (now removed) ext property of mw.Title
Bug: T232521
Change-Id: I8af85efc2b7ff84f81a72b39986ce3eb356eac69
2019-09-10 12:57:33 -07:00
Timo Tijhof 70b0cbb727 Remove @embed where it needlessly delays loading of the UI
* 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
2019-09-02 01:24:56 +00:00
libraryupgrader 5410aa9150 build: Updating eslint-utils to 1.4.2
* https://npmjs.com/advisories/1118

Additional changes:
* Added .eslintcache to .gitignore.

Change-Id: I9b6420e70ec7f4568b707371c731a8db56f6e34a
2019-08-24 12:16:21 +00:00
jenkins-bot b351d1b5fc Merge "build: Update devDependencies" 2019-08-01 02:15:32 +00:00
Ed Sanders 18a154b989 build: Update devDependencies
Change-Id: I46f5317976ef9f818e30b0c81018e83800535389
2019-07-31 22:59:13 +01:00
Ed Sanders f4d6c9f37e Remove useless .opacity mixin
Change-Id: Icff7c01aba4a647d23bae1925b725bddc555c762
2019-07-29 17:56:43 +01:00
Ed Sanders 0cda0f8706 Drop CSS hacks for unsupported browsers (IE<11, ancient Firefox)
Bug: T184543
Change-Id: Ibd07ecd545f9b69f4dd3adb2b371b4d87ca4098b
2019-07-29 15:33:58 +01:00
jenkins-bot ec72d6284d Merge "Chrome does not revert title to article title" 2019-07-29 14:20:14 +00:00
Simon Legner c7c8059a0a Clicking on the black wrapper should close MVV
Bug: T133900
Change-Id: I0f05a3b16cdbef9a64a3d5cb4982525460e3b002
2019-07-09 17:21:10 +00:00
jenkins-bot 989af50dcf Merge "Make the download/share buttons actual links for right/middle click" 2019-06-15 22:09:38 +00:00
Simon Legner a663d2884c Chrome does not revert title to article title
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
2019-06-11 11:50:44 +02:00
Fomafix f89d7dc878 Remove "window." for location and setTimeout
The JavaScript in core also don't use "window." for these browser
properties and methods.

Change-Id: I344573fd7ef0e73c252779b4e59a53168d16574f
2019-06-10 12:46:58 +02:00
Fomafix 7e03aa58a5 Use mw.log.error instead of window.console.error
mw.log.error is always present and calls console.error if available.

Change-Id: I6337ce7f0b6fef2933b067cda7097037cf757d7b
2019-06-10 12:22:19 +02:00
jenkins-bot 0d4d5096b1 Merge "Replace moment.js with Date.toLocaleString" 2019-05-31 21:14:00 +00:00
Simon Legner 682873dd2d Replace moment.js with Date.toLocaleString
Bug: T224626
Change-Id: Ib312821d2c72c2570cec29153557fd44e4db2bf7
2019-05-31 21:56:45 +02:00
jenkins-bot 1e704eec51 Merge "Fix unresponsive download button" 2019-05-31 16:52:51 +00:00
Simon Legner 1a00347c49 Fix unresponsive download button
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
2019-05-28 23:11:18 +02:00
Simon Legner e77393744d Fix routing after repeatedly opening/closing
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
2019-05-28 22:37:00 +02:00
jenkins-bot a4e63f623c Merge "Adopt mediawiki.router" 2019-05-28 15:14:50 +00:00
Simon Legner b1ade19388 Adopt mediawiki.router
Bug: T77258
Change-Id: Id4df92b0ebed3fb4f4b9269862c952f3968bf957
2019-05-26 19:46:38 +02:00
Ed Sanders 394b893c7d Use upstream CopyTextLayout in share/embed/download panels
Results in small UI changes, but allows us to delete a lot
of code duplication.

Depends-On: I9049f5a1c0d88680fc4a174e390dd08e27c0eee2
Change-Id: Iebe7bdc8a026b929a35e823d8107d90e7bb62b82
2019-05-23 20:01:36 +01:00
jenkins-bot 4f9b3eff8a Merge "Enlarge click regions of all icons in the main UI" 2019-05-20 11:08:08 +00:00
jenkins-bot bc666cb1e7 Merge "Show the hand mouse cursor on all "copy to clipboard" icons" 2019-05-20 10:07:48 +00:00
Thiemo Mättig 8b647c09e7 Make the download/share buttons actual links for right/middle click
Bug: T71469
Change-Id: Ib9dca98a70a056e93e252ba1d08479be509e7a18
2019-05-20 09:05:10 +00:00
Thiemo Kreuz 873a88e654 Enlarge click regions of all icons in the main UI
Before, the icons on the right all had a 24x24px click region, exactly
as big as the icon. There was no wiggle room. You had to be very precise.
This patch adds a padding that can be clicked as well, 14px left and
right, but no additional padding top and bottom (this might be an
additional change for another patch).

I made sure the positions of all icons are 100% as before.

Change-Id: I1618681b5ab714cb4cfc789dc6d501ec30643bc0
2019-05-19 19:00:27 +00:00
jenkins-bot fb40e5b09f Merge "Do not clone CSS class names as well" 2019-05-19 13:12:18 +00:00
Thiemo Kreuz 6d042d7fa6 Show the hand mouse cursor on all "copy to clipboard" icons
All other icons show the pointer (a.k.a. hand) mouse cursor, except
this one. I believe this is just a mistake.

Change-Id: Id48f65273be0ea81e7c10f0b222430cc85f815a5
2019-05-19 14:57:56 +02:00
Thiemo Kreuz 26fbcd6095 Do not clone CSS class names as well
What MultiMediaViewer does is re-using the small thumbnail <img> that
is already present on the page, cloning it, blowing the size up, and
using it as a "placeholder thumbnail". The moment the bigger image
finished loading, it replaces the placeholder.

The issue here is that the cloning includes class names like the
<img class="thumbimage"> on every [[File:…|thumb]] image. This shows a
gray border. The cloned DOM node in MultiMediaViewer shows this gray
border around the placeholder for a short time. This can be distracting.

Change-Id: Ie83427fab478b6568731b9a0b1f7dbbcc6d5b0fb
2019-05-19 10:44:21 +00:00
Simon Legner e1caa0f65e Fix typos in code/comments
No functional change.

Change-Id: I6447aefe8fdd39642d613f55ad0a5537f64dcb9d
2019-05-19 10:17:44 +00:00
Thiemo Mättig f8bf849430 Allow partial selection in text fields
Really, why should this be forbidden? These onclick handlers do waaaaay
to much. They do not only block what they should block, they block way
more stuff, like resizing the textarea and interacting with it in any
way that involves the mouse. This is not the intention of this code.
I'm sorry to say that, but this code is the equivalent of "disable
right click to prevent stealing images" on 1990s web pages. Please,
please let's not do this. Let the user do what he expectes and is used
to do.

Bug: T110579
Change-Id: Ia89faea678606d5c382539f726e2edaa745c904e
2019-05-10 14:33:08 +02:00
James D. Forrester c6008c7844 build: Be more aggressive in fixing old bad JS code style
Change-Id: I7f734f1440a4a3216e774d2bddbc39b34f4125d2
2019-02-20 19:28:25 +00:00
James D. Forrester 1b21470703 build: Update eslint-config-wikimedia to 0.11.0
Change-Id: I66788a2c1fa59b617abd13b7c8e8fb59ad74130c
2019-02-20 19:22:21 +00:00
Ed Sanders 92157f6b05 build: Update eslint-config-wikimedia to 0.10.1
Change-Id: Icd89819ef38142e55c0bd4cc8dbb73745123f9f6
2019-02-06 01:56:53 +00:00
Ed Sanders a518cb03a5 build: Update eslint-config-wikimedia to 0.9.0
Change-Id: I92ed1f7093cfaed47f0372f9cb063fe4e65b4f55
2019-01-03 13:47:16 +00:00
jenkins-bot f45953cb15 Merge "build: Use stylelint-config-wikimedia v0.9.0 and make pass" 2018-11-30 01:08:06 +00:00
Volker E 8e94e95f7b build: Use stylelint-config-wikimedia v0.9.0 and make pass
Change-Id: I1359fb4d78aee9d37b67c13464e31e035d3435a5
2018-11-29 10:34:00 -08:00
Volker E a23084a360 build: Follow 'svgmin' step option best-practices
Changing indentation to tabs and use `multipass` option correctly.
Follow-up to I09660b9d49cfdc4.

Change-Id: Ic69532ad165c34aab97888328c7bef6e6c578491
2018-11-28 18:32:16 -08:00
James D. Forrester 90ada228cd eslint: Drop 'dot-notation' rule
Bug: T210552
Change-Id: I09660b9d49cfdc450efe0273736abd4730da5e77
2018-11-28 10:46:41 -08:00
flutters 2fad4daa43 SVG files display at max resolution
When an svg file is requested, returns the 1024px file and displays at
max possible size

Bug: T71237
Change-Id: I797794d1f9b1aa66cbb9bd9fec57274554292fb1
2018-11-26 20:37:34 +00:00
Ed Sanders 1ded292f83 Remove obsolete aliases from closures
Bug: T208951
Change-Id: Ice695dfb489974faa23ba19d74cf17b06e3f6075
2018-11-12 16:33:24 +00:00
Volker E a92bbbaa5f Update user avatar icon
Updating user avatar icon to overhauled standard WikimediaUI icon.
Also:
- Using new icon default size instead of `80 x 80 px`. Icon is
  resized by `background-size` in both applications anyways.
- Renaming 'user*' to 'user-avatar' for consistency across projects.

Bug: T123810
Change-Id: Ifb2027694af8f619663f00f4c50891772ee64746
2018-10-10 23:29:01 -07:00
Kunal Mehta c50794c3f2 Don't use deprecated jquery.hidpi module
Using window.devicePixelRatio directly means we won't be supporting Windows 8
and/or IE 10 & 11. But that seems intentional based on 828f6d6ac9db.

Bug: T206099
Change-Id: I53dbce0a8ddc69c4edfd4d10f98031aa4f7cd20a
2018-10-08 20:15:18 -07:00
jenkins-bot a0f3ccba4e Merge "Use improvements of jQuery 3.3" 2018-09-23 18:24:41 +00:00
jenkins-bot efa37ccd29 Merge "Use a for loop instead of Array.prototype.find" 2018-09-22 17:59:12 +00:00
Fomafix 170d10848b Use a for loop instead of Array.prototype.find
Array.prototype.find is part of ES6 and not supported by older browser.

This change is a follow-up of 965b496850.

Bug: T205162
Change-Id: I0954c42a37668b0eb46c3e864a2e13152a6dc68a
2018-09-22 14:41:56 +00:00
Fomafix 30bae884e6 Use improvements of jQuery 3.3
Replace
  .removeClass( classes.join( ' ' ) )
by
  .removeClass( classes )

Since jQuery 3.3 .addClass(), .removeClass() and .toggleClass()
supports arrays. [1]

[1] https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/

Change-Id: Icd8eb2eb228c7612f028cc399d29826908e2ae39
2018-09-19 21:17:06 +02:00
Ed Sanders 053d1a9d8b build: Update linters
Change-Id: Ie6e85abdc0714adf4d89e515967bf2ab4c393215
2018-09-13 22:13:56 +01:00