Commit graph

286 commits

Author SHA1 Message Date
Gilles Dubuc c7fe85154b Highlight chevron when the wrong direction is pressed
Change-Id: I0d43c58a16fa805611f9fdef329b5ab6a32ed651
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/554
2014-05-19 11:01:31 +02:00
jenkins-bot 44311cddd4 Merge "Revert "Minimal zoom implementation"." 2014-05-16 08:29:49 +00:00
Pau Giner 96791886c8 More prominent metadata panel invite.
The invite animation has been made more prominent and the chevron
is highlighted. this only applies until the user opens the
panel for the first time.

Change-Id: I91d1b9bffaf302890f63b741313aa47cc4beef24
2014-05-15 20:41:13 +00:00
Gergő Tisza ab7b339143 Revert "Minimal zoom implementation".
Per the design meeting, we are abandoning this feature for now - there is not enough time to ensure it is of acceptable quality.

This reverts commit 4329d453ec.

Change-Id: I27c113ffecb617d442557163722ea5181ed0b2f4
2014-05-15 20:40:41 +00:00
Gergő Tisza 4329d453ec Minimal zoom implementation
Just a link to the full-size file for now.

Since the link must be to a PNG/JPEG/GIF (so possibly a thumbnail),
and we want to cap the size, we might need to get the URL from the
API, but we need to open the new window right away to avoid popup
blockers, making this patch quite complicated.

Change-Id: I9ce9d2a2d27b75470eae2806d9f9ce2f95f4dac2
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/588
2014-05-15 01:04:23 +00:00
jenkins-bot 3353a3e1a2 Merge "Fix IE9 support" 2014-05-14 19:21:14 +00:00
Gilles Dubuc 7d5a82c571 Fix IE9 support
- Fix JS error on pushState
- Fix blur issue where blur(0px) filter would blur anyway
- Fix wrapper sizing issue where its size would be 0 when measured

Bug: 65225
Change-Id: If9279cd56f55f71f261ec54dda8228194988b9ae
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/597
2014-05-14 12:06:27 +02:00
jenkins-bot 7245220e84 Merge "Extract metadata panel scroll/log/animate logic into separate component" 2014-05-14 07:34:02 +00: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
jenkins-bot 468a249497 Merge "Do not log a metadata event when the user presses the wrong key" 2014-05-13 08:19:55 +00:00
Gergő Tisza 8a118816a5 Do not log a metadata event when the user presses the wrong key
Do not log metadata-open when panel is already fully open and the
user presses the open key. (Same with close).

Also a completely unrelated code simplification.

Change-Id: I1f26b8669aa496d68b61d9a432430bf0864e8533
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/559
2014-05-12 21:29:12 +00:00
Gilles Dubuc 0f8c7dc214 Improve post-fullscreen panel/image sizing logic
Also deletes custom event that should have been cleaned up before

Change-Id: I531a9cb068b0ae26ea0c3b46d8fdad84068c6931
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/569
2014-05-07 06:49:15 +02:00
jenkins-bot 9e0df0dd4c Merge "Refactor progressbar & blur handling" 2014-05-01 23:12:22 +00:00
Gergő Tisza fec24e02f7 Refactor progressbar & blur handling
This tries to fix a number of related issues:
* the blurred thumbnail was visible for a split-second sometimes
  when switching back to an already-loaded image. (Presumably when
  JS was sluggish enough to take more than 10 ms to execute.) We
  now check whether the promise is pending before showing a placeholder.
  (More generally, a lot of unnecessary logic was executed when paging
  through already loaded images, like displaying the placeholder, so
  this might make the UI a bit more responsive.)
* the blur could get stuck sometimes - I have seen this a few times,
  but have never been able to reproduce it, so I'm only guessing, but
  maybe the timing was really unfortunate, and we switched back less
  than 10 ms before loading finished. We now remove the blur on every
  branch, just to be sure.
* adding a progress handler to a promise might not have any immediate
  effect, so when switching to an image which was loading, the progress
  bar reacted too late. We now store the progress state per thumbnail
  so it is always available immediately.
* the progress would animate from 0 to its actual state whenever we
  navigated to the image. The change on paging is now instant; the
  progress bar only animates when we are looking at it.
* switching quickly back and forthe between a loaded and a loading
  image resulted in the loading image becoming unblurred. This seems
  fixed now, I'm not sure why. Maybe the "skip on non-pending promise"
  logic affects it somehow.

Also removes some unused things / renames some things which were
confusing, and makes an unrelated fix in the image provider, which kept
amassing fail handlers.

