Commit graph

208 commits

Author SHA1 Message Date
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
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 61b5de0d22 Merge "Cache API responses" 2014-04-22 08:58:44 +00:00
Gergő Tisza 284a936aff Cache API responses
Cache API responses, both on Varnish and in the user's browser.
The imageinfo request is not cached, since that would make it very
hard to test metadata template edits. Everything else is cached for
one day.

Change-Id: I9149cf40d4448a424073eefd1eb442c70c977687
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/435
2014-04-22 10:56:52 +02: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
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 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 29a241ae36 Merge "Test to compare the performance of MMV and the Commons File: page" 2014-04-17 10:51:10 +00:00
Gilles Dubuc bf213ed978 Test to compare the performance of MMV and the Commons File: page
- Runs combinations of cold/warm browser cache and average/large window size
- Sends events with EventLogging that will allow us to generate limn graphs

This should run separately from the other cucumber test we already
have. This one needs different environment variables  because it needs
to run against production wikis instead of beta wikipedia

Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/378
Change-Id: I53b521ca2759c493aae6fe6e59be8d448e0f15d7
2014-04-17 12:32:15 +02: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 67f0272f1e Merge "Add history back button test to E2E" 2014-04-16 22:16:08 +00:00
jenkins-bot bd9b268107 Merge "Fix E2E scroll assertion logic" 2014-04-16 22:10:44 +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
jenkins-bot e78d391037 Merge "Add routing classes" 2014-04-16 10:51:02 +00: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
jenkins-bot ffdc63aa4c Merge "Do not load too-big thumbnails for SVGs" 2014-04-16 10:23:40 +00:00
Mark Holmquist 68bb702eaa Fix issues with file page link
TIL about setup/teardown in qunit

Change-Id: Ib283285bea401be251ec3f46a2dbd01623fe895e
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/452
2014-04-15 15:42:11 -07: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 ac9f5d8c96 Add history back button test to E2E
The scrolling logic has broken specifically when navigating with the
back button (as opposed to pressing the "close" button). This change
aims to test that scenario.

Change-Id: Ibe31b319c882b7de2a84ae143652144093c50f1c
2014-04-15 16:25:22 +02:00
Gilles Dubuc fe399fc71c Fix E2E scroll assertion logic
It turns out that cucumber/selenium will automatically scroll
to the element you want it to click on. As a result we have to do
the same in order for the assertion to be correct when coming back to
the article.

Change-Id: I7d3b6609cfe7cdae9c08a6d723d652ad1a6a7055
2014-04-15 16:09:18 +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
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
cmcmahon 6ec33facf6 update test to pass with new locator
Change-Id: I49aec9bbfd590cc6111bed73fa1150e0f93d5bc6
2014-04-11 16:00:13 -07:00
jenkins-bot 6dae43b0cf Merge "Fix commons icon to avoid pixelation" 2014-04-10 18:12:34 +00: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
Mark Holmquist 1ae138c9e7 Open MMV on hash change on file pages, add link
Change-Id: I4aa53d50bcd4880f341dfb59b7a451e2d5bda2ad
2014-04-10 09:34:01 +02:00
Gilles Dubuc 0fd2007923 Fix z-index bug in Firefox that would make navigation buttons appear on top of the metadata panel
Also fixes other issues:
- Some code in mmv.lightboxinterface.js wasn't doing anything
- Canvas buttons were being added to the wrong element
- Several CSS rules were being declared twice, a remnant of the multilightbox days

Change-Id: I6ffa1f6a989964d3863aa9dbeb332c0e59dff2e6
Mingle: https://wikimedia.mingle.thoughtworks.com/projects/multimedia/cards/409
2014-04-09 17:37:14 -07: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 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 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