Commit graph

2015 commits

Author SHA1 Message Date
Prateek Saxena 898648dfa2 settings: Use mw-ui-progressive instead of progressive buttons
Bug: T146923
Change-Id: I35078d5f61afb368ff3fc37e2f9cf0986bed2294
2016-09-29 18:47:00 +05:30
jdlrobson f974a024f4 Clicking a Hovercards legible link should close popup
A click event is used to capture links that may be clicked via
the keyboard.

Bug: T143051
Change-Id: Ifd6f75c2a53d8d7b5ef9fd3f232f85b55eea24c8
2016-09-23 21:01:50 +00:00
jdlrobson 9f92324b4d Dismiss event should not be tied to render method
The dismiss event is currently a side effect of closing a popup.
This should be more closely coupled with the event that causes it.

This allows the closePopup method to be called without trigging
an event which is a necessary precursor to closing popups when
navigating away from the page.

Change-Id: I3f3c4780cc31dc8d84cdd76df2c77fa45fbea882
2016-09-23 20:56:46 +00:00
jdlrobson 25fabbf5f4 Hygiene: Only allow calls to closePopup on an active link
Change-Id: I7c15870e1586aa8629af723accad67dee5483369
2016-09-23 20:27:41 +00:00
jdlrobson 5a226ebd39 Hygiene: Add set and get methods for active link
Named functions help explain to a reader and reviewer what the code
is actually doing.

Change-Id: I1d059c9270fd2298285fa5e4e52e403a06f35503
2016-09-23 11:01:21 -07:00
jdlrobson da5d61e485 Improve documentation for render methods
The parameter types are incorrect and this leads to confusion
Use $ prefix for $link parameter to make clear it is a jQuery.Object

Change-Id: I3f98f3729cd06aedd791e7503233082c1402dc95
2016-09-22 15:28:57 -07:00
jenkins-bot 5520c6c4ac Merge "Merge mw.popups.experiment into mw.popups.core" 2016-09-21 22:31:39 +00:00
jenkins-bot 98d76e2591 Merge "Minor refactor - use named function for wikipage.content hook" 2016-09-21 21:34:28 +00:00
jdlrobson 523213466e Minor refactor - use named function for wikipage.content hook
The handler for the hook `wikipage.content` was long
and undocumented but is a crucial piece of code.

To make it a little easier for people not so familiar with the code
to find this code and understand what it does I've pulled it out into
a named function.

Change-Id: I3ada53e135dea7dc6846440999b0d42285e14013
2016-09-21 14:23:25 -07:00
Sam Smith 0b2961c318 Merge mw.popups.experiment into mw.popups.core
ext.popups.experiment depends on .core as it initialized the mw.popups
namespace and .core depends on .experiments for
mw.popups#getEnabledState.

By merging the experiment module into core, we can eliminate any
circular dependencies.

Changes:
* Move ext.popups.experiment.js code into ext.popups.core.js
* Remove mw.popups.experiment module and any references to it

Note: ext.popups.experiment.test.js was left in its own file for cleaner
QUnit module setups and easier removal later. I'm not entirely happy
with doing it this way, but I'm not sure changing the mw.config within
the mw.popups.core QUnit module is worth merging the files.

Bug: T146035
Change-Id: I1f024567010acaa61c1d613c6e59c998198a5976
2016-09-21 16:43:49 -04:00
joakin 8f001ee4bd Respect beta feature flag for logged in users
Both in active and inactive state (not just active like before).

Bug: T146017
Change-Id: Ieb4cd39c2870fb701cabd0f1d01c0ab42b6ebe78
2016-09-20 17:48:39 +02:00
jhobs c9c82828d0 EventLogging sampling rate should default to 0
The EventLogging sampling rate should be set in the wiki config.

Bug: T136746
Change-Id: I7a954edf00e56b426f94f39d39c19cbc338186d6
2016-09-16 12:27:58 -04:00
joakin d0d10f51bb Update Schema to the last version
Which has updated docs about the min dwell interaction time.

Everything else stays the same.

See https://meta.wikimedia.org/wiki/Schema:Popups

Bug: T145379
Change-Id: Iae5da98cfc3f2290aa93aa04effab016b5d700b4
2016-09-14 14:52:33 -04:00
joakin 9787f515d0 Log all dwelledButAbandoned events
Extract the minimum interaction time of dwelledButAbandoned events to
a unique place: mw.popups.render.DWELL_EVENTS_MIN_INTERACTION_TIME

Lower that interaction time to 0 so that all dwelledButAbandoned events
are logged.

Bug: T145379
Change-Id: Id68183367966b9f0d52e0cd570cab64671a3e87e
2016-09-14 14:50:39 -04:00
joakin eb852cacd5 Fix enabling/disabling browser tests
features/popups_settings.feature:33 seems to fail because of quick
interactions after disabling+enabling hovercards.

Setting a sleep 1 after disabling and enabling hovercards (to allow the
page to start refreshing) makes the tests more resilient

Bug: T145152
Change-Id: Iaf66aaf0e2c4f8e55419d22889f91a02891e49a1
2016-09-14 16:42:56 +00:00
Alex Monk 5574c98628 Follow-up I6dac2911: ext.popups.core depends on mediawiki.storage
To stop TypeError: Cannot read property 'get' of undefined in
Object.mw.popups.getEnabledState

