Commit graph

305 commits

Author SHA1 Message Date
jenkins-bot 9c6d50e55a Merge "Text changes for better handling of PD and nonfree licenses" 2014-11-26 14:52:39 +00:00
Gergő Tisza 05d803e17a Text changes for better handling of PD and nonfree licenses
Bug: T70687
Change-Id: I84e0094559e5b438fcb33b8511dc0184435c1a37
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1004
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/631
2014-11-26 02:21:50 +00:00
Timo Tijhof cf48687731 Migrate jQuery andSelf() to addBack()
Deprecated in jQuery 1.8
http://api.jquery.com/andSelf/

Change-Id: I4988c24c4f14c2962f12065acccc7dd51899a2e4
Task: T67399
2014-11-25 02:57:29 +00:00
Gilles Dubuc 00d345f8b4 Rename Performance to PerformanceLogger
Change-Id: Iacfde35851cf8f617c4672d3ea466d4f0e2e448f
2014-11-21 11:07:40 +01:00
Gilles Dubuc 0e01796a3c Track how long users are viewing images for
This is complete, but it would be better if the HEAD request
was actually aborted by Varnish when the viewDuration parameter is
present, or if the hit pointed to a script that does that.

Change-Id: I66cafd97427756411e967de1901324af2215e3ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1001
2014-11-21 00:39:29 +01:00
Gilles Dubuc c98a243639 Track image "unviews"
Change-Id: I4441b6df511f99b73bfafea0d804171435e129d2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/998
2014-11-21 00:37:11 +01:00
jenkins-bot 7638a878f9 Merge "Add marker parameter to image requests coming from MediaViewer" 2014-11-20 21:24:19 +00:00
Gilles Dubuc ad5040a140 Add marker parameter to image requests coming from MediaViewer
This will be needed by Erik Zachte for compiling per-file image view data.
Since Media Viewer does preloading, it skews the HTTP request-based
statistics. By marking image requests coming from Media Viewer,
it allows us to remove that bias.

Change-Id: Iac8e7770c1a379691547de4b6d47b7d54467f54d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/1002
2014-11-20 15:57:27 +01:00
jenkins-bot 4dc8ec2669 Merge "Track the most recent upload time for duration events" 2014-11-20 00:04:14 +00:00
Gilles Dubuc 6eb64f39ba Track the most recent upload time for duration events
This will allow us to see if images uploaded recently, which have been
subjected to thumbnail prerendering, load faster.

Change-Id: I4ce358ff54e4ca4e290349aa3ff4810ad4714d24
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/975
2014-11-11 18:14:24 +01:00
Gergő Tisza af508f066a Make the ellipsis of truncated texts more prominent
Also fixes popup texts which should have been updated in the parent commit
and the panel opening mechanism which did not work when the below-the-fold
description box was display:none-d.

Change-Id: I5fc37429a7dc7a8f1517fa42375cd140d7d11674
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
2014-11-11 15:37:14 +00:00
Gergő Tisza 3a18515163 Replace filename with caption/description
* when the caption is available, use it as the image title
* otherwise, fall back to description if available
* otherwise, fall back to filename
* if both caption and description are available, show caption as
  title and show description below the fold; otherwise don't show anything
  below the fold.

Change-Id: I9738ca46620d7cf3b30f6e46790a37966d4b9eaf
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
2014-11-11 15:33:15 +00:00
jenkins-bot 6e79ad51f1 Merge "Display a placeholder text when author and source are missing" 2014-10-31 09:41:30 +00:00
Gergő Tisza b0bac10627 Display a placeholder text when author and source are missing
Change-Id: I38478956c5a0b5f204e5caa43e54db651f297887
2014-10-29 15:38:56 +00:00
Gergő Tisza 392e714cc6 Add icon for PD licenses
Change-Id: I82c56a420d8d529a4a50cb66e64b191bbb36997f
2014-10-29 14:03:36 +01:00
Gergő Tisza 8423974c6a Change above-the-fold layout - step 3
* make top of "below-the-fold" be actually above the fold
* put all above-the-fold content except title and more details button
  into that area
* kep below-the-fold area in fullscreen mode when title/credit gets untruncated
* increase title length to 180 (140 before reducing font size) - works nicely on
  my 1600x900 laptop
