Commit graph

2041 commits

Author SHA1 Message Date
Bartosz Dziewoński 26328b3fa0 Always wait at least 150ms before displaying the popup
Previously we would wait 150ms if the data was cached,
or 50ms + [API request time] if it was not.

Using some promise magic to achieve this without decreasing
performance. The behavior of sendRequest() was changed a bit.

Bug: 64235
Change-Id: Ibe6e1a5f4ac02f538dac686476ac95ba506a1a86
2014-04-22 16:26:10 +00:00
Bartosz Dziewoński c3e3df7905 Use :not() CSS pseudo-class instead of jQuery .not() filter in selector
The old version would iterate over all links on the page (try that on
[[Barack Obama]]), the new one should be optimized by the browser and
poly-filled by jQuery if unavailable.

We can't do `:not(.extiw, .image, .new, .internal, [title=""])` –
while some browsers support it, CSS specification doesn't allow
compount selectors inside :not().

Change-Id: I0e4b18752905604ebf1b7f41a9b7ac2edd8b42e0
2014-04-22 16:24:58 +00:00
Bartosz Dziewoński 31e42fd85a Prettify the embedded SVG code
* Do not escape double-quotes in single-quotes string
* Remove repeated <defs/> tags, one is enough
* Reindent

Change-Id: I6a5b53384b8d5604bee11cb993d040282accf999
2014-04-22 14:10:08 +00:00
Bartosz Dziewoński 9943ebd844 ext.popups.core.js: Whitespace cleanup
Change-Id: I861ba996cce9e9baf65e0630b1c2187d15df22b6
2014-04-22 14:09:42 +00:00
Bartosz Dziewoński 306816b5ff Popups.php: Remove unused top-level variables
Also whitespace.

Change-Id: I126244bb426f898ecbacc7f7c285f8338bf75046
2014-04-22 14:07:34 +00:00
Translation updater bot 82986bb45f Update i18n shim
A performance issue was fixed in the shim(s) generated by
generateJsonI18n.php, so it needed to be updated.

Change-Id: I4b64478c8a5ac464c08d244567ba637d9eacb61b
2014-04-22 13:37:14 +00:00
Bartosz Dziewoński 84be066a29 Apply whitespace code conventions in LESS files
https://www.mediawiki.org/wiki/CC/LESS

Change-Id: Ic8df9629b76499c57114a5e399b4266dd0523002
2014-04-22 13:38:53 +02:00
Prateek Saxena 64fdebe496 Remove viewBox from SVG, not needed.
Bug: 63590
Change-Id: Ia1e85441389377cab2720b5410cbf602a42fafe0
2014-04-22 11:16:35 +00:00
Prateek Saxena 030c2512b1 Position hovercard according to mouse position
Bug: 63159
Change-Id: I3d038af8915ff586c76f24bd5c2d623de20b09ab
2014-04-22 11:04:05 +00:00
jenkins-bot 6909350524 Merge "Fix border issue with non-flipped landscape hovercards" 2014-04-22 10:57:40 +00:00
Prateek Saxena d5dbeff0f2 Ignore internal class for links
This is being used in the rectangle icons to enlarge the image.

Bug: 64116
Change-Id: I52b93e7063fbb8e39fbc6993566210a180d1decc
2014-04-21 16:43:50 +05:30
Prateek Saxena a2242e6886 Update documentation for the createThumbnail method
Bug: 61267
Change-Id: If73e89059f5f8528a6e0aab0ec04a89a69c5d114
2014-04-21 04:26:39 +05:30
Prateek Saxena 9bd3d6551e Remove confusing variable name
Bug: 61267
Change-Id: I7bcf85c9fcdf2905f7f0e11646eb007a7d8a64ea
2014-04-21 04:26:39 +05:30
Prateek Saxena 5940db0cdc Break ternary operations into multiple lines
Bug: 61267
Change-Id: I777c658de502c934abd72eea9e4bd72ceb956560
2014-04-21 04:21:47 +05:30
Prateek Saxena fbf9bda766 Stop checking for SVG support on every hover
https://gerrit.wikimedia.org/r/#/c/121607/3/resources/ext.popups.core.js
Bug: 61267

