Commit graph

430 commits

Author SHA1 Message Date
jenkins-bot ccdb14634a Merge "Make it obvious that the permission text is cut off; add expand link" 2014-02-27 01:25:29 +00:00
Gergő Tisza 976ffc76d3 Make it obvious that the permission text is cut off; add expand link
Fades out the bottom of the text and adds a link to replace it
with the full HTML version. Due to the way it is positioned,
the fade + link will be invisible if the text is less then 3 lines.
The implementation is not very polished; since this will be
replaced by some JS-based ellipsis thing, I didn't want to spend
too much time on it.

Change-Id: Ib30e40fe845b85bfcf9557970efb886d28b3e5c7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-27 01:06:25 +00:00
Gilles Dubuc 1e880b68ca Ignore left/right key presses when there's a modifier
Change-Id: I8998fd27a7d60f5826802153d3ad74ab8a37c3fe
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/236
2014-02-27 01:17:53 +01:00
Gilles Dubuc 5d6d274309 Make the SVG filter inline
The external SVG doesn't work on beta, because
it's hosted on a different domain

Change-Id: Ic6ae42a33f9dbd656df051f056376aea60ac9ea3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
2014-02-27 01:11:52 +01:00
Translation updater bot 192864158b Localisation updates from https://translatewiki.net.
Change-Id: I531e63ab1394030fd633262a25a6671463f0546a
2014-02-26 22:00:59 +00:00
Gilles Dubuc 392cc4e737 Move "uploaded by" to the right spot
As specified in the acceptance criteria, it should be
between "Learn more" and the creation date

Change-Id: Ie3e7fd55b6bb8fa5cf995fa90dd8ab45581f34bd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/217
2014-02-26 18:19:51 +01:00
jenkins-bot 1317119e6e Merge "WIP Fix resize issues (Part I)" 2014-02-26 09:24:51 +00:00
Aaron Arcos efaae84a4f WIP Fix resize issues (Part I)
After a few false starts trying to fix LIP.autoResize(),
I noticed that it has become obsolete by our latest
improvements (bucketing and cashing), so I decided to
get rid of it and let the browser do the resizing.
I tested in Chrome/Safari/FF and this approach seems
to work fine.

Still work in progress and there are many things that should
be cleaned up regarding the image object logic but please take
a look and let me know if you have any objections if I go
this route.

Bug: 56454
Change-Id: I08207d0f1fcc9dcb69ec31c03e96cfd0c0a6c522
Mingle: 239
2014-02-26 10:22:47 +01:00
Gergő Tisza 77deada982 Fix display issues with "view terms"
Hiding the element before it is added to the document causes
a wrong display type in Firefox; changing the order of commands
fixes that.

Bug: 61936
Change-Id: I808131da25f2f70c14747238216e8973af44d029
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-26 01:20:34 +00:00
Gergő Tisza 18a850869d Make sure the text of the permission box is cut exactly between lines
Change-Id: I7a0a3056f6e3734579f1e04175e04c89ced92576
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-26 00:41:12 +00:00
jenkins-bot 62ebfd450f Merge "Blurred thumbnail preview + progress bar" 2014-02-25 21:37:38 +00:00
Translation updater bot aab21540f0 Localisation updates from https://translatewiki.net.
Change-Id: I62ae428700ac158f121158bb80a9a2999b8d33d0
2014-02-25 20:07:22 +00:00
Gilles Dubuc 77a483086f Blurred thumbnail preview + progress bar
Displays a blurred version of the thumbnail
while the actual image loads
Displays a progress bar showing the image load progress
Animates into focus once the actual image is loaded

Change-Id: I2b8bc4691c20ffb5b3f16da9a8b9d6fd1796d784
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
2014-02-25 14:57:33 +01:00
Gergő Tisza 109bbe6ac1 Namespacing MMV properly
Everything is under mw.mmv now.
(Also, I cut down on the number of direct global instance references a bit.)

