Commit graph

805 commits

Author SHA1 Message Date
jenkins-bot eecde58ff8 Merge "Add 1 pixel of tolerance to the basic test." 2014-05-15 20:42:52 +00:00
Gilles Dubuc c6411d3c6a Add 1 pixel of tolerance to the basic test.
This is the first failure that the E2E test is running into when being
run on IE9

Change-Id: I60fe8764196ecc60e2c365576349cf902a069ddb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/577
2014-05-15 20:41:08 +00:00
Gergő Tisza d74b4dce4f Fix failing focus tests
jQuery 1.9 changes how $.focus() calls are handled: instead of
directly calling the handlers, it just invokes the DOM element's
focus(), and leaves it to the browser's event handling to trigger
them. This can fail for several reasons (e.g. element is not
attached to document, element is already focused, browser bugs such
as http://bugs.jquery.com/ticket/13363 ), so we are using
triggerHandler('focus') instead, which calls the handlers directly
without simulating actual browser events. Since these are unit
tests verifying event handler attach/unattach behavior, not
acceptance tests verifying actual event handling behavior, that
should be okay.

Change-Id: I65ecda28ace4f380ad33d6212e12069e18001232
2014-05-15 19:20:47 +00:00
Gergő Tisza 4329d453ec Minimal zoom implementation
Just a link to the full-size file for now.

Since the link must be to a PNG/JPEG/GIF (so possibly a thumbnail),
and we want to cap the size, we might need to get the URL from the
API, but we need to open the new window right away to avoid popup
blockers, making this patch quite complicated.

Change-Id: I9ce9d2a2d27b75470eae2806d9f9ce2f95f4dac2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/588
2014-05-15 01:04:23 +00:00
Translation updater bot ae51ebd3ee Merge "Localisation updates from https://translatewiki.net." 2014-05-14 19:37:24 +00:00
jenkins-bot eeb5f4bd38 Merge "Improve DurationLogger test code" 2014-05-14 19:35:52 +00:00
Translation updater bot fd81224267 Localisation updates from https://translatewiki.net.
Change-Id: Ic3e1d031450050e3664f1537e8c7f40174afa8ee
2014-05-14 19:35:24 +00:00
jenkins-bot 3353a3e1a2 Merge "Fix IE9 support" 2014-05-14 19:21:14 +00:00
Gilles Dubuc 8a4c062343 Improve DurationLogger test code
More dependency injection, cleaner sinon calls

Change-Id: I4b15a6aa9bca3b89f85ad15eed02e33c291b754d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/571
2014-05-14 12:24:31 +02:00
Gilles Dubuc 7d5a82c571 Fix IE9 support
- Fix JS error on pushState
- Fix blur issue where blur(0px) filter would blur anyway
- Fix wrapper sizing issue where its size would be 0 when measured

Bug: 65225
Change-Id: If9279cd56f55f71f261ec54dda8228194988b9ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/597
2014-05-14 12:06:27 +02:00
jenkins-bot 7245220e84 Merge "Extract metadata panel scroll/log/animate logic into separate component" 2014-05-14 07:34:02 +00:00
Translation updater bot 892650356b Localisation updates from https://translatewiki.net.
Change-Id: I95e4abbec86921555499adbb896cdce2898ecf40
2014-05-13 20:10:29 +00:00
Gergő Tisza 40b125565d Extract metadata panel scroll/log/animate logic into separate component
Change-Id: I2441d64c094a9bfbae7a4712ff4c78efa13a62a7
2014-05-13 18:57:38 +00:00
jenkins-bot 468a249497 Merge "Do not log a metadata event when the user presses the wrong key" 2014-05-13 08:19:55 +00:00
jenkins-bot a03f290530 Merge "Improve post-fullscreen panel/image sizing logic" 2014-05-13 00:00:38 +00:00
Gergő Tisza 8a118816a5 Do not log a metadata event when the user presses the wrong key
Do not log metadata-open when panel is already fully open and the
user presses the open key. (Same with close).

Also a completely unrelated code simplification.

Change-Id: I1f26b8669aa496d68b61d9a432430bf0864e8533
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/559
2014-05-12 21:29:12 +00:00
Translation updater bot 9b295bd8f9 Localisation updates from https://translatewiki.net.
Change-Id: I62ff9c6fa7a1ee7bcd63fdaac0a66b3b07412218
2014-05-12 20:10:35 +00:00
jenkins-bot 5eaac7b3ae Merge "Fix url encoding in URL guesser" 2014-05-12 10:37:08 +00:00
Translation updater bot 6dce8c9dbc Localisation updates from https://translatewiki.net.
Change-Id: I78bafcb5781f6d9bf866f58b4549e6d3470df138
2014-05-11 19:08:09 +00:00
Gergő Tisza d964b3fd09 Fix url encoding in URL guesser
Change-Id: I99757913cd2fe5170db37c79a2d2986b12b5aa45
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/594
2014-05-09 22:44:57 +00:00
Translation updater bot 832cbf3f03 Localisation updates from https://translatewiki.net.
Change-Id: I9c80e0467c8063dd90cd0c0f3ac07fa33e773242
2014-05-09 22:21:30 +00:00
Translation updater bot bc3101b5dd Localisation updates from https://translatewiki.net.
Change-Id: I0f1bf8203898ff1259fc0241da718a9256a87130
2014-05-08 20:48:23 +00:00
Translation updater bot ebb667b6e7 Localisation updates from https://translatewiki.net.
Change-Id: Ifef726306a989c661358ecb9f510e7f17b3c3061
2014-05-07 20:00:14 +00:00
Gilles Dubuc 0f8c7dc214 Improve post-fullscreen panel/image sizing logic
Also deletes custom event that should have been cleaned up before

Change-Id: I531a9cb068b0ae26ea0c3b46d8fdad84068c6931
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/569
2014-05-07 06:49:15 +02:00
Gilles Dubuc 8a9f23dab7 Remove the threshold where a load is considered to be coming from the browser cache
We'll filter those out in SQL instead.

Change-Id: I2b7c019e20fa224480035b67c64b5666d21ba55c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/563
2014-05-06 16:59:53 +00:00
jenkins-bot e747af6d52 Merge "Use localized namespace name in embed wikitext" 2014-05-05 06:30:06 +00:00
Translation updater bot 4a8f5a3be5 Localisation updates from https://translatewiki.net.
Change-Id: Ibf337d09cfbb919d567b0794f5c2e5270445debb
2014-05-04 20:08:15 +00:00
Gergő Tisza 59b8e5c82a Use localized namespace name in embed wikitext
Bug: 64710
Change-Id: I2164e3dfafe8ddf4b88ae0d2f23e8573cf162b89
2014-05-04 05:01:48 +00:00
Translation updater bot 38322a8c81 Localisation updates from https://translatewiki.net.
Change-Id: Ieb4a3ea692a6eba71862e3b86790f0fc924cb8dd
2014-05-03 20:01:02 +00:00
Translation updater bot 38311f42d8 Localisation updates from https://translatewiki.net.
Change-Id: Ie40da5b50d607b1424782600a822c7c42f115d29
2014-05-02 19:51:47 +00:00
jenkins-bot 9e0df0dd4c Merge "Refactor progressbar & blur handling" 2014-05-01 23:12:22 +00:00
Gergő Tisza fec24e02f7 Refactor progressbar & blur handling
This tries to fix a number of related issues:
* the blurred thumbnail was visible for a split-second sometimes
  when switching back to an already-loaded image. (Presumably when
  JS was sluggish enough to take more than 10 ms to execute.) We
  now check whether the promise is pending before showing a placeholder.
  (More generally, a lot of unnecessary logic was executed when paging
  through already loaded images, like displaying the placeholder, so
  this might make the UI a bit more responsive.)
* the blur could get stuck sometimes - I have seen this a few times,
  but have never been able to reproduce it, so I'm only guessing, but
  maybe the timing was really unfortunate, and we switched back less
  than 10 ms before loading finished. We now remove the blur on every
  branch, just to be sure.
* adding a progress handler to a promise might not have any immediate
  effect, so when switching to an image which was loading, the progress
  bar reacted too late. We now store the progress state per thumbnail
  so it is always available immediately.
* the progress would animate from 0 to its actual state whenever we
  navigated to the image. The change on paging is now instant; the
  progress bar only animates when we are looking at it.
* switching quickly back and forthe between a loaded and a loading
  image resulted in the loading image becoming unblurred. This seems
  fixed now, I'm not sure why. Maybe the "skip on non-pending promise"
  logic affects it somehow.

Also removes some unused things / renames some things which were
confusing, and makes an unrelated fix in the image provider, which kept
amassing fail handlers.

Change-Id: I580becff246f197ec1bc65e82acd422620e35578
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/489
2014-05-01 21:09:28 +00:00
Gergő Tisza 88f766bfc3 Reanimate metadata panel when viewer is reopened
Change-Id: I776a27358b2da17a35234aa8cb649a49df4a651d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/548
2014-05-01 12:05:26 +02:00
Gilles Dubuc 5f7af0cede Catch exceptions raised by localStorage write operations
Also adds dependency injection to the metadata panel
for cleaner tests.

Change-Id: I3f062ff88c03ad3baca00461bff486a883776eb1
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/530
2014-05-01 12:00:31 +02:00
jenkins-bot 553a9f142d Merge "Disable JSONP cache breaking in jQuery" 2014-05-01 09:50:32 +00:00
jenkins-bot 8138013421 Merge "Fix Commons tooltip for messages using GRAMMAR such as he" 2014-05-01 08:41:28 +00:00
jenkins-bot 862c2f162d Merge "Fix "use this file" arrow CSS for RTL" 2014-05-01 00:08:30 +00:00
Gergő Tisza 7ecda828fe Fix Commons tooltip for messages using GRAMMAR such as he
Change-Id: I1ec744cda78a5882a089ba0c32eae924559ed4e6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/553
2014-05-01 00:04:09 +00:00
Mark Holmquist 969c5bfda9 Add preferences link after "help"
Reused message from the top-right menu.

Change-Id: Id37712e332bf8fed56edaa9ae8f7e04a2a5a5f42
2014-04-30 22:49:09 +00:00
Gergő Tisza 7a4a8e90ad Disable JSONP cache breaking in jQuery
Change-Id: Ie3b80b0c2f8ce734c6d08418c7b19a7e24c2d5eb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/547
2014-04-30 22:39:17 +00:00
jenkins-bot 182f1cd6bb Merge "Fix RTL positioning for repo icon" 2014-04-30 20:56:51 +00:00
Gilles Dubuc ad6cc656ce Fix RTL positioning for repo icon
Change-Id: Iad6f0002913fb6361f22a467b08e6489a40adeea
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/512
2014-04-30 20:55:12 +00:00
Translation updater bot de476d17ac Localisation updates from https://translatewiki.net.
Change-Id: If8667c24a6b2b32837271a1b49b549c2e93ccd8e
2014-04-30 20:42:34 +00:00
Gilles Dubuc f09abebbf4 Change the tipsy gravity for the stripe buttons
- this avoids an issue where the arrow wouldn't point to what we
want when near the edge of the screen
- this avoids an RTL issue where the bubble would go outside of
the screen

Bug: 64258
Change-Id: I1cc9683af2743b093a45b19d7142fe7e5e66423f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/485
2014-04-30 17:01:17 +02:00
Gilles Dubuc acaa7e5afd Fix "use this file" arrow CSS for RTL
Change-Id: I638cd449041693d34a20667a43b7c6ef1c2b443e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/550
2014-04-30 16:28:18 +02:00
Gergő Tisza 6d301dcd12 Do not handle clicks if MediaViewer could not be loaded.
mmv.bootstrap will not try again to handle clicks if it failed
for the first time.

Change-Id: Idd55d7dc6c1388070895f8630bdcd51763a94d86
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/527
Bug: 63801
2014-04-29 16:04:17 -07:00
jenkins-bot 5980cd7322 Merge "Use sinon.js to test the thumbnail fetching" 2014-04-29 21:27:10 +00:00
Gergő Tisza b6953ba06f Use sinon.js to test the thumbnail fetching
Change-Id: Ida6143e29e54d90f26e7888aced1d207b3bfa702
2014-04-29 21:24:12 +00:00
Gilles Dubuc 8ab6ef23c8 Adds new performance metrics
- duration between early click and replayed click
- duration between replayed/post-replay click and first image display
- duration between replayed/post-replay click and first metadata display

Change-Id: Ia308db7580fd89538b9a9c8b0fea89fa2a4c77d2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/515
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/508
2014-04-29 14:08:49 -07:00
jenkins-bot 8f250b4628 Merge "Enable survey in Dutch" 2014-04-29 20:38:31 +00:00