Improving Hovercards' settings dialog to fulfill design specification.
Also fixing HTML structure by removing invalid `radiogroup` element and
adding missing `</div>` element, fixing related QUnit test.
Changes:
* Add close icon instead of using text
* Style header as a table for alignment
* Remove redundant "OK" button and have it replace "Save" instead
* Update text of "OK" button to "Done"
* Fix description for translation of "Done" button
* Fix qunit and selenium tests
* Remove unnecessary markup and less
* Add mediawiki-ui-button and mediawiki-ui-icon dependencies
* Shrink dialog width some per design spec
* Fix dialog horizontal position calculation to remove hard-coded value
Bug: T138612
Change-Id: I7395e3438836149becdd576942bdaf6f21b4163f
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
* Change labels in English for settings options
* Update description for enable option
* Remove description for disable option
Bug: T138233
Change-Id: Id23dcc7b7e655f7939bb2e455b8680ed5a2c6331
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
Tested in IE9 and Safari. It seems in Safari the mixture of jQuery
and setAttributeNS causes issues.
Bug: T138430
Change-Id: I4bc63da18d008487d0c8f7b906688e4c8c809efd
Aligning Hovercards' Less to Coding Standards and also variablize
`linkpreview-title` font-family.
Change-Id: I11f2d71ce50dcd0fe47f3c5c528779e29a81cbc6
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
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
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
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
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