Change-Id: I8fb648e1e6a4921ba04752a4314cb5937485ac01
2016-09-08 17:40:01 +01:00
Translation updater bot 5180dd6de3 Localisation updates from https://translatewiki.net.
Change-Id: I99980fd55da0e826c25fd83a1e51e8229c57792b
2016-09-07 22:45:35 +02:00
Translation updater bot 1a708bd6db Localisation updates from https://translatewiki.net.
Change-Id: I1f6c36f0939d89ae2e8949fbf62b3bf1b50fca69
2016-09-04 00:23:59 +02:00
Translation updater bot 010b0417a8 Localisation updates from https://translatewiki.net.
Change-Id: If89d2beaae917e4488010f41462fbea241f1fb30
2016-09-01 23:26:35 +02:00
jenkins-bot 994b14c16b Merge "Do not log the click event multiple times" 2016-08-31 10:29:32 +00:00
Translation updater bot 023943eb8a Localisation updates from https://translatewiki.net.
Change-Id: Ib0e278269b8be88671ad06851a4a1c1273349221
2016-08-29 22:38:41 +02:00
Baha 1d71b3d9bd Do not log the click event multiple times
When hovercards are off clicking of a link will log the click
event as many times as you hovered over the link prior to clicking.
To prevent this, stop listening to old events before listening to
new ones.

Bug: T143805
Change-Id: I3e0dd2d1f259cdadfd3e02c67a137697540ca955
2016-08-29 14:33:21 -04:00
Translation updater bot fb0306469f Localisation updates from https://translatewiki.net.
Change-Id: I4bcf2a8b62dd041a8df58aa5e0d0e6bffe342410
2016-08-28 22:40:43 +02:00
Translation updater bot 004c645ea3 Localisation updates from https://translatewiki.net.
Change-Id: I5479769f1ddae50be5cf209dada6df32c4b63e6e
2016-08-25 22:38:22 +02:00
Translation updater bot ff4281cdb7 Localisation updates from https://translatewiki.net.
Change-Id: Ifb81ddd701006c210a56effdf325843cc4d89302
2016-08-24 22:38:10 +02:00
Translation updater bot a4ec6b28f0 Localisation updates from https://translatewiki.net.
Change-Id: I47c2c106b2420d8be756b984acdafa0b24dd5e0d
2016-08-24 10:35:37 +02:00
Translation updater bot 053d9c14ac Localisation updates from https://translatewiki.net.
Change-Id: I37a82774677bdf89c20bebdf9bcdce383f8ae375
2016-08-21 22:53:58 +02:00
Translation updater bot 06081b13e8 Localisation updates from https://translatewiki.net.
Change-Id: I1cdcd4551a016dc81a9c8892b67ad01a42762aa0
2016-08-19 22:41:58 +02:00
Translation updater bot dabbadf956 Localisation updates from https://translatewiki.net.
Change-Id: Ib2a6a9ab41f5ebdb69152bcd54f3c2166e4ad125
2016-08-17 22:40:47 +02:00
jenkins-bot 193b8dd9f3 Merge "Remove jQuery.jStorage shim" 2016-08-16 23:00:27 +00:00
Translation updater bot c8f5002792 Localisation updates from https://translatewiki.net.
Change-Id: I2c92576c2ce4602e024f8f65c740677f16a4ce2d
2016-08-16 22:44:37 +02:00
Sam Smith 0ad88a2416 Remove jQuery.jStorage shim
Per the FIXME above, it should've been removed midway through June.

Bug: T136241
Change-Id: I10723f9067c2573786270cd40fe012adb8c19c8b
2016-08-16 13:47:05 +01:00
Translation updater bot fb0e580d01 Localisation updates from https://translatewiki.net.
Change-Id: I1b7c1c0c58d1e5a2afd02e375e515e75fb27f6be
2016-08-15 23:01:03 +02:00
Translation updater bot defed308a5 Localisation updates from https://translatewiki.net.
Change-Id: If0dd533cce1d247d9c699b4490f63977bb1de39b
2016-08-14 22:29:03 +02:00
Translation updater bot dc191edb0b Localisation updates from https://translatewiki.net.
Change-Id: Iee8a7960a52ab499ada125ef265407cbc7a990e3
2016-08-12 23:14:12 +02:00
Translation updater bot 974368b396 Localisation updates from https://translatewiki.net.
Change-Id: Ie3173d98adb0f24fecc1b1025f853158fa28bc1c
2016-08-11 23:57:14 +02:00
jhobs 672e67d7fc Fix settings dialog layout on IE
Bug: T138612
Change-Id: I6f530c12dd498705b1797faf820cb5e620c81853
2016-08-11 15:42:15 +00:00
Translation updater bot 988beaa221 Localisation updates from https://translatewiki.net.
Change-Id: I90fda465bf198a74c6a255f3fd8f9d037b0fbdc5
2016-08-10 22:38:42 +02:00
Volker E 0282b9648f Hovercards: Improve layout of settings dialog to design spec
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
2016-08-10 14:01:36 -04:00
Translation updater bot b7962f1c6a Localisation updates from https://translatewiki.net.
Change-Id: I3adec844baa83c4b4f39406249ff0e48ba906dcf
2016-08-02 22:44:50 +02:00
Translation updater bot 644dd27c92 Localisation updates from https://translatewiki.net.
Change-Id: Ic03eec88517f484b46b53a82c5fbc8207edef359
2016-07-30 22:29:54 +02:00
Translation updater bot c4dbbeb2e2 Localisation updates from https://translatewiki.net.
Change-Id: I7fb926a6c2d60e196b4c791171e90a4ab2fbf94c
2016-07-26 22:55:00 +02:00
jenkins-bot f8fe21ab4e Merge "Use Schema revision 15777589 for logging events" 2016-07-25 09:12:08 +00:00
Translation updater bot 4ab4827bfb Localisation updates from https://translatewiki.net.
Change-Id: I5b84d706c03de634dec1a47680f7e292412c04c9
2016-07-23 22:27:17 +02:00
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