* remove old styles which were intended to make the button smaller when the
  panel is close but were mostly broken anyway and only caused the button to
  twitch

To avoid redoing all the size calculation logic, we cheat and use a negative
margin to pull the below-the-fold content above the fold.

Change-Id: I18d7bdb7dbbdfb8201c0d66257731febfac31263
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
2014-10-29 12:05:34 +01:00
Gergő Tisza f792a42f93 Change above-the-fold layout - step 2
* move license and terms link from title area to attribution area
* remove some ineffective styling for elements which have already been removed
  in earlier changes

Change-Id: I5bd41e337a4c8133bfa27e4c4d03162b2d6e35bb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
2014-10-28 21:18:53 +00:00
jenkins-bot fb7a04f5a2 Merge "Change above-the-fold layout - step 1" 2014-10-28 21:18:48 +00:00
Gergő Tisza a6adad35ed Change above-the-fold layout - step 1
* remove chevron
* adjust colors

Change-Id: I443fd757f5df18d099e42a81f1f323fadea77987
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/833
2014-10-28 20:02:22 +00:00
Gergő Tisza a44be28c4e Fetch image title from CommonsMetadata
Change-Id: Id7d256150aedb4351778f6ad60fd7d85399b58c5
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/589
2014-10-28 10:46:31 +00:00
Mark Holmquist ff7a8b23c2 Add about link to disable/enable dialog
This was the last issue with the dialogs. Tests included.

Change-Id: Ic08af400893950a04489af4b166827d059561974
2014-10-24 13:51:32 -05:00
Gilles Dubuc 0d743977dd Fix issue with options dialog when media viewer has been reopened
- Fixes the bug where the options menu wouldn't open if media
viewer was reopened
- Adds human-readable console messages for the options actions
- Makes the tooltip a tipsy one like all the other buttons
- Fixes the tooltip copy, it was referring to "previews", which we
said we wouldn't do anymore, in favour of "Media Viewer"

Change-Id: I1590f9501cc6c406cc1f466b414062d4d6435c1b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/963
2014-10-23 15:29:44 +02:00
Gergő Tisza 2c578e6dc3 Show popup when the user visits a file page the first time after disabling MMV
Change-Id: Id2b121c930115373a8a81dc1091c4124807db053
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/719
2014-10-21 14:28:20 +00:00
Mark Holmquist feb8e43571 Add tests for viewing options panel
Change-Id: Ic7a856ac4d94f4a65224f4c6373938da7b05f0fd
2014-10-19 00:35:36 +02:00
Mark Holmquist 1853540cd3 Add viewing options panel
Enable, disable, and get confirmations.

Lots of UI work on this one.

Change-Id: I1f731992bd240e7ea403592872f7c7e270158753
2014-10-19 00:27:15 +02:00
jenkins-bot 2203f89236 Merge "Log image dimensions" 2014-09-30 15:15:54 +00:00
Gergő Tisza ff76011032 Log image dimensions
Also add a sanity test to attribution logging which I forgot at the time.

Change-Id: I3010e57eb74a76fee4078c415182a033375ea890
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/898
2014-09-30 14:55:47 +00:00
jenkins-bot 22966d4358 Merge "Only add country field when it's in the schema" 2014-09-29 14:05:25 +00:00
Mark Holmquist 9187148b01 Remove duplicate details link in metadata panel
Change-Id: I2eaa221fa505e9f106fa8611adfe99677a24009b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/909
2014-09-28 21:45:55 +00:00
Gergő Tisza 2e4379c66e Only add country field when it's in the schema
Change-Id: Id38ce4d20312bd15014cf37d521aac0a97bd660b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/907
2014-09-26 22:05:22 +00:00
Mark Holmquist 0d4863dd91 Make the download pane into its own dialog
Change-Id: Ia92545ed1ef7f2e4ba7934c682eef684a22ca17f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/841
2014-09-24 17:05:50 +02:00
Mark Holmquist 59d8c5d892 Make the reuse button part of the canvas
Moves it out of stripeButtons and into canvasButtons.

Will move download to its own thing later.

