Commit graph

186 commits

Author SHA1 Message Date
jenkins-bot 79f1ee4a09 Merge "Go to the original image on image clicks" 2014-09-08 06:33:54 +00:00
Mark Holmquist f94d3362d9 Go to the original image on image clicks
Also removes original file button.

Change-Id: I6e73e46e910313fe6c5efb3087ecb693e499e064
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/831
2014-09-05 10:19:00 -07:00
Gergő Tisza e5de2a5415 Log whether attribution could be presented by MediaViewer
Change-Id: Ib4e8fbafa16c86ff902c838cc93b1710a7ca87af
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/858
2014-09-05 14:35:35 +00:00
Gergő Tisza c4c262bf44 Move logging-related code to its own directory
Also make sure class and file names have the same case.

Change-Id: I21042e40030051326f8c55fd62a86a54e9011a4a
2014-09-04 23:34:45 +00:00
jenkins-bot 32812a974f Merge "Add an option to disable by default for logged-in users" 2014-08-20 21:26:21 +00:00
Gergő Tisza 7081184535 Disable thumbnail URL guessing by default
Config change to keep it on on WMF sites:
Iba41a37a1d4b7957cd05516ae9466652dadcf28a

Bug: 64554
Change-Id: I25f52611f6f2a6db7f33d52a2fbae48c729f7686
2014-08-18 13:07:15 +00:00
Gergő Tisza e71bcefcdc Add an option to disable by default for logged-in users
Soft-depends on I90f6ab5b44fbcde0b89f56e795f69472c4940854

Bug: 69363
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/822
Change-Id: Ief0df5b4f4285d99208f007b0510a396f6c272e0
2014-08-16 12:16:34 +00:00
Gergő Tisza 53e965b469 Feature detect OOJS compatibility
OOJS uses es5-shim but does not use es5-sham so the following ES5
functions are not polyfilled:

Object.getPrototypeOf
Object.defineProperty
Object.getOwnPropertyDescriptor
Object.getOwnPropertyNames
Object.create
Object.defineProperties
Object.seal
Object.freeze
Object.preventExtensions
Object.isSealed
Object.isFrozen
Object.isExtensible

Grepping on them shows that Object.create is the only one in use in
OOJS, so checking for its existence should be enough to ensure that
OOJS works in the given browser.

Change-Id: Icf54a9c35b3599dd1831c10ffcd9f15573dc8b00
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/813
2014-07-28 23:54:47 +00:00
Gergő Tisza f14d08fd75 Reveal full text when user clicks on title or credit
Reveal the full title + author + source when the user clicks one
of these, and make some related changes:
* expand the above-the-fold part of the metadata panel so they fit
* make the stripe buttons smaller and hide their text
* scroll the panel up if necessary
* modify tooltip texts when there is more text to show

Change-Id: I304297bc5e7be7b16e2fc4bde66ac19641b00029
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
2014-07-17 09:42:12 -04:00
Gilles Dubuc b0d885e4dc Remove all survey-related code
Change-Id: I67285260c13a1e8d3c37365bb80a7156c0fecd4e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/794
2014-07-16 21:27:53 +00:00
Gergő Tisza 4adde1685a Show help tooltip for "view original file" button on image click
Change-Id: Ia9e20f55bcdd0482e78a6e9aa5a0625ec2717e78
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/712
2014-06-30 21:12:29 +00:00
jenkins-bot 02216b5ed3 Merge "Add section for attribution of downloads" 2014-06-30 18:36:07 +00:00
jenkins-bot 39e3cdaed0 Merge "Remove next/prev tooltips" 2014-06-30 18:29:21 +00:00
Mark Holmquist 532819b5a0 Remove next/prev tooltips
Change-Id: I978914bd57d7fdc260dbc0422915e6b766c35a66
2014-06-30 14:20:41 -04:00
Mark Holmquist a4e6bc22d9 Add section for attribution of downloads
Click on the button to expand, click the X to collapse again.

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/598
Change-Id: I6d2512cca0184437273329e6553c6524d6953404
2014-06-30 10:38:11 -04:00
jenkins-bot 5abf15890e Merge "Fix URL handling for global usage list" 2014-06-27 17:41:17 +00:00
Gergő Tisza deafff7046 Fix URL handling for global usage list
Also add integration tests to make sure URL generation works OK

