Commit graph

2771 commits

Author SHA1 Message Date
Translation updater bot c9a7d15f1e Localisation updates from https://translatewiki.net.
Change-Id: Icb0820ae1863e96036e0872ae22ac21b1ba16c4c
2016-07-21 22:59:43 +02:00
Translation updater bot f1172ad9c2 Localisation updates from https://translatewiki.net.
Change-Id: Ia6871c973d6e29d689931a2f7ece5d56138454c2
2016-07-20 22:40:38 +02:00
Baha a49cdb37cc Use Schema revision 15777589 for logging events
The schema introduces a new field called `hovercardsSuppressedByGadget`,
which is `true` when the Navigation Popups gadget, rather than the Popups
extensions, is being used to fetch and display article summary.

Note that it may take some time before the Navigation Popups gadget is
loaded onto the page, thus actions taking place before this happens will
record the value of `hovercardsSuppressedByGadget` as `false`. This is
mostly the case with the `pageLoaded` action which almost always happens
before the gadget code is loaded.

Bug: T137203
Change-Id: Ie31deea7ae2323d6a346c67ed84fdf587ad55bd1
2016-07-19 16:00:41 +05:00
Translation updater bot 4b7afe0279 Localisation updates from https://translatewiki.net.
Change-Id: Id8485cc7ee647f25996e78c71786a9603da77c7f
2016-07-16 22:59:14 +02:00
Translation updater bot 73127e6fa8 Localisation updates from https://translatewiki.net.
Change-Id: Ib821f6ed44ea191e3e104796c0aabb2bc60fb31d
2016-07-15 22:30:18 +02:00
Translation updater bot e2f36935e8 Localisation updates from https://translatewiki.net.
Change-Id: I1197e6ba4e24dfc6203037003ea2496f0ea98c90
2016-07-14 23:27:49 +02:00
Translation updater bot 8b7ef26bc5 Localisation updates from https://translatewiki.net.
Change-Id: I2053eefe00716a35f5eece6efd9ac4d4ce83589c
2016-07-13 22:37:48 +02:00
Translation updater bot 4d28e21f1d Localisation updates from https://translatewiki.net.
Change-Id: I50a469b7cad0e60c27e44c2bb6bdcdb801098c41
2016-07-12 22:51:45 +02:00
Translation updater bot 5db83902f4 Localisation updates from https://translatewiki.net.
Change-Id: Iea54b8f1086d71e2fed31a162b1ecc0e3794baa8
2016-07-11 22:58:36 +02:00
Translation updater bot 5c9a64759f Localisation updates from https://translatewiki.net.
Change-Id: I4ab8a3d86433bdbf09edd616b7a471a0f755eb49
2016-07-10 22:22:43 +02:00
Translation updater bot 2cf2d3b1f9 Localisation updates from https://translatewiki.net.
Change-Id: I41309050c43b974219e107b5e0a28f1ded26fa3f
2016-07-09 22:54:47 +02:00
Translation updater bot 09a0fec6ca Localisation updates from https://translatewiki.net.
Change-Id: I789b477e56c2ef878a7600cace852c9710255e1b
2016-07-08 23:10:48 +02:00
jenkins-bot 787f0d2179 Merge "Tweaks to settings page" 2016-07-08 05:19:24 +00:00
jdlrobson c1cb976ba2 Tweaks to settings page
* Change labels in English for settings options
* Update description for enable option
* Remove description for disable option

Bug: T138233
Change-Id: Id23dcc7b7e655f7939bb2e455b8680ed5a2c6331
2016-07-07 10:02:08 -07:00
Baha 1bdd8e7a7c Do not log XHR cancellations
These errors do not have any value, they just happen when the user
cancels the current request. Removing these events will result in
less noise for data analysis.

Bug: T137059
Change-Id: Ia9d921553791d1b7be5941a98716297b74b706b2
2016-07-07 18:47:54 +05:00
Translation updater bot 9c8aaf06ab Localisation updates from https://translatewiki.net.
Change-Id: I15b12119d6ae117d31be99adb19984a0c3157ce4
2016-07-06 22:30:13 +02:00
Translation updater bot 60b821847e Localisation updates from https://translatewiki.net.
Change-Id: Iff42f6adbb608a7b096d347564e04de61c866c10
2016-07-04 22:32:43 +02:00
Translation updater bot 9f1832213f Localisation updates from https://translatewiki.net.
Change-Id: I63e7a92257b3a34a1829d456d53dbb5723f88107
2016-07-02 22:53:48 +02:00
Translation updater bot 74ae72127b Localisation updates from https://translatewiki.net.
Change-Id: Ia1e6b8ee17e969247ae3ebc9864e101f35578a64
2016-07-01 23:26:02 +02:00
jenkins-bot 76fada71ce Merge "Workaround for display of SVG images in Safari" 2016-06-29 18:52:06 +00:00
jdlrobson 7d51ce9bb4 Workaround for display of SVG images in Safari
Tested in IE9 and Safari. It seems in Safari the mixture of jQuery
and setAttributeNS causes issues.