Change-Id: I88bb3b62b82ce54126dd069b0aab4412d9404719
2014-02-25 13:16:22 +01:00
Gergő Tisza 53da285b07 Merge MultiLightbox into MultimediaViewer
* merges parent classes into child classes
* moves some files and tests to have a consistent directory structure

Change-Id: I360cc0805d8a561f5105fb063747457f67e1fccd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/177
2014-02-25 02:00:13 +00:00
Gergő Tisza a04631c405 Show permission
Change-Id: I0b8b0626b36baba9732f7350213d8b53ec2cca95
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-24 21:41:25 +00:00
Gilles Dubuc bfa530cc21 Wait for CSS to be truly loaded before opening the viewer
This is a workaround for core bug #61852

Change-Id: If7d830866993eddbf5784694514ff89aece56c5b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/258
2014-02-24 19:13:04 +00:00
jenkins-bot de9d10ce06 Merge "Better way to detect CORS support" 2014-02-24 19:13:06 +00:00
Gilles Dubuc 75dbc72e6c Better way to detect CORS support
The old technique doesn't work in Firefox and
doesn't always work in Chrome depending on
when you call it.

https://hacks.mozilla.org/2009/07/cross-site-xmlhttprequest-with-cors/

Also fixes some tests that weren't overloading
the right function and were hitting the real
feature detection check

Change-Id: I0a9d6b5654efb169860ddf7e5e0551efb825920c
2014-02-24 18:53:01 +00:00
Gilles Dubuc ce58597b3b Fix hash self-reaction
* Fixes bug where the mmv would react to its own hash changes
* Adds jquery.hashchange for older browser support

Change-Id: I2d23699bb444d9eb533d239e25bc47fa96c902a9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/254
2014-02-24 19:14:45 +01:00
Zeljko Filipin 006353fd24 Cloudbees Jenkins jobs are now created using Jenkins Job Builder
All Jenkins jobs will fail until this commit is merged:

https://wmf.ci.cloudbees.com/view/mv/

Bug: 61778
Change-Id: I5fb37946bbb15cb1b70045f85aa11ba48ecd2260
2014-02-24 16:46:20 +00:00
jenkins-bot 79d72d391d Merge "Use cross-origin img attribute instead of data URI" 2014-02-24 09:46:59 +00:00
Gilles Dubuc e37c9b809c Fixes hash handling issues
* Fixes the bug where the browser hash would get nuked on
foreign anchor clicks
* Moves the hash handling back into the mmv itself
* Adds test coverage for the hash nuking bug

Change-Id: Iea57d0f4b9090f96e622418223d3f774923e8038
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/254
2014-02-24 08:45:08 +00:00
Gilles Dubuc 28b8f5095e Use cross-origin img attribute instead of data URI
After lots of experimenting with Wireshark and
current Chrome + Firefox on Ubuntu 13.10, this is my
current understanding of the caching when preloading images
with AJAX requests:

* on Chrome, the image request always comes from browser cache
* Firefox makes two separate requests by default
* Firefox with img.crossOrigin = 'anonymous' makes two separate
  requests, but the second one is a 304 (does not load the
  image twice)
* when the image has already been cached by the browser (but not in
  this session), Chrome skips both requests; Firefox skips the AJAX
  request, but sends the normal one, and it returns with 304.

"wish I knew this when I started" things:
* the Chrome DevTools has an option to disable cache. When this is
  enabled, requests in the same document context still come from
  cache (so if I load the page, fire an AJAX request, then without
  reloading the page, fire an AJAX request to the same URL, then the
  second request will be cached), but an AJAX request - image request
  pair is an exception from this.
* when using Ctrl-F5 in Firefox, requests on that page will never hit
  the cache (even AJAX request fired after user activity; even if
  two identical requests follow each other). When using clear cache
  + normal reload, this is not the case.