Bug: 63908
Bug: 64910
Bug: 66147
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/570
Change-Id: I448f42e294102a633f74c305dd0a226e7dbe955d
2014-06-25 21:41:04 +00:00
Gilles Dubuc 4e752dd08d Track optin/optout events
Change-Id: I07eeef7a2304df4b70be252929737dad84522afb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/558
2014-06-19 11:23:03 +02:00
jenkins-bot 0c80fcd992 Merge "Make optout link more AJAXy" 2014-06-19 09:01:54 +00:00
Gergő Tisza c01cb55f4d Make optout link more AJAXy
Make it grey, unclickable and change text while waiting for the
AJAX request.

Change-Id: Ic5c2923944658d5be04217cdfe62e1d8608a478f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/723
2014-06-19 10:42:04 +02:00
Gergő Tisza e5cb2c7f85 Log clicks on the original file link
Change-Id: I3022128ce1772d67f389322379ab8700265d2d29
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/715
2014-06-19 01:21:51 +00:00
Gergő Tisza f566f6e585 Log clicks to the above-the-fold file page link
This uses best-effort logging (like most other links do), not the
blocking call that's used by the other file page link, since
analytics folks had severe misgivings about that.

Change-Id: I35204420c834fa4fce3dcf81403cb78b92811caf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/726
2014-06-18 01:01:59 +00:00
Mark Holmquist ea610f8256 Tooltips for loads of things
Change-Id: I993bf60909024453a14de85af6239bded02eb8a6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/546
2014-06-12 12:27:04 -07:00
Mark Holmquist 9928952c53 Fix our isAnon usage
Change-Id: I1b72b8af620b1ac223f23ce2325f00f2c24d26ac
2014-06-11 16:21:37 -07:00
jenkins-bot 6e5a1cb185 Merge "Add opt-out/opt-back link" 2014-06-11 22:47:29 +00:00
jenkins-bot b53f7b2e60 Merge "Add functionality to check & set opt-in flag from code, also for anons" 2014-06-11 21:48:13 +00:00
Gergő Tisza 5bd730894d Add opt-out/opt-back link
Change-Id: I998b7ad3ecb0b7e815f9ff0d5f871267b91c109d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/703
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/704
2014-06-11 02:24:17 +00:00
Gergő Tisza e8c7c537a2 Add functionality to check & set opt-in flag from code, also for anons
Adds anew mmv.Config class to centralize localStorage handling issues,
adds AJAX option setting, adds getting/setting opt-in flag from
localstorage.

Change-Id: I25762ccb8c9bccd694c30a6f1c5d3c8611a5ecbc
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/703
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/704
2014-06-11 01:11:12 +00:00
Mark Holmquist b2039ad7eb Add "zoom" but really just view-file
The zoom icon should get replaced Real Soon Now - looking at you, pginer

Change-Id: I88c1d4fb95e034e0f2fe618eb7309754ea1c283e
2014-06-10 15:07:12 -07:00
Gilles Dubuc 7161ac3cc4 Record sampling factor in EventLogging calls.
Change-Id: I3966bf5dfe9ed607bda8e87f3b1924de37716dcf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/619
2014-05-22 09:30:37 +02:00
jenkins-bot d19fcf60d2 Merge "Add sampling to unsampled event logging" 2014-05-16 20:45:30 +00:00
Gergő Tisza 171b13149e Add sampling to unsampled event logging
Has issues:
- needs dependency injection
- needs to be DRY
- should not load mw.eventLogging when we are not in sample

Due to urgency this will be fixed in another commit.

Change-Id: I0df067a619109a7c945f82c8d33fa2e621217f0b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/619
2014-05-16 18:43:55 +00:00
rillke 85833e06f3 Replace deprecated jQuery.browser with jQuery.client
jQuery.browser is deprecated. jQuery.client is a core RL module.

