Commit graph

138 commits

Author SHA1 Message Date
Mark Holmquist 547ddc97b1 Add client-side flag for disabling the viewer
Also set it on server-side. Use mw.config to override.

Change-Id: I00ea1ee8544d2c802f09fd25f7abaf29752f3641
2014-03-20 23:43:27 +00:00
Gergő Tisza e8c099f3b7 Fix navigation issue with alt+esc on Ubuntu/Unity.
Bug: 62580
Change-Id: Ib2c8e21ee05000f7582f6e478034664c8be881e5
2014-03-17 21:14:07 +00:00
Prateek Saxena 652094039f Use animation mixin in core for invite-animation
Makes it easier to change the animation later without repetition.

Change-Id: I0dadafb91c288342480054d47fdda09a97d1773d
2014-03-17 09:02:30 +01: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
jenkins-bot c350658093 Merge "Do not add icons to media viewer image list" 2014-03-10 19:02:27 +00:00
jenkins-bot c1fb20fedb Merge "Add checkered background to make black-on-transparent images visible" 2014-03-08 01:55:06 +00:00
Gergő Tisza 5a3d56f81b Merge MultiLightbox into LightboxInterface
Change-Id: I4363095e0504dd941793ba3addc7ee3cbe835536
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/178
2014-03-08 01:14:07 +00:00
Gilles Dubuc c386719cdb Some refactoring to get LightboxInterface closer to a proper UI component
* remove reference to MultimediaViewer
* move hash handling to MultimediaViewer
* make it inherit from Element, remove code duplication
* cleaner event handling life cycle (register on attach,
  unregister on unattach)

Change-Id: Ida8f68dead758a6ae3c429eb85c548af61e46801
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/178
2014-03-08 00:26:44 +00:00
Mark Holmquist 21549d7547 Do not add icons to media viewer image list
e.g. {{refimprove}} on enwiki - there is an icon of a book that is only
meant to be illustrative on the page. It interferes with the page's image
collection and the flow.

Change-Id: Icd7e5885aaf8b31fffe07bd18cc0feb0f76b848c
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/229
2014-03-06 15:26:25 -08: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 0fa8f80942 Merge "Get rid of global viewer instance" 2014-03-05 17:52:18 +00:00
Gilles Dubuc 8beca0b106 Get rid of global viewer instance
- split event handler setup out of bootstrap and viewer creation
- simplify the tests setup/teardown

Change-Id: Icde1db81efd6191207ba35757192c800ea2d2e91
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/278
2014-03-05 02:33:06 +00:00
Gergő Tisza 59bd5e0032 Add tests for promise rejection error logging
Change-Id: I20d0803f211cbc4a7f00b58d015b565ca5c3b49b
Mingle:https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/268
2014-03-05 01:15:28 +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
Gilles Dubuc d983a13377 Test to check that events are not trapped after the viewer is closed
Also fixes overeager preventDefault in the interface

Change-Id: I5e3b05c8546e24772016b72343e241caa2e6ef0e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/274
2014-03-04 09:28:59 +01:00
jenkins-bot a5e566e5db Merge "Add rejection logging to providers" 2014-03-04 01:35:48 +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
Gergő Tisza ead038c34f Add rejection logging to providers
Make sure it is easy to debug when one of the promises rejects (and
causes the whole promise chain to fail).

I'm not really happy with this, but still seemed better than adding
the same boilerplate error logging code to each provider one-by-one.

Change-Id: Idd2b638f012ef2ff250e350e2f6a60bb8b81899b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/268
2014-03-03 21:35:01 +00:00
Gilles Dubuc 28cb881cfa Network performance measurement CORS improvements
- Fixes feature check for IE6 and older browsers without native XHR
- Skip crossOrigin attribute for IE11 because it prevents caching