Change-Id: I580becff246f197ec1bc65e82acd422620e35578
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/489
2014-05-01 21:09:28 +00:00
Gergő Tisza 88f766bfc3 Reanimate metadata panel when viewer is reopened
Change-Id: I776a27358b2da17a35234aa8cb649a49df4a651d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/548
2014-05-01 12:05:26 +02:00
Gilles Dubuc 5f7af0cede Catch exceptions raised by localStorage write operations
Also adds dependency injection to the metadata panel
for cleaner tests.

Change-Id: I3f062ff88c03ad3baca00461bff486a883776eb1
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/530
2014-05-01 12:00:31 +02:00
jenkins-bot 8138013421 Merge "Fix Commons tooltip for messages using GRAMMAR such as he" 2014-05-01 08:41:28 +00:00
jenkins-bot 862c2f162d Merge "Fix "use this file" arrow CSS for RTL" 2014-05-01 00:08:30 +00:00
Gergő Tisza 7ecda828fe Fix Commons tooltip for messages using GRAMMAR such as he
Change-Id: I1ec744cda78a5882a089ba0c32eae924559ed4e6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/553
2014-05-01 00:04:09 +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
jenkins-bot 182f1cd6bb Merge "Fix RTL positioning for repo icon" 2014-04-30 20:56:51 +00:00
Gilles Dubuc ad6cc656ce Fix RTL positioning for repo icon
Change-Id: Iad6f0002913fb6361f22a467b08e6489a40adeea
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/512
2014-04-30 20:55:12 +00:00
Gilles Dubuc f09abebbf4 Change the tipsy gravity for the stripe buttons
- this avoids an issue where the arrow wouldn't point to what we
want when near the edge of the screen
- this avoids an RTL issue where the bubble would go outside of
the screen

Bug: 64258
Change-Id: I1cc9683af2743b093a45b19d7142fe7e5e66423f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/485
2014-04-30 17:01:17 +02:00
Gilles Dubuc acaa7e5afd Fix "use this file" arrow CSS for RTL
Change-Id: I638cd449041693d34a20667a43b7c6ef1c2b443e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/550
2014-04-30 16:28:18 +02:00
jenkins-bot 8f250b4628 Merge "Enable survey in Dutch" 2014-04-29 20:38:31 +00:00
Gergő Tisza bbe3429f38 Enable survey in Dutch
Related core change: Ic5892e29c6e64d0d015e8b6037c402c42ea1c7d5

Change-Id: I5f939f98f8654c3fd90bcfae1b28fec262da8332
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/545
2014-04-29 19:17:25 +00:00
jenkins-bot f3ce1b0aa6 Merge "Fix for jsduck 5.x, rearrange categories" 2014-04-29 18:35:22 +00:00
Mark Holmquist d137689b34 Fix for jsduck 5.x, rearrange categories
Should make for a nicer documentation experience.

Change-Id: I935cbab2b06c8cf482d3987905d2257d09bea3a3
2014-04-29 11:32:12 -07:00
jenkins-bot fa8cf649bf Merge "Make progress bar less erratic" 2014-04-29 08:00:11 +00:00
jenkins-bot a63f8b4666 Merge "Enable survey in Spanish" 2014-04-29 07:34:58 +00:00
jenkins-bot b06020fa26 Merge "Adjust invite animation for Media Viewer" 2014-04-29 07:30:55 +00:00
Gergő Tisza 184067eb39 Enable survey in Spanish
Related core change: Ibd1a4b14faa11fd764fe078880355d7184b698bf

Change-Id: If44279fff1aad3fb68a01d167ef5cce69dbb3b34
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/525
2014-04-28 22:38:50 +00:00
Gergő Tisza a56759d8fe Handle window.localStorage === null case correctly.
Change-Id: I49ddf45093daee4988fb7f3b481fb35bfaceb152
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/521
Bug: 64525
2014-04-28 22:33:02 +00:00
Pau Giner 2ac50f49bf Adjust invite animation for Media Viewer
With latest refactorings, the animatin looked like a glitch.
The position of the panel has been adjusted to (a) make the initial
position the same as shown while the progress bar for better continuity,
and (b) make the move more noticeable by increasing the distance the
panel moves.

To test, clear the local storage variable mmv.hasOpenedMetadata

Change-Id: Ie3ed29826fa15bf4c6b38f0fc8bde4bd84563fb9
2014-04-28 10:28:18 -07:00
Pau Giner b7420ae82a Images for zoom
Images for the Zoom control of Media Viewer.
SVGs for RTL and RTL languages included.

Change-Id: I65cc6d9921a40d26307c294fb08ccfc42b1a9068
2014-04-24 17:43:15 -07:00
Gergő Tisza 7ee0cf3fcd Make progress bar less erratic
Solves the bug, and makes the code slightly cleaner, but it
still does not inspire confidence (e.g. use of viewer flags
by a bunch of callbacks that can run for a background image).
Also, the tests seem underspecified.

I'll follow up with some more refactoring.