Bug: T138430
Change-Id: I4bc63da18d008487d0c8f7b906688e4c8c809efd
2016-06-29 17:59:20 +02:00
Translation updater bot 5343a9435e Localisation updates from https://translatewiki.net.
Change-Id: I91f6b653048c68b3f5f02542281c9a2742c28a2d
2016-06-26 14:19:54 +02:00
Translation updater bot 4b20fcffb2 Localisation updates from https://translatewiki.net.
Change-Id: I7e824ccbd4a751aa2d6d841247ae54d8e44ed4c3
2016-06-25 14:55:08 +02:00
Volker E bc62902f4f Align Hovercards' Less to Coding Standards
Aligning Hovercards' Less to Coding Standards and also variablize
`linkpreview-title` font-family.

Change-Id: I11f2d71ce50dcd0fe47f3c5c528779e29a81cbc6
2016-06-24 16:23:16 +02:00
Baha 827e1dbeb2 Detect whether NavPopups gadget is enabled before showing a hovercard
Before this change we only used to check whether NavPopups gadget is
enabled once per page load. The premise was that we could figure out
whether the gadget was enabled easily given the module name. Since
the gadget module name can be different on diffirent wikis, that
solution would not scale.

With this change we check whether the gadget is enabled before each
hover over an eligible link. We rely on the existence of the global
`window.pg` object. The existence of the object means that the
gadget is enabled, thus we do not show Hovercards.

Bug: T135628
Change-Id: Ica154dd3bfd913202a8b558ea4b10ad177176f83
2016-06-07 17:39:58 -04:00
jdlrobson 7975fde745 Remove the need for global mw.popups.triggers
Change-Id: Iec1dd93a83fe393bd8717884ab4bab692ad7b6f4
2016-06-06 09:30:54 -04:00
Translation updater bot f1bd3a4ee0 Localisation updates from https://translatewiki.net.
Change-Id: I95cb233af5daebda4eb0774e7fbaa6834e0e33dc
2016-06-05 22:22:29 +02:00
Translation updater bot 1b7feeeccd Localisation updates from https://translatewiki.net.
Change-Id: I21762a5058c532daebedbbfdfe764cd7d8c3d411
2016-06-04 22:24:18 +02:00
Translation updater bot 950810ef92 Localisation updates from https://translatewiki.net.
Change-Id: Id2c1dea83c4b7c2fa9a17c2c0bdc1748a9ad09b3
2016-06-03 23:22:13 +02:00
jenkins-bot 9f91cd6d3c Merge "Correctly log the 'dismissed' action when hovering over another link" 2016-06-03 11:08:02 +00:00
Baha 049ae039a7 Do not show Hovercards when NavPopups gadget is enabled on huwiki
This is temporary fix to get Hovercards not to show up when
Navigation Popups gadget is enabled on huwiki. The gadget module is
named 'ext.gadget.latszer' and not 'ext.gadget.Navigation_popups'.

Also check whether the global 'pg' variable is created, which means
the Navigation Popups gadget is enabled.

Bug: T135630
Change-Id: I35e1b911967200bfdfd8f44ad4e4b8dcfd844ee7
2016-06-02 17:57:04 -04:00
Baha a8e8ca489f Correctly log the 'dismissed' action when hovering over another link
Unlike what was previously implemented, this patch does not care whether
the user hovers over another link while dismissing the popup.
The `dismissed` action is correctly logged in these cases too.

Bug: T136649
Change-Id: I68473cb8b66bae53213bce186345ca1ce436573f
2016-06-02 15:24:31 -04:00
Translation updater bot ecdf80877a Localisation updates from https://translatewiki.net.
Change-Id: I3cf16348f28391ce25c524466be68315bfefd2a9
2016-06-01 23:13:12 +02:00
jdlrobson dedb61caf9 Drop support for non-SVG browsers
According to caniuse.com SVG support is available
from IE > 8, Firefox > 3, Safari > 3.1 and Android
> 2.3. Android 3-4.3 does not support masking.

Out of all these browsers, considering market share
and ResourceLoader support, none of these browsers
are of concern to us. In IE8 for example we do not
run JavaScript for our end users. Thus we should remove
this fallback support.

Changes
* Remove createImgThumbnail method and its test
* Groups duplicate CSS groups
* Refactor createThumbnail function
** Leave a FIXME on some curious code

Change-Id: I59ac2e320b2e07815bc4136d5942016fdc1d4340
Bug: T135554
2016-05-31 15:23:07 -07:00
jdlrobson 6178781c43 Do not unnecessarily expose private variables
article.surveyLink, article.SIZES and currentRequest do not need to be
globally available on mw.popups.render object. They can be local variables.

Similarly openTimer and closeTimer should not be public APIs.

Changes:
* Add an abort method for purpose of aborting existing requests.