Bug: 65371
Change-Id: I040cfba574fa0514a25ec5166d82d86f6f697441
2014-05-16 20:37:27 +02: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
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
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 476a0be245 Merge "Skip userinfo request if no message depends on the gender." 2014-04-23 23:47:34 +00:00
Gergő Tisza ec883d84ef Skip userinfo request if no message depends on the gender.
Change-Id: I85bc617efc87ed1c4526eb74470bb6182910d9fc
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/435
2014-04-23 00:59:23 +00:00
Amir E. Aharoni 3e39739557 Add mediawiki.jqueryMsg as a dependency for mmv.ui.fileUsage
The Hebrew translation of a message there uses GRAMMAR,
so this module is needed.

Change-Id: I1ffe9a936a071709e7049bc0ffec77123cb42fd1
2014-04-22 22:35:16 +03:00
jenkins-bot 2b665e6ff0 Merge "Track more user actions" 2014-04-22 18:41:28 +00:00
Gilles Dubuc 700df1ecc2 Track more user actions
- metadata open/close
- next/prev
- view terms
- author
- source
- hash load
- history navigation

Change-Id: I4ea7e0b008b46577322050d692359d46374a0929
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/290
2014-04-22 10:20:36 +02:00
Gergő Tisza c9e92da374 Split the progress bar into a component of its own.
Change-Id: I131b0d1b8ec992a7c7ad388021febea5a0303d16
2014-04-21 22:27:59 +00:00
Gergő Tisza dd9a9718c3 Use thumbnail guessing
Change-Id: I2335af257fd23c9367b6839dfc6050840a905aa2
2014-04-17 10:35:33 +02:00
Gergő Tisza e03b9345c2 Guess thumbnail URLs without extra API call
Given a sample thumbnail URL and the original width/height
this provider tries to guess the thumbnail url for a given
size.

Change-Id: I2966b60978ab763864475851d8a79370bd422dc4
2014-04-17 01:21:35 +00:00
jenkins-bot 8217b97462 Merge "Load moment.js on demand" 2014-04-16 20:32:21 +00:00
Gergő Tisza 9b1e756c3b Replace current URL generation logic with routing classes
* deduplicates URL generating/parsing code
* gets rid of spaces in URLs
* fixes error for file names with / in them (in case they exist;
  current MediaWiki seems to disallow such names anyway)

Change-Id: I5aad43f6af1b99523c597c39befcc9db1ecab83a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/371
2014-04-16 12:51:38 +02:00
Gergő Tisza 0b614c78e3 Add routing classes
Adds a Route class hierarchy for various URL schemes and a Router
class to convert Route classes to and from URLs.

Right now we only have two(-ish) schemes, but in the future we want
to be able to show related images which are not present on the current
page and need shareable URLs for those as well; also we might want
to specify other things in the URL than the current image (the reuse
box being open was one thing discussed); this will be a good framework
to add features like that.

The MainFileRoute class will be used by #416.

Change-Id: I489126a0ada37f91a22a2f48a4e686140a28d162
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/371
2014-04-16 12:40:17 +02:00
Gilles Dubuc 7ff5b22873 Load moment.js on demand
Change-Id: I881d38ea201f314fcf364766bb589f56c9e6b057
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/444
2014-04-15 14:13:27 +02:00
jenkins-bot a3cb95e2d2 Merge "Restore article scroll after closing Media Viewer" 2014-04-14 19:23:15 +00:00
Gilles Dubuc 09374fc9dd Restore article scroll after closing Media Viewer
There used to be a CSS trick with the order we added things to the
page and removed them from it, but it doesn't seem possible anymore
with the new order of execution, with the overlay appearing
immediately and being taken care of inside bootstrap.

The main cause of the bug, however, was the hash reset happening
after the interface was closed.

Doing the scroll restore with jQuery.scrollTo is more future-proof
and testable in QUnit.

Additions were also made to the cucumber E2E test because QUnit
alone wouldn't have caught the hash issue.

This also cleans up custom events a little and reintroduces
pushState on browsers that support the history API.

Change-Id: I63187383b632a2e8793f05380c18db2713856865
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/439
Bug: 63892
2014-04-14 18:04:30 +00:00