* if the image does not have an Allow-Origin header and is loaded
  with crossOrigin=true, Firefox will refuse to load it. Chrome will
  log an error in the console saying it refused to load it, but will
  actually load it.
* Wireshark rocks.

Pushed some tech debt (browser + domain whitelist) into other tickets:
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/232
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/233

Reverted commits:
    8a8d74f01d.
    63021d0b0e.

Change-Id: I84ab2f3ac0a9706926adf7fe8726ecd9e9f843e0
Bug: 61542
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/207
2014-02-24 07:56:40 +00:00
Translation updater bot 3ac44cb7c3 Localisation updates from https://translatewiki.net.
Change-Id: I56b944b6d5396acfad862e05f00943951cd4d8bf
2014-02-23 21:41:45 +00:00
Mark Holmquist 1733df8dc9 Grand Unified Documentation Patch Jr.
The GRUDP is dead, long live the GRUDPJ

Change-Id: I71a22c3aa42b2eb799ce8104159e8c7e56fe13ae
2014-02-21 00:55:43 +00:00
Gergő Tisza 8b984c5ed4 Minor documentation tweaks
Change-Id: I8b513ceab06ddeb47261949061b777105cfa7b65
2014-02-21 00:45:06 +00:00
Aaron Arcos 8a1bf00ef0 Remove fire_event("onfocus") from next/previous/exit actions, not needed
As suggested by Chrismcmahon, I confirmed that there is no need
to fire the onfocus event. We also remove the convenient functions
around this logic.

Change-Id: I00ce04c758e496f76bd5c2a43ad933c952acc5fb
2014-02-20 14:00:26 -08:00
Translation updater bot c66b57d701 Localisation updates from https://translatewiki.net.
Change-Id: Ib2c86f71eecfbc1f6ab151e35987e4e680f15c64
2014-02-20 21:03:36 +00:00
Cmcmahon d6b8f6a7a3 Merge "Improve e2e tests to check metadata content" 2014-02-20 20:44:46 +00:00
Gilles Dubuc fdeedd6a88 Fix preloadFullscreenThumnail breakage
Since there was no merge conflict and the changeset worked pre-merge, when jenkins merged the fullscreen changeset, it actually turned out to be incompatible with the new code and spews out a nasty JS error. I think from now on I'll always avoid +2ing a diff that hasn't been rebased to the latest. When looking at the diff not rebased to the latest, you just can't see the issues that might happen with the latest code merged and you certainly won't spot the potential breakage that comes with it.

In fact I think a lot of breakages we've encountered as of late were caused by this very issue.