Change-Id: I99d6a3c97edac1af12750d5978a84b6e6f631b14
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/232/
2014-03-03 17:17:07 +01:00
Gergő Tisza a8a31b1cfc Restore normal behavior on middle-click for site link
Change-Id: I0f13cc97e69fffec64c5dd6c18f08bad44838d19
2014-03-01 00:00:31 +00:00
jenkins-bot 4dad39c117 Merge "Get rid of site-link-click waiting period" 2014-02-28 22:57:13 +00:00
jenkins-bot 31c2b4169f Merge "Fix JS error happening when closing "use this file" dialog" 2014-02-28 17:53:17 +00:00
Pau Giner a3d0a654f7 Adjustments of colours and layout
changes include:
* Aligning license and usage boxes with content above.
* Limit the maximum size for the licensing box when open.
* Adjust font sizes and colours to adjust the alance in the prominence of each part.

Change-Id: I0e4465baaf7a9f7830b95a8d731256d6b4974e17
2014-02-28 14:14:34 +01:00
Gilles Dubuc 9940833928 Get rid of site-link-click waiting period
Change-Id: Ie165cf132ed9f9e326387abba0af6d3780fa894d
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/255
2014-02-28 12:11:18 +01:00
Gilles Dubuc 430ec53d3e Fix JS error happening when closing "use this file" dialog
Change-Id: I690f473ea17117bed7d30e1a858f6612f57fc33e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/224
2014-02-28 11:52:47 +01:00
Aaron Arcos fedaa553b4 Fix resize issues (Part II)
I was going to stage this but better give you the whole enchilada,
it is not that bad, ;-). This is what I am doing:

- Delete  things that are not used anymore.
- Componentize image ui element (Canvas).

Bug: 56454
Change-Id: Ib5461639a86d9f8e0a150f6d9543a20058d31e00
Mingle: 239
2014-02-28 10:22:21 +01:00
jenkins-bot 374fe5560d Merge "Create fake user when userinfo request fails" 2014-02-28 08:48:25 +00:00
Gergő Tisza 8408c82420 Clear registered events on unattach
Bug: 62033
Change-Id: Ic23a182ac2a74864831796ce493a0c51baa4fe8b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/273
2014-02-28 03:20:40 +00:00
Gergő Tisza 822e129a37 Create fake user when userinfo request fails
Quick and dirty fix for a bug that completely breaks the metadata panel.
Should be refactored later (for a ForeignDbRepo, a missing user is
normal, for anything else it should still be treated as an error
condition, although maybe not with a rejection).

Bug: 62019
Change-Id: I433ae2bd1334593d9c5bfe0272ce7207f3fdf723
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/267
2014-02-28 03:06:23 +00:00
Pau Giner d66681c949 Small font and layout adjustments
Some styling adjustments to:
* Make description fonts not to be de-emphasized in comparison to license terms.
* Avoid metadata on the right to wrap when there is enough space.

Change-Id: I49514060dec200d93489d2b853a1dfdc1bfa5f46
2014-02-27 19:04:00 +01:00
jenkins-bot 45a0031716 Merge "Bugfixes and improvements for the progress bar" 2014-02-27 01:35:26 +00:00
jenkins-bot ccdb14634a Merge "Make it obvious that the permission text is cut off; add expand link" 2014-02-27 01:25:29 +00:00
Gilles Dubuc 9d9fff1871 Bugfixes and improvements for the progress bar
- the bar now starts at 5% for a visual indication that
something is going on
- the bar animates (fast) to 100%, instead of
disappearing immediately
- the animation logic has been fixed to avoid seeing
the bar go backwards
- added sanity check in all the callbacks to make sure
that we don't apply any changes to an image we are
not looking at anymore (including progress updates)

Bug: 58055
Change-Id: I765a61c16513e9330a412c5ec96387623ae7dbc7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/242
2014-02-27 02:13:03 +01:00
Gergő Tisza 976ffc76d3 Make it obvious that the permission text is cut off; add expand link
Fades out the bottom of the text and adds a link to replace it
with the full HTML version. Due to the way it is positioned,
the fade + link will be invisible if the text is less then 3 lines.
The implementation is not very polished; since this will be
replaced by some JS-based ellipsis thing, I didn't want to spend
too much time on it.

