Commit graph

77 commits

Author SHA1 Message Date
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
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
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