Change-Id: Iaf18914b29a6283c3bade954f1adb3f206c9c911
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/834
2014-09-18 12:43:45 -07:00
Gergő Tisza 4b6e44a2fc Make sure event handlers are set up even if onready handler is lost
Due to a jQuery bug, errors in local code (gadgets, user scripts)
can cause onready handlers to not be executed. For MMV this causes
catastrophic failure, with a black screen of death on exit.

This change makes sure that the setup code necessary for Media
Viewer to work is executed at latest when MV is invoked, even if some
onready handlers were skipped.

Opening MediaViewer via a hash-URL will still not work if the onready
handler fails, but that's hard to avoid and it is not a catastrophic
failure anymore. This change can be reverted when bug 70772 gets fixed.

Bug: 70756
Change-Id: Ida3b780791bc9dfec29303567d33e3aa4f44dd81
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/891
2014-09-12 23:49:43 +00:00
Mark Holmquist a82dfd6eb0 Remove tooltip for view-file
Change-Id: I89b2dfd43ea18a2e1fe9d2214b76218b24ce88cb
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/886
2014-09-11 10:41:45 -07:00
Gilles Dubuc 2ef45b3058 Remove categories
Change-Id: I309b01592e874579d50bf5fc0810c238d47748f5
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835
2014-09-09 13:23:50 +00:00
jenkins-bot 23c7258b31 Merge "Remove file usage" 2014-09-09 13:10:37 +00:00
Gilles Dubuc b70fa7251d Replace addEventListener call with jQuery's .on()
Bug: 70553
Change-Id: I24680e7b7759d30eca2a733d670e10c0b4bfe7ab
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/863
2014-09-09 11:18:03 +02:00
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
Gilles Dubuc caa624d711 Remove file usage
Change-Id: I538f7734e1c06a179ee98a5cd843ccee4d91349f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/835
2014-09-05 08:14:52 +02: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
Mark Holmquist 35b6f70ef2 Use link title as fallback for caption
This works because the title doesn't exist if there's no caption and we
won't get to this logic branch if the thumbnail is an explicit |thumb|
with a caption already.

Refactored caption-fetching a bit.

Change-Id: If84c890e7b71880db640a0993f8e3d6cd59951b8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/513
2014-09-03 12:13:21 +00:00
jenkins-bot fb6e8ad1e2 Merge "Fix preference DB values" 2014-08-27 08:11:08 +00:00
Gergő Tisza d3869e581e Fix preference DB values
Ensure that changing the preference via the quick link and
Special:Preferences is stored identically in the DB.

Change-Id: Ia37da1c6bfbb3edf0eba56f01105e4a5f3a5e4ba
2014-08-26 10:37:38 +00:00
Mark Holmquist 62bdbd57a6 Fix link to media viewer with proper namespace
Use the canonical English namespace instead of a localized one.

Change-Id: I9fa1a2af1210c5a4a47792c3dc4616cb628cd806
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/826
Bug: 69956
2014-08-26 01:00:37 +00:00
Gergő Tisza 4142696903 Fix moment tests
moment.js has a slight change in date output which broke some tests.

Change-Id: If5ffdaba8574e574d644f3d8bd987ee29aeb0bc9
2014-08-16 12:11:46 +00:00
Gergő Tisza 81865ecf7c Fix failing loader tests
mw.notify calls mw.loader.using now, which we mock out in some
tests. This change adds an exception to the mock.

Change-Id: I68d7293a4d45f904e949ea4b56ec409456624cbd
2014-08-15 13:46:43 +00:00
jenkins-bot b77010fadd Merge "Use image title in history" 2014-07-22 14:12:23 +00:00
Gergő Tisza e055b8bb7d Use image title in history
Changes document title (which is shown in history navigation)
to include the image name.

Bug: 67008
Change-Id: Id1b030f2b984571fb0877e35db2ca2ccc86f0130
2014-07-22 06:08:59 +00:00
Gergő Tisza 0423bfbe5a Reveal full text when metadata panel is opened
Automatically reveal/hide full text as metadata panel is opened/closed.
Also makes metadata open/close a proper event.
Changes scrollTop calculation for the fully open metadatapanel so it is not
confused by the size of the panel changing.

Also rename MetadataPanel.$controlBar to $aboveFold (that field was missed
when the corresponding CSS class got renamed).

Change-Id: I7e66ca0f45c2188dab4b78508ad7f91154187de4
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/396
2014-07-18 00:47:46 +00:00