Change-Id: I46b7dd93c55635f34c01bd8d3eee9785140b5f35
2014-02-20 10:34:48 +01:00
Gilles Dubuc 093cfdc697 Preload fullscreen image
Change-Id: Ief72a4ab2e49538132b174fd9fcf792ddab66b3d
2014-02-20 09:43:10 +01:00
jenkins-bot 3f5323608b Merge "Get article path for foreign DB repos too" 2014-02-20 08:38:03 +00:00
Gergő Tisza f2550c0fbc Fix fileUsage test breaking behavior.
fileUsage tests were applying styles to the fixture element, which
apparently does not get cleaned between tests. This was because
fileUsage.$container had different semantics from element.$container
(widget's own container div vs. parent container div). FileUsage
now inherits from Element to make sure behavior is consistent.

Change-Id: I8fab8bcf084d8b7e480655114506d9848e9d9a49
2014-02-20 09:33:34 +01:00
Aaron Arcos bd07e7e7a6 Improve e2e tests to check metadata content
The first version of the e2e tests just checked the presence
of some DOM sections. This 2d version actually verifies the
values for most of the components in the viewer.

Change-Id: Iabfd544f05182e86a16cf6bda162bb0abc5cf260
2014-02-19 18:46:28 -08:00
jenkins-bot 6c3e73c8de Merge "Fix image provider unit test." 2014-02-19 23:54:22 +00:00
Gergő Tisza 3f326bb3bc Fix image provider unit test.
Change-Id: I3a219d7c6277b1cd8332b35f9403e4d99352af41
2014-02-19 23:52:52 +00:00
jenkins-bot b6add9a17b Merge "Hide mouse cursor when buttons are faded out in fullscreen" 2014-02-19 23:48:32 +00:00
Translation updater bot 258bdf7747 Merge "Localisation updates from https://translatewiki.net." 2014-02-19 20:24:28 +00:00
Translation updater bot de292e1215 Localisation updates from https://translatewiki.net.
Change-Id: Ic412a70ec152504830831c95749b743f75cc9054
2014-02-19 20:08:29 +00:00
Aaron Arcos 63021d0b0e Fix e2e tests to support data:URIs
We are using data:URIs to measure performace. This
change broke e2e tests that were trying to match plain urls.

Change-Id: I8220801472cde595dd6651ef2796468eba484071
2014-02-19 12:00:47 -08:00
Mark Holmquist c619a19711 Get article path for foreign DB repos too
We have had this method in all Repo subclasses for a while, but sadly
it never got used and we've unintentionally crippled foreign DB repos
for some time now.

{{fixed}}

Change-Id: I972eb739cdd56c666981d5fbc371fa53024ff359
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/217
2014-02-19 11:13:17 -08:00
Gilles Dubuc d53ca1462e GlobalUsage should utilize the right Api class
Change-Id: Ia0d0ee1d9213f98d89455f88b50616a5fbd87dcf
2014-02-19 19:18:42 +01:00
Gilles Dubuc e1e9a24a0a Missing dependency
Change-Id: I8ce510883e13401d9b1464b1583ee11d01f40df6
2014-02-19 15:41:40 +01:00
Gilles Dubuc 9a0a601278 Hide mouse cursor when buttons are faded out in fullscreen
Change-Id: Ie7bec07a9c79cb5ffde586ccd3cfdd3eac519047
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/210
2014-02-19 12:32:10 +01:00
Mark Holmquist 5df979bd65 Grand Unifying Documentation Patch
Change-Id: Id0def78beb0231270557037a9c530c770b100ce2
2014-02-18 18:27:30 -08:00
Gilles Dubuc 8a8d74f01d Avoid double requests when measuring performance of image load
Change-Id: Ib5ec4c3e4e4a410a6ee520b11bf025d7447cb542
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/207
2014-02-18 16:45:03 -08:00
Gergő Tisza 7afbc5ce92 Use provider XHR information in performance metrics + several fixes
* more robust method of obtaining URL
* decouple performance logging from providers (mostly)
* ignore fake XHR object which jQuery returns for JSONP requests
* guard for CORS requests - apparently Chrome refuses to return
  certain information even with an Allow-Origin: * response header.
* Resource Timing is limited to 150 results, which causes fake
  misses in debug mode. There is an API to increase the limit
  but it is not implemented in Chrome. I am calling it nevertheless,
  maybe IE understands it (it is present in the MSDN docs at least).

This seems to work for AJAX, CORS, JSONP, image AJAX; CORS requests
return 0 for a lot of values, per spec a Timing-Allow-Origin: *
header might help that.

Change-Id: I8353858022f51a7e70774e65513d0fa2554a5064
2014-02-19 00:38:27 +00:00
Gilles Dubuc 035afe6d36 Make metadata animation more subtle
And stop showing when the user has opened the metadata once

Change-Id: Iefce36acf1b78301584ca8c1359fac94956a9440
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/213
2014-02-18 16:17:14 -08:00
Gilles Dubuc a5cddef17a Lazy-load mmv
Also removes the index inside the location hash

Change-Id: I9429ff0101ab891f2c4c6aa2d989fbef0813252d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/136
2014-02-18 15:55:15 -08:00