Commit graph

27 commits

Author SHA1 Message Date
Gergő Tisza f4ab39df1e Fix runaway prev/next issue
Prev/next handlers were multiplying after every click.

Change-Id: I1e21b2711cc08a6edbbd26ec844e966f7582b3c8
2014-02-11 01:12:31 +00:00
Mark Holmquist a62410616d Refactor button things into a separate class
https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/124

Change-Id: Ib4b54164bccbe17e42b223880179531e8d9e6123
2014-02-10 09:40:50 +01:00
Gergő Tisza 06cc6cca1a Refactor thumbnail size calculation
* moves generic logic into ThumbnailSizeCalculator class
* moves UI-specific logic into interface class
* fixes bug where non-bucketed sizes were served on devices with
  non-standard pixel density
* fixes bug where bucketed size was compared to css size instead of screen size
  for resizing

Change-Id: I8ba3380b74fcc8fb0a6ecc3f3140627411851ad0
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/196
2014-02-08 01:27:27 +00: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
Gilles Dubuc 57434b5812 Refactor panel-related things into another class
mmv.lightboxinterface was getting way too clunky.

https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/124

Change-Id: Ie3a604b532ee853f9df673cc4d38c2c7594bdefa
2014-02-07 10:09:08 -08:00
Gergő Tisza e382095c4a Some more metadata fetch reorganizing to get rid of the dependency on UI state
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/155
Change-Id: I56cfa404d148d760088baa26900db04294ab4e91
2014-02-07 01:46:26 +00:00
Gergő Tisza e33f2d263c Add Thumbnail model
Also refactor size calculation a bit - I found target/requested
harder to remember.

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/155
Change-Id: I4781cdd7004e9a8e36875c152e1d3a335a55b7d7
2014-02-07 01:46:26 +00:00
jenkins-bot ed912adff1 Merge "Userinfo provider" 2014-02-06 13:56:15 +00:00
Gergő Tisza 26d001ac6f Fix repoinfo loading bug
Change-Id: I21741a60b88f1e34faf30ef591f3e44ff4703d94
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/190
2014-02-06 00:59:43 +00:00
Gergő Tisza b013ddbefe Userinfo provider
* userinfo api requests are cached now
* we use jsonp only if we have to (makes gender api calls measurable on WMF wikis)
* all API calls use providers now, provider.Api constructor can be used to
  wrap mw.Api with metrics

Does not return a proper model, and gender API calls are not preloaded together
with the rest of the calls. Maybe next time.

Change-Id: I9b3ea73c65eef57e160ac8636d9e45d349150884
2014-02-06 00:37:39 +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
jenkins-bot cba179e79a Merge "Replace old API code with providers + fix a few provider bugs" 2014-02-05 00:15:55 +00:00
Gergő Tisza 40d1a2508a Replace old API code with providers + fix a few provider bugs
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/123
Change-Id: Id7952f0a0eafa34d7c8691c63c2daccff2eea64a
2014-02-04 23:52:02 +00:00
Gilles Dubuc d34fec4ff2 Add categories to the interface
Also move some things around a liiiittle bit. Not too much.

Change-Id: I7a5b8d900f5173fa20142d205e4992361b9e81a3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/41
2014-02-03 15:09:42 +01:00
jenkins-bot 9f0641c214 Merge "Make mmv handle urlencoded hashes" 2014-02-03 10:44:42 +00:00
Gilles Dubuc 67fa053687 Make mmv handle urlencoded hashes
Change-Id: Id05806be4586a3d6f04b92ace2c8195b8de016bc
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/153
2014-02-03 09:32:38 +01:00
Gergő Tisza e0edec21b2 Move providers into their own subdirectory
Also refactor MultimediaViewer.php a bit to get rid of all the globals.

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/123
Change-Id: Ieca4263ecc7652dc6bc36db63b99d3813c4653e4
2014-02-01 03:49:30 +00:00
Gilles Dubuc 30563de71d Add file usage data to MMV metadata panel
Interface code is its own class which does not depend on the main
interface class it can be unit tested (and eventually moved into its
own file to make browsing the code easier). IMO we should aim to
eventually break up the interface into similar classes (with a simple
init/empty/set interface + custom events where it makes sense).

Also, sneak-introducing LESS!

API usage could be more effective (globalusage is a separate API call;
it needn't be), but we will have to rewrite that part soon anyway, so
it should pass for now.

Bug: 60087
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/44
Change-Id: Ibe5c323cdeab4a378316925f0c3efb3dc7ef5997
2014-01-30 13:03:28 +01:00
Aaron Arcos f7925a1a4f Refactor image load code, add unit tests.
The code to load and set the image was semi-duplicated and
scattered in various places. This was the source of defects
as this code is called asynchronously and was hard to debug.
This change attemps ot consolidate all the image load logic
in one place. It also adds sorely needed unit tests.

Change-Id: I92eb1c48e2ff0808134e56b4b150e22254eb2d6e
2014-01-30 08:51:15 +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
Gilles Dubuc 02897fda9c Chevron/metadata UI behavior improvements
When the multimedia panel is closed, the chevron
points upwards, otherwise it points downwards
Pressing the up and down arrows on the keyboard
opens and closes the metadata panel

Change-Id: I7dd31f3cc3d90f9342845faea2c6cfea3b40e232
2014-01-30 02:52:53 +00: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 d246d7709a Merge "Simple test for enter/exiting fullscreen mode" 2014-01-28 10:21:14 +00:00
Aaron Arcos 7c87033235 Request maximum image resolution in the API call.
After checking all the code paths (phew !), it seems
this simple change takes care of the resolution issue
that surfaces mainly in iOS devices (see b/60388).

Bug: 60388
Change-Id: I867dd18f782126fb71eb52ec637a2b90b910050d
2014-01-27 17:17:32 -08: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 5e4a544133 Moving things around for module renames
This is a big change, but should change nothing except the sizes of some
files and where they all are.

There are no more ext.multimediaViewer strings ANYWHERE, so let's keep
it that way. :)

Change-Id: Ic0892f5894700938bfa01f3f9bc8e5ab8276eb72
2014-01-24 09:21:16 -08:00
Renamed from resources/ext.multimediaViewer/ext.multimediaViewer.js (Browse further)