Change-Id: Ibdd5a42c72c43cd797eeb0b3d4c7ba0166e0643d
2014-04-21 04:21:47 +05:30
jenkins-bot 5617b0f1a0 Merge "Added documentation for text extract length" 2014-04-20 21:26:40 +00:00
Bartosz Dziewoński 033168b31a Clean up and optimize popups-{ltr,rtl}.svg
Using Inkscape, svgo and by hand. Removed random leftover filters,
cleaned up the grouping structure.

Replaced popups-ltr.svg with a flipped version of popups-rtl.svg,
as the former caused some inexplicable issues with some renderers
(like rsvg).

Change-Id: Id67c26cd8ac71a8fc5de3f2fc1cc803482e86699
2014-04-20 21:05:46 +02:00
Translation updater bot 503b983423 Localisation updates from https://translatewiki.net.
Change-Id: I6df15a9aef869ff9b067d71fad8789ec1da796dd
2014-04-18 19:36:45 +00:00
Translation updater bot 2c17c7dcff Localisation updates from https://translatewiki.net.
Change-Id: I9fbf658a15309ddb98418fc08a5b4e9347937ada
2014-04-16 15:47:24 +00:00
Prtksxna 96a44c8b22 Merge "Prevent popups after scrolling" 2014-04-16 13:36:49 +00:00
Translation updater bot d88d839576 Localisation updates from https://translatewiki.net.
Change-Id: Ic7a2075b7f39742e1027a9846f0fac8c893b232d
2014-04-15 20:09:51 +00:00
Translation updater bot 7e9bd815b0 Localisation updates from https://translatewiki.net.
Change-Id: Ia324e7cabe9e6d6284f906e8723fbc186b9ece41
2014-04-14 19:45:25 +00:00
Prateek Saxena 75afbf26ff Fix border issue with non-flipped landscape hovercards
Bug: 63215
Change-Id: Id998e9c33bab551643e5e18303cbd773dc824a39
2014-04-14 11:30:27 +05:30
Prateek Saxena d40c4c1e8a Use document.createElementNS for svg:image
Browsers like Safari and IE9 alias <image> tags to <img>
tags and thus don't display hovercards correctly. By creating
the `image` in the svg namespace we solve this problem.

Bug: 62985
Change-Id: Iff92d59ea231d1208eea149cc8c182a5fe87701a
2014-04-14 09:09:35 +05:30
Translation updater bot db023ae156 Localisation updates from https://translatewiki.net.
Change-Id: I711a212c3f1f670d3cbad98e631455c54c1f7dfa
2014-04-13 19:17:01 +00:00
Prateek Saxena e67ae7d43a Added documentation for text extract length
Bug: 63871
Change-Id: I61c2f19b8263982550dd9b1e9badbd6ddaf288db
2014-04-13 10:28:57 +05:30
Prateek Saxena fa66ad2184 Fix redirect for info-link
Bug: 63868
Change-Id: I12f92211caad78e867bc7bf0f605ff0391498d4d
2014-04-13 08:05:55 +05:30
Translation updater bot edd49b32ca Localisation updates from https://translatewiki.net.
Change-Id: I4450cf06c99497a28de50f1bccfe85c64d0a481b
2014-04-11 19:48:57 +00:00
Translation updater bot 8c10eb2054 Localisation updates from https://translatewiki.net.
Change-Id: Ic2cb40c999c87ca1401ac2180581fa5322c190d1
2014-04-09 19:39:51 +00:00
Translation updater bot f9f361ee3a Localisation updates from https://translatewiki.net.
Change-Id: Ie49749917680dc62fccd840ee8f43456a5ac74b7
2014-04-08 20:06:18 +00:00
Santhosh Thottingal ad7db9cc36 Misc code formatting cleanup
* Consistant whitespace after keywords
* Misc whitespace cleanup as per JS coding guidelines
  https://www.mediawiki.org/wiki/Manual:Coding_conventions/JavaScript
* pass mw to IIFE and use the function arguments close to function body
  ( function ( $, mw ) {
  ...
  }( jQuery, mediaWiki ) )
* Moved prefined moment to .jshintrc. Move browser:true too