Change-Id: Ic2add9c611990bf80e8b80ab154563f6551a77ea
2016-05-31 16:25:03 -04:00
jdlrobson 765aa40cc1 Replace use of jStorage with mw.storage
Use the standardised MediaWiki storage system for the simple use
case of disabling/enabling Popups. The jStorage library is 12kb
uncompressed and cannot be justified for this usage (and if it becomes
the standardised library mw.storage will begin using it)

This means that browsers with full localStorage or no localStorage
support will not be able to disable Popups. Given the current ecosystem
of the web - localStorage is widely supported - and the fact that grade
A browsers enjoy localStorage support - this is not a problem.
See https://github.com/wikimedia/mediawiki/blob/REL1_27/resources/src/startup.js#L59

Changes:
* Stop using jStorage
* Cleanup and migrate previous values in jStorage with plan for removing this
in a month.

Bug: T136241
Change-Id: I6dac2911e84d6cb20731be34add01576cf407c46
2016-05-30 12:30:38 -07:00
jdlrobson feb0c76381 Render settings via template
This improves readability and separates the HTML from the
JavaScript

Change-Id: Ib765d78890b9aeb05940df00160790b01751a36b
2016-05-30 10:49:17 -07:00
Baha 017cb24d4a Disable Popups when the Navigation Popups gadget is enabled
Bug: T135628
Change-Id: I788932d169d6940e8f9d5112f973b24c76fa856b
2016-05-27 09:16:54 -04:00
jenkins-bot 269ad09c27 Merge "Use exchars instead of exsentences for the extract" 2016-05-26 18:21:24 +00:00
Joakin ea072139df Use exchars instead of exsentences for the extract
To avoid sentence parsing bugs in other languages.

We have to artificially remove the always-added ellipsis from textextracts to
mimic previous behavior, and we'll add ellipsis via CSS afterwards.

Bug: T135824
Change-Id: Idf27f2fd18f7197e588c609eeb62ac8fc80626d7
2016-05-26 19:00:11 +01:00
jenkins-bot d0e4fe1a54 Merge "Update mediawiki_api gem to 1.7.1" 2016-05-26 13:11:51 +00:00
jenkins-bot 0071ea9fc6 Merge "Send dwelledButAbandoned action for links when popups are not enabled" 2016-05-26 12:31:02 +00:00
Baha dee5f7470e Send dwelledButAbandoned action for links when popups are not enabled
This action was sent correctly when popups are enabled, but not when
disabled. This commit sends this event also when popups are disabled
so that we are able to compare the metric with popups enabled vs disabled.

Additional changes:
* Chain events in resources/ext.popups.targets/desktopTarget.js
* Add a separate property to the list of defaults and fix formatting.

Bug: T131315
Change-Id: I426f0a1a735b8fe6b16f3d2695d9099dd0d0469b
2016-05-26 11:57:42 +00:00
Gergő Tisza b19cadfaf4 Update mediawiki_api gem to 1.7.1
Required for selenium test compatibility with AuthManager

Bug: T135884
Change-Id: I1f4055590849939c4dfa7ff5babd5d768397defb
2016-05-26 01:34:35 +02:00
Baha 107d6edd37 Fix float on wikis with long settings messages
* Remove floats;
* Get rid of margin collapsing so that the space is easy to understand;
* Fix invalid rules.

Bug: T135629
Change-Id: I3bfaf137e4d02f0dc809c809edac9b28cb4bdc3a
2016-05-25 16:20:39 -04:00
Baha aba43fd560 Switch to Schema:Popups revid 15597282
Bug: T131315
Change-Id: I2ed18e00afb3e355327b417e68e5930b46d49086
2016-05-24 14:26:46 -07:00
Ricordisamoa 058b863304 Unswap langcode and langdir variables in popup.mustache
Broken by commit 27d811a173

Bug: T135758
Change-Id: Ia9b92b4c91e54f921ad220b7818af6f245e29b61
2016-05-20 07:24:18 +02:00
Sam Smith 41dc6d396a Conditionally enable Popups
Changes:
* Disable the desktop target by default
* If the user is in the experiment condition, then enable the desktop
  target
* Add PopupsExperiment config var, which, if set to true, causes: the
  experiment config to be added to the output as config vars, as well as
  the ext.popups.desktop Resource Loader module

Bug: T132604
Change-Id: Ia71ca924c3e2ec2ee0b0191ea2573fa7ff5e8a7e
2016-05-19 23:47:02 +00:00
Sam Smith c4667fd133 Convert isUserInCondition from async to sync
As there are an unmanageable amount of synchronous checks of
mw.popups.enabled, convert mw.popups.experiment.isUserInCondition to a
synchronous method.

Follow on I4959749.

Bug: T132604
Change-Id: Ide07e62868c77bfcd78af58dcec7303a35a72157
2016-05-19 14:06:17 -07:00
Sam Smith e9ddc8328d Handle user explicitly enabling/disabling feature
Follow on I4959749.

Bug: T132604
Change-Id: I4e6780f17b0423823295be9410a4343150e1e562
2016-05-19 19:10:53 +01:00