Change-Id: Ib30e40fe845b85bfcf9557970efb886d28b3e5c7
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-27 01:06:25 +00:00
Gilles Dubuc 1e880b68ca Ignore left/right key presses when there's a modifier
Change-Id: I8998fd27a7d60f5826802153d3ad74ab8a37c3fe
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/236
2014-02-27 01:17:53 +01:00
Gilles Dubuc 5d6d274309 Make the SVG filter inline
The external SVG doesn't work on beta, because
it's hosted on a different domain

Change-Id: Ic6ae42a33f9dbd656df051f056376aea60ac9ea3
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
2014-02-27 01:11:52 +01:00
Gilles Dubuc 392cc4e737 Move "uploaded by" to the right spot
As specified in the acceptance criteria, it should be
between "Learn more" and the creation date

Change-Id: Ie3e7fd55b6bb8fa5cf995fa90dd8ab45581f34bd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/217
2014-02-26 18:19:51 +01:00
jenkins-bot 1317119e6e Merge "WIP Fix resize issues (Part I)" 2014-02-26 09:24:51 +00:00
Aaron Arcos efaae84a4f WIP Fix resize issues (Part I)
After a few false starts trying to fix LIP.autoResize(),
I noticed that it has become obsolete by our latest
improvements (bucketing and cashing), so I decided to
get rid of it and let the browser do the resizing.
I tested in Chrome/Safari/FF and this approach seems
to work fine.

Still work in progress and there are many things that should
be cleaned up regarding the image object logic but please take
a look and let me know if you have any objections if I go
this route.

Bug: 56454
Change-Id: I08207d0f1fcc9dcb69ec31c03e96cfd0c0a6c522
Mingle: 239
2014-02-26 10:22:47 +01:00
Gergő Tisza 77deada982 Fix display issues with "view terms"
Hiding the element before it is added to the document causes
a wrong display type in Firefox; changing the order of commands
fixes that.

Bug: 61936
Change-Id: I808131da25f2f70c14747238216e8973af44d029
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-26 01:20:34 +00:00
Gergő Tisza 18a850869d Make sure the text of the permission box is cut exactly between lines
Change-Id: I7a0a3056f6e3734579f1e04175e04c89ced92576
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-26 00:41:12 +00:00
Gilles Dubuc 77a483086f Blurred thumbnail preview + progress bar
Displays a blurred version of the thumbnail
while the actual image loads
Displays a progress bar showing the image load progress
Animates into focus once the actual image is loaded

Change-Id: I2b8bc4691c20ffb5b3f16da9a8b9d6fd1796d784
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/146
2014-02-25 14:57:33 +01:00
Gergő Tisza 109bbe6ac1 Namespacing MMV properly
Everything is under mw.mmv now.
(Also, I cut down on the number of direct global instance references a bit.)

Change-Id: I88bb3b62b82ce54126dd069b0aab4412d9404719
2014-02-25 13:16:22 +01:00
Gergő Tisza 53da285b07 Merge MultiLightbox into MultimediaViewer
* merges parent classes into child classes
* moves some files and tests to have a consistent directory structure

Change-Id: I360cc0805d8a561f5105fb063747457f67e1fccd
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/177
2014-02-25 02:00:13 +00:00
Gergő Tisza a04631c405 Show permission
Change-Id: I0b8b0626b36baba9732f7350213d8b53ec2cca95
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/118
2014-02-24 21:41:25 +00:00
Gilles Dubuc bfa530cc21 Wait for CSS to be truly loaded before opening the viewer
This is a workaround for core bug #61852

Change-Id: If7d830866993eddbf5784694514ff89aece56c5b
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/258
2014-02-24 19:13:04 +00:00