Change-Id: I2557abcec173691ffce21185bf1a939f1644ba8c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/489
2014-04-24 23:55:26 +00:00
jenkins-bot 7ac4b375b6 Merge "Bigger, badder, animated progress bar" 2014-04-22 22:30:31 +00:00
Gilles Dubuc 69e75bcda8 Bigger, badder, animated progress bar
Nobody will be able to say it's not prominent enough anymore.

Change-Id: I060dcf2b8f244f7d59f4ed1ef6dfd85a08f3ef88
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/464
2014-04-22 15:16:56 -07:00
Gergő Tisza d1a6592185 Add more survey languages (fr, de, pt/pr-br)
For pt speakers pt-br is shown until we get a pt translation

Related core commit: If2c57846f4dfb05ea58f36b25e3d8185d2a6e70e

Change-Id: I595446dc59c1bca2ea0b977be9d26f17192d3bc4
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/481
2014-04-22 22:03:32 +00:00
jenkins-bot 2b665e6ff0 Merge "Track more user actions" 2014-04-22 18:41:28 +00:00
Gergő Tisza c304baf0ba Show metadata panel immediately.
Change-Id: Ie71eb1d29e3863b99687a75da69fad9a1ead552c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/458
2014-04-22 16:10:25 +00:00
jenkins-bot 5007968d4f Merge "Split the progress bar into a component of its own." 2014-04-22 09:19:41 +00:00
jenkins-bot a057ee476e Merge "Open license deed in new tab" 2014-04-22 08:48:12 +00:00
jenkins-bot 2471bbe136 Merge "Display correct file type on download button" 2014-04-22 08:31:27 +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 3bddd3fcb7 Open license deed in new tab
Not convinced this is a good thing (file description page still
opens in same window so it is somewhat inconsistent) but suddenly
leaving the lightbox to show the deed feels like a very unintuitive
behavior to me.

