Commit graph

26 commits

Author SHA1 Message Date
Gilles Dubuc b9a822249d Fix defullscreen icon duplicate CSS
This one slipped through the cracks again

Change-Id: If4b1e8ee3adcef6b388f3d431d6629fe7b452b81
2014-02-10 10:12:34 +01:00
Gilles Dubuc 6e896c05cc Fix fullscreen and close icons
Some styles got mangled when 111372 landed

Change-Id: I44fa82ba0b65152b01872ba58f8a7e84c6106ca5
2014-02-10 10:04:50 +01:00
Gilles Dubuc e74fc33e89 Track detailed content loading network performance
Leverages the W3C Navigation Timing API when available

Change-Id: Ief1d327d1bd8928bf5f2bf0bd4c7141a0a608a53
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/126
2014-02-07 19:37:22 +00:00
jenkins-bot d1e966e903 Merge "Hide the fullscren button when fullscreen is unavailable" 2014-02-06 22:19:17 +00:00
Gilles Dubuc 4e85f31b27 Hide the fullscren button when fullscreen is unavailable
Change-Id: I72cff940cee1ad83f6bacfffdcfb9fdd0f16abcc
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/152
2014-02-06 14:02:52 -08:00
Gergő Tisza 289ad22b19 Fix JSDuck
* update paths
* make generate script return failure state on failure
* fix some issues so that it does not actually fail

Change-Id: Idd42e0d8e333c461091079aa1150b1b435e6360c
2014-02-06 19:10:07 +00:00
Gilles Dubuc 3dd716a3f2 Hide the controls after some time when in fullscreen mode
Also removes side-effects from several tests

Change-Id: Ifdc978f56f8c4caafadc8b192756645a9378f58a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/150
2014-02-05 10:27:10 +01:00
Gilles Dubuc 98e03d31c8 Test metadata visibility in fullscreen mode
Add metadata visibility logic to the test
Convert the code to CSS since writing the test made me
realise that the current JS was superfluous

Change-Id: I80c2f1860cc021e9bdf09345647b288de746f1e3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
2014-01-30 08:39:55 +01:00
Mark Holmquist a86a6d5b9e Fix resize engine for fullscreen
This sorta has a few other miscellaneous fixes in it, but it works!

There are maybe still funky behaviours left. Test it?

Also refactor some bits, so we aren't accessing mw.mediaViewer in the
interface code.

Change-Id: I69db8e7b4ff5f994ba706fd4965688f3c26859f4
2014-01-29 11:50:22 +01:00
jenkins-bot fe846f3063 Merge "Fixes bug where next/prev would exit fullscreen mode" 2014-01-28 22:39:29 +00:00
jenkins-bot d246d7709a Merge "Simple test for enter/exiting fullscreen mode" 2014-01-28 10:21:14 +00:00
jenkins-bot 567039c14e Merge "Fix bug that would cause the image to stay small" 2014-01-27 18:44:58 +00:00
Gilles Dubuc 2d3287e6bf Fixes bug where next/prev would exit fullscreen mode
Next/prev caused an attach() call which in turn
replaced the lightbox elements with themselves
causing the browser to exit fullscreen mode
because the full screened element was shortly
removed from the DOM (to be replaced by the same content),

Unfortunately this cannot be covered by a test case
because the screen would have to truly go into fullscreen
mode for the bug to happen. Having QUnit go fullscreen
seems unreasonable both for local testing (annoying)
and automated testing (could fail  to really fo fullscreen
because user confirmation is requested by the browser).

Change-Id: I57a2668179d6749188d7b5a3efcd06216b7747a9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/139
2014-01-27 18:12:09 +01:00
Gilles Dubuc 6803daf3a6 Simple test for enter/exiting fullscreen mode
While writing the test I spotted a bug and fixed it

Change-Id: I781c67752781960e4be88520f53163756fc11dab
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/140
2014-01-27 17:54:03 +01:00
theopolisme b770e02d48 Enable fullscreening with jquery.fullscreen
Depends on I58138afa05c43f5a24e74fa3a30a658428c39ce0
(core patch)

Change-Id: Ib972d453bdf8172439bf6195985fcf7e248b2b8a
2014-01-27 14:14:36 +01:00
Mark Holmquist 5e98e3bcd6 Fix bug that would cause the image to stay small
When opening the lightbox, the image might stay small
because of a race condition. This is fixed using a
deferred object.

Change-Id: I4e93c7d26da47e5177abeb1dac841bf6c25a9022
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/138
2014-01-27 10:21:38 +01:00
apsdehal 08957fa129 Added test if Lightbox is attached
Currently LIP.resizeCallBack was called even when lightbox was not appended, so I added a test to check the same.

Change-Id: Ie3a40a5d98f12a95b1d54e130896f67b71e927fa
2014-01-16 21:12:02 +05:30
jenkins-bot 1061cda70e Merge "Move the arrows and the close/fullscreen button" 2014-01-10 12:19:16 +00:00
Mark Holmquist 5949748ed6 Load images normally
Removes the spinner, loads images line-by-line. Supposedly more
expected for most users.

Change-Id: Ia5fba4c8d8af681c0a95e43d34014b07e33941c4
2014-01-08 23:42:06 +00:00
Gilles Dubuc f3fd143c8a Move the arrows and the close/fullscreen button
Looks drastic at first, but grows on you.
I based this on an extreme, the firefox inner scrollbar.
Which is huge when hovered.
I kind of wish the close button was a bit bigger, though.

Change-Id: I2f47280c4e7c4bff299149de24741e3381f0b5e9
2014-01-08 11:33:56 +01:00
Aaron Arcos ffc8f4948d Add smoke test to class mw.LightboxInterface.
- Moved tests that were meant for LightboxInterface objects.
  - Fixed space naming issues.

Change-Id: Ib83904eab5fa542330ea559d420efa5f1de8c3eb
2013-12-13 10:39:13 -08:00
Aaron Arcos c38fa2fbfe Fix resize listener leak problem.
Third try, merged latest changes and added a test.
Run loading test against a wikipedia.org image.

Change-Id: I4e5a137e0f6dbedc45ec2c8393590919e23a26be
2013-12-09 20:45:47 +00:00
Mark Holmquist 198bf44c1a jshint config and fixes, FINALLY
Every patch we've submitted up until now has been magically very good
at jshint, because I'm appropriately OCD about it, but now we can actually
point at results.

Also we'll enable voting very soon.

Change-Id: I028fa78a47778c8a4050f6b77623c6bfdc4f9c5b
2013-12-02 12:50:34 -08:00
Mark Holmquist a4c0617b1f Push history state to support links to media viewer
Also listen for popState events so users can use their browser's back
functionality to close the lightbox or go backwards, etc.

Bug: 56469
Change-Id: Id44fea9008adb391817250c2897693f45bead717
2013-11-26 13:09:54 -08:00
Mark Holmquist 5aaf1e73fe Reorganize UI to be...way sexier.
There's just no other adjective for this, it is _super_ nice.

There may be refinements later as the designers get things together.

Bug: 56499
Change-Id: I200684a19c190444587f520595186e9ae5afbea6
2013-11-21 09:47:05 -08:00
Mark Holmquist c0c9e7037f ResourceLoader consistency file moves
Keep modules in separate dirs, move images to their module dirs, and fix
up the module declarations so they still work.

Also moved viewer.svg into the root.

Bug: 56421
Change-Id: Ia84ddfd3b91c784c42d9ba243c5cfd46354f139f
2013-11-14 13:38:40 -08:00