Gilles Dubuc
d53ca1462e
GlobalUsage should utilize the right Api class
...
Change-Id: Ia0d0ee1d9213f98d89455f88b50616a5fbd87dcf
2014-02-19 19:18:42 +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
Gilles Dubuc
c9fc2c707f
Make the image and navigation buttons unselectable
...
Change-Id: Iec6d8a9511e2a4c508da7524c9fb0db499d1eb8a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/214
2014-02-18 19:36:33 +00:00
Gergő Tisza
7124ece961
Switch to core's version of moment.js
...
Depends on core change I6aa36d34bfbe8334c87d6ca449ec19b6a8daf8e7
Change-Id: I850d318a523e51c064e57fb888c7a10c79df6f72
2014-02-18 08:37:44 +00:00
Gilles Dubuc
35690bb2f1
Get rid of lightboxHooks
...
Delete lightboxHooks, since most of them
haven't proven to be useful.
Replace the useful ones by jQuery events.
Change-Id: I28f99ba85666ca15979feb5c637924b98bba27a8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/176
2014-02-13 17:47:30 -08:00
Gergő Tisza
302944352f
Move jquery.throttle-debounce to core
...
Depends on core change I008f46cc97af10e93ad9cad35924aaf251b99aa6 (merged)
Change-Id: I0c5faa4b20274a61d95aa2067f1071d2ab462454
2014-02-13 22:54:00 +00:00
Gergő Tisza
dc539cab54
Fix keydown event handling leak
...
Bug: 61337
Change-Id: Iee28a3e19a5a526876fb93900a12844c35b74ecc
2014-02-13 20:50:05 +00:00
Gilles Dubuc
6e127b25e2
Preload prev/next images
...
When the lightbox is opened, or prev/next pressed, preloads the
previous/next N images.
Technical debt introduced:
* initialization is a mess, with the viewer and the interface
randomly setting properties on each other in different phases of
execution. That got in the way and I shuffled things around
until they worked, which is obviously not the way to have a
robust system, but hopefully it will get scrapped soon anyway
in favor of a clean top-down dependency injection.
Change-Id: Idcb5c40de1ac0b3e482decd66e56c4de8ec71b6b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/155
2014-02-13 10:52:40 +01:00
jenkins-bot
400ddd7b53
Merge "Add TaskQueue class"
2014-02-13 09:35:37 +00:00
jenkins-bot
52a0e16147
Merge "Fix fullscreen bug where image was replaced with self"
2014-02-13 09:14:18 +00:00
Mark Holmquist
c99d830d25
Search for jsduck warnings, fail if found
...
Change-Id: I21e903375e5c6fbf4cb7c7f5ca52421695618011
2014-02-12 14:19:23 -08:00
Gergő Tisza
9881f9e7ae
Add TaskQueue class
...
A simple task queue which can be processed or cancelled.
Will be used to handle preloading in a more robust way.
Change-Id: Ib33f9b2d814a35538f9d4f3691fce5ba5cdc82c1
2014-02-12 01:55:39 +00:00
Gergő Tisza
d7706d7cb0
Fix fullscreen bug where image was replaced with self
...
Change-Id: I81dcadae96a778559564a786a5753323fb802b7c
2014-02-12 01:55:37 +00:00
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
Pau Giner
cc9e2daf2f
Icons for share link and assessments
...
Added SVG assets for link (normal and hover states) and the
"assessments" trophy icon.
Change-Id: I5b5673fb8767628922c6b1ccbe658a0b3df56e0f
2014-02-10 21:48:14 +00:00
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
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
jenkins-bot
698f677cd3
Merge "Refactor thumbnail size calculation"
2014-02-10 08:11:33 +00: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
Gergő Tisza
65129f9ed5
Fix perf log type for userinfo
...
Change-Id: I296a3c53005de7c27b6083662fa498f06254e946
2014-02-07 21:26: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
jenkins-bot
6b22712362
Merge "Some more metadata fetch reorganizing to get rid of the dependency on UI state"
2014-02-07 09:15:21 +00:00
jenkins-bot
3f9becc01b
Merge "Add Thumbnail model"
2014-02-07 09:12:15 +00:00
Gilles Dubuc
e3a1bf93ba
Show main metadata in fullscreen
...
Yay mostly-CSS work
Change-Id: Ica8dc95a8c56b56c0ee00a16b1cfbf923de04424
2014-02-07 02:43:43 +00: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
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
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
jenkins-bot
ec32d1e81a
Merge "Hide the controls after some time when in fullscreen mode"
2014-02-05 20:13:25 +00:00
jenkins-bot
929e287637
Merge "Revert "Exit Lightbox when clicked on backdrop""
2014-02-05 18:14:24 +00:00
MarkTraceur
3b71fecee5
Revert "Exit Lightbox when clicked on backdrop"
...
This reverts commit 4280dd8b83
.
After product discussion, we decided this was a bad idea. Sorry, Tony.
Change-Id: Ib59d75132c2a301f83d080b0f963e2a9d8b9b277
2014-02-05 18:12:43 +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
923a117304
Merge "Use LESS instead of CSS"
2014-02-05 02:20:40 +00:00
Gergő Tisza
1ff0ac60cd
Fix merge problem with categories
...
Change-Id: I628bffeb4cac16cf50def6d5562fb9e2b9fa8933
2014-02-05 01:46:55 +00:00
jenkins-bot
af1c2cbeee
Merge "Add provider to for actual image loading"
2014-02-05 00:15:56 +00:00
jenkins-bot
cba179e79a
Merge "Replace old API code with providers + fix a few provider bugs"
2014-02-05 00:15:55 +00:00
jenkins-bot
97e29b9e00
Merge "Add imageinfo, thumbnail info, repoinfo provider"
2014-02-05 00:14:22 +00:00
Gergő Tisza
6068ffd58d
Add provider to for actual image loading
...
Change-Id: I9ca9bce37c97648afa07db9f004138a791c74e65
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/123
2014-02-05 00:02:28 +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
Gergő Tisza
85a37d0e14
Add imageinfo, thumbnail info, repoinfo provider
...
Change-Id: I80ffec39ee6c9e0ea0b37be2fc48315063b5ff8a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/123
2014-02-04 23:46:02 +00:00