Change-Id: I2cca3e4241fd1bb2848c11cf425aa75aad8c4a30
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/472
2014-04-22 00:21:11 +00:00
Gergő Tisza f04f5984d5 Display correct file type on download button
Works, but awkward - the extension name changes a little later than the button
text itself. This is hard to avoid since we don't know beforehand
what the thumbnail type is - we have to wait for the API request.
(We can't do thumbnail URL guessing here since we cannot catch the 404 error.)

In general the whole API handling here is not so good, with a separate API
request going out when we should just get all size options in a single request,
when the user opens the reuse panel.

Change-Id: I502b7cb4e99d8af348d7d1967eb8343ec0f926fe
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/471
2014-04-21 23:51:15 +00: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 4e081a9559 Use short license name from template if we don't recognize it
We have been saying 'view terms' for every non-CC/PD image, which
is not particularly helpful.

Change-Id: Ia5fc6fb3af3802ad8a1f5188226fe4e89ab6d8d9
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/472
2014-04-19 00:46:50 +00:00
Gergő Tisza c1b2b1bb2c Show 'view terms' when we can't figure out the license
...since there probably still is one, and our failure to parse it
just makes it more important that we direct the user to the file
page.

Change-Id: Id31f95021f059ccf4bf9893b1146f3807dcabdcb
2014-04-19 00:42:47 +00:00
Gergő Tisza b00eca6ade Collect license handling code, remove unused data attribute
This just shuffles code around, should not change behavior.

Change-Id: Ieb0102300c8444f18444fae38e5ea813d8f682e5
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/472
2014-04-19 00:39:21 +00:00
jenkins-bot 119bdad504 Merge "Show scrollbars in survey window in Firefox" 2014-04-18 21:44:57 +00:00
Mark Holmquist bfcbf06f80 Show scrollbars in survey window in Firefox
Change-Id: I6bf4838df86ad73a2aa4eeca3c9b3a4269ea0eae
2014-04-18 14:27:19 -07:00
Mark Holmquist a6619cb1ce Link to creativecommons.org for CC licenses
Change-Id: Ifdbb0d835b0eb6950eca3403bb486bbdd34651c6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/221
2014-04-18 11:27:00 -07: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
jenkins-bot ffdc63aa4c Merge "Do not load too-big thumbnails for SVGs" 2014-04-16 10:23:40 +00:00
Gergő Tisza 35eb14f837 Choose feedback survey based on user language
Change-Id: Ia9d53b6a3caedecd05429e5285765b1c5098342e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/420
2014-04-16 00:52:40 +00:00
Mark Holmquist 0ed174a306 Do not load too-big thumbnails for SVGs
Change-Id: Iae75105151bfcd0e974fc292794802c77eb26ea4
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/448
2014-04-15 11:21:05 -07: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 e4e68115f5 Merge "Load oojs-ui on demand when "use this file" is clicked" 2014-04-14 17:29:58 +00:00
Mark Holmquist 244a5e70b0 Miscellaneous fixes to truncatable text fields
Should make the e2e tests pass again.

Change-Id: I2a610468837f53d10fd9e7f2fa6d0937407e6f26
2014-04-14 17:19:59 +02:00
Gilles Dubuc eb6386bb5b Load oojs-ui on demand when "use this file" is clicked
Change-Id: Ia3b6b91c7ff0cb223f5f312eb901726fb6adcf35
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/426
2014-04-14 11:50:05 +02:00
jenkins-bot 5a570186d1 Merge "Adjust OOjs UI TextInputWidget text style" 2014-04-14 09:41:43 +00:00
Gergő Tisza a6c279042c Adjust OOjs UI TextInputWidget text style
White text shadow looked bad on Chrome/Linux where selected text
color is white.

Change-Id: I6723bc8ee0f6e2f77bb299216d56a844ac17a9f1
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/443
2014-04-11 22:55:50 +00:00
Gergő Tisza b0fc56f039 Fix icon positioning for secondary repo link
The last change did not work so well for small (non-Commons) links,
adjusting.

Change-Id: I50bb25f4311715d93ebb12603b1b2546273efa31
2014-04-11 21:02:12 +00:00
Pau Giner e250a45eb3 Spacing adjustment for repository link
Spacing of the whole element and the Commons logo has been
adjusted to provide visual clarity.

Change-Id: I601a1d5c847199dc734911dc9e90c0fe7931bca8
2014-04-11 15:30:19 +00:00
Gergő Tisza 2bb6c48ee2 Show a fallback repo icon for the "go to file page" button
...if the real icon is not available.

Change-Id: I36b79beb1867deb86b0a1d986db672854c3b839e
2014-04-10 19:09:28 +00:00
jenkins-bot 6dae43b0cf Merge "Fix commons icon to avoid pixelation" 2014-04-10 18:12:34 +00:00
jenkins-bot 228539fc03 Merge "Fix overlap of info box and right sidebar" 2014-04-10 16:32:28 +00:00
jenkins-bot a433c43556 Merge "Split button line adjustment" 2014-04-10 12:58:30 +00:00
Pau Giner bb70c70431 Split button line adjustment
The download button used a dashed black line to separate options.
It has been changed to a dark green line to better fit the style.

Change-Id: I3224027b69c4c1e5cf2568aed8f4f50ee351c369
2014-04-10 14:35:13 +02:00
jenkins-bot 911e87adde Merge "Add truncatable text field, use for some fields" 2014-04-10 12:13:46 +00:00
Gilles Dubuc 779b91d405 Fix commons icon to avoid pixelation
The CSS to make the favico twice as big was looking horrible in
Firefox and possibly other browsers. Since we're already
special-casing commons, let's apply a proper SVG instead of the
favico.

Change-Id: Ie32302342eba7aa37bd310c013a9f4d7f9ae187e
2014-04-10 13:20:39 +02:00
Pau Giner 808b6cb848 Removed white background from SVG assets
Two images contained a white background that was limiting their
use over other background colours.

Change-Id: Ic61e0d223ed927968344b132dbe67952c80bbe28
2014-04-10 11:55:27 +02:00
Gilles Dubuc ebeaf5cc5d Fix overlap of info box and right sidebar
Seen in Firefox: https://www.dropbox.com/s/a4d2ltanx343kh0/Screenshot%202014-04-10%2009.57.51.png

Change-Id: I8ae755eb1008078a94face60efee53c11d9ce3b9
2014-04-10 09:59:31 +02:00
jenkins-bot f106af19d0 Merge "Workaround for OOJS ES3 incompatibility" 2014-04-10 06:51:55 +00:00
jenkins-bot 9375c63958 Merge "Clean up issues left c/121064" 2014-04-10 01:32:43 +00:00
jenkins-bot ea5b135d80 Merge "Fix tipsy bug, part 2" 2014-04-10 01:27:12 +00:00
Gergő Tisza d8bf56bf89 Fix tipsy bug, part 2
Change-Id: Ie3bf54c1f5e550b86bf29151ed14be36ad63bee0
2014-04-10 01:24:21 +00:00
Aaron Arcos be76d4b5db Clean up issues left c/121064
Change-Id: I5daa3c8f75c93dbbd6a8f748a6c869d73d3959f6
2014-04-09 18:23:42 -07:00
jenkins-bot 02735e3431 Merge "Fix tipsy bug" 2014-04-10 01:13:36 +00:00
Gergő Tisza 005d15568f Fix tipsy bug
maybeDisplayThumbnail is invoked even when the survey is disabled,
which results in calling functions of a null object.

Change-Id: If7a48349e22069f91af20d8c4bb6a82b7339bd66
2014-04-10 01:09:07 +00:00
Gilles Dubuc a7778cb799 Selects html embed by default for logged-out users
Change-Id: Ie472905f0188637157632050ad0571043f04b324
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/379
2014-04-10 00:06:54 +00:00
Mark Holmquist 40feb61dbe Add truncatable text field, use for some fields
Source + author are one such field, title is another.

Loads of the mingle card will be split out.

Change-Id: Ib2937cc55304118f82e5b2e87b822b2b2811ef2b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/243
2014-04-09 15:53:37 -07:00
Gergő Tisza ee113af8f5 Make Commons link more prominent
Change-Id: Id546de9671fdc00ba73b01a1bc6398f2da2a6a2b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/270
2014-04-09 21:45:39 +00:00
jenkins-bot 8065fad8a5 Merge "Clean up, get rid of leftover comment" 2014-04-09 20:01:04 +00:00
Aaron Arcos 0eb9270c20 Clean up, get rid of leftover comment
Follow up on https://gerrit.wikimedia.org/r/#/c/124772/

Change-Id: Ie3a8c327c2a30f34f39379be51d0be42a8692376
2014-04-09 12:03:02 -07:00
jenkins-bot 4c08160eb3 Merge "Fix issues with size menus after oojs-ui update" 2014-04-09 18:54:15 +00:00
Aaron Arcos 71fec37579 Fix issues with size menus after oojs-ui update
These should fix all the issues we have now with the size menus.

Change-Id: Ief2e5e653330b01c9787e04a10b1b2c425da705e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/407
2014-04-09 11:46:51 -07:00
jenkins-bot e9fa58c135 Merge "Adjustments to the Commons icon in Media Viewer To achieve consistency with the icons in the Media Viewer panel, the following has been adjusted: - Colors onf the "share" icon to match the rest of the icons (updated to the new gray values of Agora). - Size of the Commons icon has been adjusted both in the SVG file and when it is added in the LESS/CSS. Due to the different aspect ratio of this icon, extra spacing has been added to make it visually fit." 2014-04-09 15:46:31 +00:00
Pau Giner a5c146dc19 Adjustments to the Commons icon in Media Viewer
To achieve consistency with the icons in the Media Viewer panel,
the following has been adjusted:
- Colors onf the "share" icon to match the rest of the icons (updated to the new gray values of Agora).
- Size of the Commons icon has been adjusted both in the SVG file and when it is added in the LESS/CSS. Due to the different aspect ratio of this icon, extra spacing has been added to make it visually fit.

Change-Id: Ic14a869ea96ea1a8202c9988f0c5d330ba3e9a70
2014-04-09 14:52:54 +02:00
Pau Giner 8cd21e3c82 Adjust text style for size indications
For download button and size drop-downs, the size labels
have been set to small and normal weight (in the download button, 
other rules made it to be bold if no weight was specified).

Change-Id: I7511b307a8459d6e4a01f0b9540528046ad2be8e
2014-04-09 12:15:52 +00:00
jenkins-bot c42f5425f9 Merge "Show tooltip when all sorts of conditions are met" 2014-04-09 09:40:53 +00:00
Gergő Tisza 404bcd3989 Make categories behave
The way categories were handled made it impossible to add anything
after them (they always ended up as the last child of the parent
container). This commit fixes that, and also moves the repo link
behind them (as required by #270).

Change-Id: I7c561c43897054e60028bd524d8ad5ea85f39e36
2014-04-08 19:58:13 +00:00
Gilles Dubuc 22bdbd4041 Show tooltip when all sorts of conditions are met
Change-Id: I987d5d517c3db2409e138b85b90115260d9116bd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/261
2014-04-08 18:33:24 +00:00
jenkins-bot f163f2f30e Merge "Add named timeouts to mw.mmv.ui.Element" 2014-04-08 09:48:11 +00:00
Gilles Dubuc 204d582a3a Add site/language conditions for feedback button
Only show the survey button if the user's language matches and the site is
enabled, and log which site we are on.

The corresponding site configuration commit is
Ic07432649906890785769ce5127761e2c84316e2

Change-Id: I575bb286f4289489b80505c901f5a9e7aeecec8b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/261
2014-04-08 11:37:24 +02:00
Gergő Tisza 660553c58e Fix some OOJS-UI issues
* intializeSelection was removed
* selectItem is replaced by chooseItem, sort of
  (selectItem does not always update the UI, I think?)
* remove old workaround, bug  was fixed upstream

This fixes the download button and unbreaks lots of unittests.
It does not fix the "Loading" text in the embed tab.

Change-Id: Iec7bf9ad5b516001231c7ba46fda962671aaddd8
2014-04-08 01:35:30 +00:00
Gilles Dubuc 3df526b919 Fixes various bugs in IE
- error caused by select() called during focus event
- HTMLElement not existing in older IEs
- filter rotation for older IEs causing black background bug in IE9
- IE9 lacking progress would have its progress bar never reach 100% and disappear
- Handle e.which value for clicks on IE < 9

Change-Id: I5727ef3f2a9f9aa77eac930f93320e6ce5964c78
2014-04-07 22:00:11 +00:00
Gergő Tisza a01266854d Add named timeouts to mw.mmv.ui.Element
Change-Id: Ie07b0239aa21f590ef969ac864f60e71848c4bcb
2014-04-07 21:20:59 +00:00
Gergő Tisza fd8e69432d Workaround for OOJS ES3 incompatibility
Depends on I6cd13b4f3a72378eb27e3aaa313511ffb20227c3

Change-Id: Ia642bbd29d3cd239f1d4b56463a1d8efe4670793
2014-04-07 17:55:08 +00:00
jenkins-bot da11d09e52 Merge "Hide buttons while loading" 2014-04-07 09:29:09 +00:00
jenkins-bot 7b79d7a073 Merge "Rename setRepoInlineStyle to setInlineStyle" 2014-04-07 09:28:09 +00:00
Gergő Tisza 06e50ae05d Hide buttons while loading
Change-Id: Icc4f9b1a80fd43320bd625350b840b2c353b0149
2014-04-04 22:08:11 +00:00
Gergő Tisza b35cd14b63 Rename setRepoInlineStyle to setInlineStyle
Forgot to do this when I originally extracted it.

Change-Id: Iaa31ede4e151513652e1a05a44daa1ff636fbc85
2014-04-04 22:02:16 +00:00
Gergő Tisza f11da493c0 Show a tooltip for the repo link button
The popup for this button was removed earlier for being uninformative, but
we do need this for the survey period where the button texts are hidden.

Change-Id: I451a6bf9cf3c28fbc11f7094db1e7aa86eb87cd7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/226
2014-04-04 19:03:13 +00:00
Gergő Tisza f297de60bc Hide metadata top button texts
Also make sure that the reuse dialog is positioned right, no
matter where its button is.

Also fixes some minor documentation problem with mw.mmv.ui.canvas
which I noticed in the process.

Change-Id: I86feed07738ebef012e63861ed909f3449b85a53
2014-04-04 09:11:58 +02:00
Gergő Tisza 0b63c1a936 Only show file description page button for logged-in users
Change-Id: I206787ad2768f14d9705c29267dbee09b7b44705
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/226
2014-04-04 08:56:53 +02:00
Gergő Tisza 2fc097fa05 Add tooltips to metadata buttons
Quick and dirty solution via tipsy, can be improved later.

Change-Id: I717b45d9800dbabdaf7d52d1d377f6f6958abdf7
2014-04-04 08:52:29 +02:00
Gergő Tisza 052fd5d3f1 Add metadata button to go to file description page directly
Change-Id: I0f2c2b24aece3b806d572a0ed41dce8031e6ae6b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/226
2014-04-04 08:45:56 +02:00
Gergő Tisza 042353c747 Make survey open in popup window instead of normal one
Change-Id: If971f7607bd3fc33080b903e07bd53ae3d3407cf
2014-04-04 08:34:26 +02:00
jenkins-bot 25b9fc435e Merge "Feedback button" 2014-04-04 06:15:14 +00:00
jenkins-bot 64e0a63755 Merge "Create StripeButtons class, convert reuse button to use it" 2014-04-04 06:09:35 +00:00
Gergő Tisza d062974684 Make sure the download attribute has no value
An empty download attribute means the file name from the URL is
used; any value would override the default file name.

Change-Id: Idf1d78c4b4570eb7ccd58b5da7d5ce10cfd91b70
2014-04-04 01:34:31 +00:00
Gergő Tisza 871b49dff2 Feedback button
MVP implementation, just a link that opens the survey in a new tab

Change-Id: I9f2fb85cc47ce2be4cf57679bf37f0bda13084b7
2014-04-03 23:14:18 +00:00
Gergő Tisza 47a8bda392 Create StripeButtons class, convert reuse button to use it
Also do a bunch of refactoring to:
* keep LESS rules in more sane locations so it is not as hard to get an overview
  (most of the metadata panel rules were in mmv.less)
* move mmv.mixins.less up one directory as it is not specific to the UI
* move the SVG icons as all of them were related to the UI
* remove the marging-right hack which was used to keep the title text from
  overflowing the button; instead use a float and overflow properties to make
  sure text that is too long gets hidden

Change-Id: Icc8ea2e766be67d86ae98c734721b2185bd6c36e
2014-04-03 23:13:12 +00:00
Aaron Arcos 10a4fbef14 Fix problems with size menus for embed and download
I think this takes care of all the different mutations of
weird states that happen when going from a small to large
images and transitions in the middle, see card/386.

Change-Id: I80527d746614c0bbda7a1084061d292e5d6394a8
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/386
2014-04-02 23:22:15 +00:00
Gilles Dubuc 961d47432b Download tab, basic download and preview
* Following design, use split button to display a pulldown
menu with possible image sizes. The download happens by
sending the special "download" parameter to the server.

* Offer link to preview image in the browser.

Change-Id: Ic9d895fead04c9128186c7376a0bb09f3596335c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/79
2014-04-02 23:00:28 +00:00
Pau Giner 850ee63df8 Layout adjustment for explanatory text
The text below share and embed code is placed to be
just below the input elements.

Change-Id: I6845e1e67ddfd4fde3352a33cee56c981fb16fdc
2014-04-02 10:45:28 +02:00
Gergő Tisza 95111d2b73 Use mw-mmv CSS prefix consistently for all things
With apologies to anyone who gets a hundred merge conflicts
because of this :)

We had several different prefix styles (mlb-, mw-mlb-, mw-mmv-,
mw-mmv-mmv-, a few unprefixed), which was getting annoying,
and will be confusing to wiki editors who are trying to figure out
where a given style comes from. Such changes are better done before
going live because it breaks all local CSS tweaks on the wiki,
so I am renaming things now (also removing some stuff which wasnt
used anywhere).

Change-Id: I00447a25f0028e234169c6db941bedc99622eb8d
2014-03-31 21:33:12 +00:00
jenkins-bot 53a641b63a Merge "Rename Buttons to CanvasButtons" 2014-03-30 08:47:39 +00:00
Gergő Tisza 7379957398 Rename Buttons to CanvasButtons
Less misleading as we have lots of buttons, and I plan to add a new
button class for the Commons/survey/reuse thing.

Change-Id: I74194e22e9066c58f9c1eba57629458b2b9148b5
2014-03-28 00:10:04 +00:00
Gergő Tisza b9b1529e9b Add more information to embed HTML
Adds site link, license link and long name, replaces internal license name
(we don't have it for most licenses) with short name.

Also fixes some problems in previous changesets that I stumbled on,
renames things to be more consistent/less misleading, and makes
EmbedFileInfo a thin container for existing classes. (That results
in a lot of Demeter's law violations, but it means one less model
to remember, which is a good thing since our property names are
often not very informative (e.g. EmbedFileInfo.url and
Image.url which had completely different meanings))

We always have the site information for embed texts (comes from the repo
API); that part of the tests was pointless, but now that EmbedFileInfo
depends on Repo they became impossible to maintain, hence the
deletion of half the test cases in getThumbnailHtml().

Change-Id: I94e1d0aca14e2a7d5fad983412090add8ad6bfa3
Mingle:  https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/369
2014-03-27 19:14:06 +00:00
Gergő Tisza d85e7bf32e Utilities to transform HTML to plain or filtered text
This takes care of several minor annoyances:
* centralizes all the text processing functions which have been
  floating all around the code, and adds proper tests
* filters out invisible elements (sometimes used for metadata)
* avoids merging separate words on HTML->text transformation
* adds caching since doing all this transformations could be
  processing-intensive for big chunks of HTML. (This might or
  might not be a good idea. I haven't done performance tests, so
  this might be premature optimization, and increases memory use.
  OTOH these functions are often called in situations where an
  immediate UI response is expected (such as selecting a size
  from the list) so even small delays would be perceivable.

Bug: 63126
Change-Id: I1ef1e3a33efdfea17612df00da6b629bf39e07aa
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/388
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/369
2014-03-27 19:11:09 +00:00
Gilles Dubuc 82cec45472 Increase the contrast of the share&embed input/textarea
Change-Id: I9862f2b8080a4401e000dbd9a7af8d4db4981c06
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/379
2014-03-27 07:50:13 +00:00
jenkins-bot c173de46ae Merge "Add explanatory one-liners to share & embed" 2014-03-27 04:39:33 +00:00
Gilles Dubuc b6251afb35 Add explanatory one-liners to share & embed
Change-Id: Id8eb7020296004dae83d63c37393c29142928dd6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/379
2014-03-27 05:37:34 +01:00
jenkins-bot a72ca59a09 Merge "Makes the size information (WxH) in Embed lighter" 2014-03-27 04:33:29 +00:00
jenkins-bot a1b7c285c3 Merge "Adds help link" 2014-03-27 04:23:41 +00:00
Gilles Dubuc 57852962ef Adds help link
Pointing to //mediawiki.org/wiki/Special:MyLanguage/Multimedia/About_Media_Viewer/Help

Change-Id: I90747e269e07dd27a4fa21470ec1563518177bb2
2014-03-27 05:22:07 +01:00
Gilles Dubuc da83227379 Makes the size information (WxH) in Embed lighter
Change-Id: I54ccafd81967eb682a2e10e9a0b9ef6c92e2806f
2014-03-26 11:32:25 +01:00
Gergő Tisza 41bc451d87 Store event handler proxy for size change
Workaround for bug 63094.

Change-Id: I91855802486cd25e7109cad7d656eb40f6a3580c
2014-03-26 01:47:18 +00:00
jenkins-bot cf2450ccd1 Merge "Get more license info" 2014-03-24 12:18:18 +00:00
jenkins-bot d94721ab37 Merge "Fix some text selection issues with share/embed" 2014-03-24 09:49:22 +00:00
Gergő Tisza c1ff536c3c Get more license info
Fetch more license information from the imageinfo API
(as needed by the reuse panel), store it in a new model

Change-Id: I331598b55b86d13e23a8bcd58c3ad8fcab749e6f
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/369
2014-03-20 23:07:02 +00:00
Aaron Arcos 40a6980d28 Fix some text selection issues with share/embed
Change-Id: Ic9d330c04d4e9335cdfce6e99870d1e5877b2a90
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/374
2014-03-20 14:12:39 -07:00
Pau Giner 7e3d794c9f Reuse dialog styling
Adjustments of several styling aspects for the reuse file panel:
* Border style and colours to match the ones used in similar borders and Agora style
* Highlight the trigger also on hover
* Tweak the margins to avoid info on the embed panel to appear next to the edge.

Change-Id: I3a5448e3e81006ae35d2c18a9b2cbc2a6598210e
2014-03-20 14:52:39 +01:00
Gergő Tisza c7ae4a36ba Handle image loading rejections
Displays the rejection error message when loading something fails, so that the
user knows what's going on and can send meaningful error reports.

Needs non-crappy design.

Change-Id: I7d2914d89549b598bd1070ed40c6f1c9d45b55f0
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/271
2014-03-19 18:51:01 +00:00
Gergő Tisza 466735fc10 Add HTML text to embed tab
Change-Id: Idcafe6dad9ffb17ffac365a350feff3903b37ff3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/148
2014-03-19 05:47:47 +00:00
Gergő Tisza f650813eb5 Add embed tab to reuse dialog
Implements the wikitext part of the mingle card

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/148
Change-Id: I5bcd8e2171f45c70736b7a7cfc695134269ed12d
2014-03-19 05:46:55 +00:00
Gilles Dubuc 56f923ae21 Add share panel, replace reuse
Mingle: 147

Change-Id: I5678002ac84965a80f5e63635151032e6c293194
2014-03-19 02:06:21 +00:00
Gilles Dubuc c6683b7e3f Make the panel animation more subtle
Also turns it into a CSS animation, which allows us
to clean a lot of code

Change-Id: Id6705b63b26d8be341e77352924cad6ac4b73da1
2014-03-14 09:04:28 +01:00
Pau Giner f0061261e6 Simplify "Usage box" and layout adjustments
Adjustments to simplify the uses box by removing borders
and adjusting font sizes and colors.

Change-Id: Ia2cdc6af130d2280b7c94734174da5c154e42b7c
2014-03-12 17:23:51 +01:00
Pau Giner 4ee0e06c6d Use different widths for metadata columns
This change makes the columns on the matadata panel use
a different width (2/3 and 1/3) to emphazize the description
with respect to the more advanced technical details.

Change-Id: I246e3496dd01649f360c1f80b859e2260bb1d87f
2014-03-11 16:05:14 +01:00
Gergő Tisza d0f76bb160 Add checkered background to make black-on-transparent images visible
Bug: 57620
Change-Id: Ibabbb6d64f9d02ff5b94431a431ebb5222e344d7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/284
2014-03-05 21:32:34 +00:00
jenkins-bot 44b9fa127a Merge "Fix resize issues (Part III, Fin)" 2014-03-05 00:16:16 +00:00
Aaron Arcos 6b7de4b129 Fix resize issues (Part III, Fin)
Last round of fixes and refactorings regarding resize issues
and the Canvas component:
  * Consolidate all the width calculation logic inside the Canvas component
  * Consolidate image resizing logic in the Canvas component
  * Fix size problem with SVG images
  * Clean up comments and tests

Change-Id: I0198cc1e3a45f7287b9a7494f73a8f158303f886
Bug: 56454
Mingle: 239
2014-03-05 00:14:54 +00:00
jenkins-bot 5f4f62211b Merge "Add events for image views and "use this file"" 2014-03-04 00:44:21 +00:00
Gilles Dubuc b7488716d8 Add events for image views and "use this file"
Change-Id: I9ba37038e41d81bbb8dfa96b8a7766b35d24fa5a
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/54
2014-03-03 16:30:38 -08:00