Change-Id: If488974e8e5987916bc4043e4e70bb6c60472b30
2014-04-07 15:09:59 +05:30
Translation updater bot 9f0139fd83 Localisation updates from https://translatewiki.net.
Change-Id: I4c7e856a4b165f7e2197880297a51acc6118453b
2014-04-06 19:42:41 +00:00
Spage 4ef29afb88 Merge "Fix placement issue for smaller images" 2014-04-06 09:30:17 +00:00
Translation updater bot 9f2975addc Localisation updates from https://translatewiki.net.
Change-Id: I0ebb2a9d35f5df8958827c1371e752da0e8ae1b9
2014-04-05 19:44:28 +00:00
Prateek Saxena 43df8474cd Use escape key to hide popup
Bug: 62948
Change-Id: I9623cd95b5e2832d68d9409d8056ad6d50da0398
2014-04-05 18:39:48 +05:30
Translation updater bot 17c296b187 Localisation updates from https://translatewiki.net.
Change-Id: I4e0b4020ffc173017bf8cc3cdc8be3eb5331f04b
2014-04-04 20:24:41 +00:00
Juliusz Gonera 0719a75d08 Prevent popups after scrolling
Prevent popups from showing up when the mouse cursor accidentally
ends up hovering a link after scrolling.

Change-Id: I07a95d9eabdc22a045a97b07f98fb0d632a276c1
2014-04-03 14:56:06 -07:00
Prateek Saxena 27650cae19 Use aria-hidden for popups
Bug: 62948
Change-Id: I0d5428be2e5299e57232335c00b45649ba23ce9f
2014-04-03 19:14:26 +00:00
Prateek Saxena dd639d4020 Use tooltip role for Popups
Bug: 62948
Change-Id: I10f42bbd01e2a5925ee5323eb1c6968e0b1787a4
2014-04-03 19:14:06 +00:00
Prateek Saxena 511b6f251f Add white fill in triangle for hovercards with images
Bug: 62945
Change-Id: I1b3ec90a8cd482c100ee8b2abd5ee69f3890a576
2014-04-02 06:54:38 +00:00
Prateek Saxena a5b57a40e4 Remove redirects to text and heading
Bug: 63155
Change-Id: I42fb9cc1a8b26eaf6807243e4e7bdbf0b56dc35c
2014-04-02 06:54:13 +00:00
jenkins-bot 8b8f9d4a45 Merge "Show and hide Popups on focus and blur (along with mouseenter/leave)" 2014-04-02 06:49:44 +00:00
Prateek Saxena b2c5424272 Show and hide Popups on focus and blur (along with mouseenter/leave)
Bug: 62948
Change-Id: Ica9ba7099cb0430983a07251baf62861d7901b9a
2014-04-02 12:16:00 +05:30
Translation updater bot 26641ca78b Localisation updates from https://translatewiki.net.
Change-Id: If64e934f2ed9070197ec5cee4a61bbd1b892f6cf
2014-04-01 19:49:28 +00:00
Prateek Saxena 1b4a7a1f26 Fix for RTL languages
Bug: 62970
Change-Id: I7c2a2afa8fc2b52727fd7e86a7774b9d8196917c
2014-04-01 11:48:40 +05:30
Translation updater bot 79f481cbca Localisation updates from https://translatewiki.net.
Change-Id: Ia2d0cbbcea5946f039ebd86435a46a3067d7e1e5
2014-03-31 20:16:14 +00:00
Prateek Saxena abc06cb0ef Use correct spacing conventions for jshint comment
https://gerrit.wikimedia.org/r/#/c/120752/3/resources/ext.popups.core.js

Change-Id: I66d715528997c5ec1476b61a130934bc3b642dce
2014-03-31 12:03:54 +05:30
Translation updater bot ae28167446 Localisation updates from https://translatewiki.net.
Change-Id: I0d73b4e99c932c79acfa1be643e9f22ba30b5b75
2014-03-30 20:13:50 +00:00
Translation updater bot 3bc1f998fb Localisation updates from https://translatewiki.net.
Change-Id: Iea0358fd279318c60e452803b458076b93ccd482
2014-03-29 21:18:17 +00:00
Matthew Flaschen d71713aff8 Mention BetaFeatures as dependency, correct comment
Change-Id: Idf406fabc89c951e6457876f69dc7b97ff948add
2014-03-29 03:05:54 -04:00