Commit graph

1299 commits

Author SHA1 Message Date
Piotr Miazga 8510b4b942 Allow 3rd party to check Popups enabled state by accessing mw.popups object
Changes:
 - introduced js module defining mw.popups object
 - introduced isEnabled() method which checks the redux store to retrieve
 isEnabled status

Bug: T171287
Change-Id: I523369831e2aa8a915ed1cb001b35d13b770f9da
2017-08-08 15:38:01 +02:00
jenkins-bot 2296b3578e Merge "Use EcmaScript modules instead of common.js modules" 2017-08-07 22:13:51 +00:00
Translation updater bot f7663e1f4b Localisation updates from https://translatewiki.net.
Change-Id: I61a1e991109785beaa8bd2176d6c49005f790685
2017-08-07 23:00:38 +02:00
Antoine Musso b60eedc8da build: drop grunt-cli
grunt 1.x now includes a CLI command, hence grunt-cli is no more needed.

Change-Id: I94f0c66236b5f0f12220741276c7fe24a89c65e0
2017-08-01 10:47:44 +02:00
joakin e6081106f1 Use EcmaScript modules instead of common.js modules
Why: Because they are the approved standard by TC39 and Ecma for
JavaScript modules.

Changes:
  * Wrap mw-node-qunit in run.js to register babel to transpile modules
    for node v6
  * Change all sources in src/ to use ES modules
    * Change constants.js to be able to run without
      jQuery.bracketedDevicePixelRatio given ES modules are hoisted to
      the top by spec so we can't patch globals before importing it
  * Change all tests in tests/node-qunit/ to use ES modules
  * Drop usage of mock-require given ES modules are easy to stub with
    sinon

Additional changes:
  * Rename tests/node-qunit/renderer.js to renderer.test.js to follow
    the convention of all the other files
  * Make npm run test:node run only .test.js test files so that it
    doesn't run the stubs.js or run.js file.

Bug: T171951
Change-Id: I17a0b76041d5e2fd18e2d54950d9d7c0db99a941
2017-07-31 23:05:44 +00:00
Volker E eebf17ac3f Remove obsolete vendor prefixed properties and at-rules
Opera 12.10 supported unprefixed animations, gradients, transforms &
transitions. See http://www.opera.com/docs/changelogs/unified/1210/
Removing support for Opera 12.0x versions.

Change-Id: I3476db173433c430f654e12ea1f17d2721410b83
Depends-on: Ie8edbcd7f85c713ea2156706ea3a3a7b423d8d9d
2017-07-31 21:39:42 +02:00
joakin 02507fb74d Hygiene: Move settingsDialog UI code to ui/
Bug: T171951
Change-Id: I58f77737456e1f4b9db6631f83e4b0f14212c939
2017-07-31 19:14:18 +00:00
joakin eb877a4af5 Deps: Upgrade mw-node-qunit
Version 2.1.0 had a bug because of using console.err, obfuscating error
messages when the cli runner errored out.

Bug: T171951
Change-Id: I263c3e4e13f55cf67630448119ff335e26085197
2017-07-31 19:14:08 +00:00
joakin 31fa60d32c Hygiene: Move ui renderer.js to ui/ folder
Seems appropiate to group the UI portions of the source under a ui
folder.

Bug: T171951
Change-Id: I6d4317abea4e2a8e273e13fc40a7445bb54628ef
2017-07-31 19:11:41 +00:00
jenkins-bot 91f1ca6bbc Merge "Disable Previews on blacklisted pages" 2017-07-31 18:18:14 +00:00
Baha 29770a3ff7 Disable Previews on blacklisted pages
Introduce a config variable `PopupsPageBlacklist`. Previews code won't
be shipped to pages listed in the config variable.

Bug: T170169
Change-Id: Ia8342b55c682f444ba79e959dcc1180527a31374
2017-07-31 09:10:30 -04:00
Antoine Musso 46e0d7cdbe Define npm peer dependency explicitly
npm 3 requires dependencies to be explicitly defined.

Bug: T172094
Change-Id: Ic640ccf0f577e47036d473892522ea758014fab4
2017-07-31 13:31:35 +02:00
jenkins-bot dd7ef3b215 Merge "Hygiene: i13n: Return false over not sampling" 2017-07-28 12:44:57 +00:00
Translation updater bot 81c0476601 Localisation updates from https://translatewiki.net.
Change-Id: I77d7688e2fe86828e4fad0c9e34d6e66c6651f2e
2017-07-27 23:14:20 +02:00
Sam Smith ba3c0b7f76 Hygiene: i13n: Return false over not sampling
Previously, if the browser didn't support the Beacon API, then
instrumentation/eventLogging#isEnabled would bucket the user with a
sampling rate of 0, which is equivalent to returning false. This change
simply does the latter.

Additional changes:
* Update the documented module names of the instrumentation/eventLogging
  and statsv modules.

Bug: T168847
Change-Id: I7ae5c10da42ca614b5b1a6619f9555e5665344cf
2017-07-26 17:06:58 +00:00
jenkins-bot 6ef2816fbd Merge "Hygiene: Dependency Injection for Popups" 2017-07-26 16:28:34 +00:00
Translation updater bot aafe4b8080 Localisation updates from https://translatewiki.net.
Change-Id: Ia5d7849f66ac5b3150ee39da1eb35d320b7f2d36
2017-07-25 22:37:54 +02:00
Piotr Miazga 3d0c5b1cc3 Hygiene: Dependency Injection for Popups
Changes:
 - removed ugly PopupsContext::getInstance
 - removed ugly PopupsContextTestWrapper helper
 - defined all services inside ServiceWirings
 - fixed unit tests to test classes directly or use MediawikiServices

Change-Id: Ie27e28bb07aebe01014848c290369b1b1f098e9b
2017-07-24 22:41:28 +00:00
Translation updater bot 7431854374 Localisation updates from https://translatewiki.net.
Change-Id: Iabeb98f756b4f7c631150cce5a1eae78fdada75c
2017-07-24 23:09:54 +02:00
Sam Smith 8e00ecc5d1 i13n: popupEnabled = false for disabled event
... for consistency with the server-sent disabled event introduced in
I63faecb0.

Bug: T167365
Change-Id: I3a96df5279f6f0f4e573765735ab0e1fc6f406a8
2017-07-24 17:31:59 +00:00
jenkins-bot 12a1a7201e Merge "Hygiene: Update required MediaWiki version" 2017-07-24 16:02:08 +00:00
Piotr Miazga 4bc3aeeaa0 Hygiene: Update required MediaWiki version
Per I28003c5898d64031e1efb212cb0bec58ff44b958 Popups require at least
MediaWiki version 1.30. Documentation should respect that

Change-Id: Ifc87ac5cdcf61ae54cefe3f6ccab7aac5c52e0a6
2017-07-24 16:12:03 +02:00
Kunal Mehta 9dfa3e5ee5 build: Updating mediawiki/mediawiki-codesniffer to 0.10.1
Change-Id: I835fadf053efea56a3037d7b64af8feca12f9c0f
2017-07-23 00:35:36 -07:00
Translation updater bot d07bed3093 Localisation updates from https://translatewiki.net.
Change-Id: If65162a748e28fcf8b10272fd1b92b5a2eb3aeb6
2017-07-21 22:47:38 +02:00
Translation updater bot da667c980d Localisation updates from https://translatewiki.net.
Change-Id: Ib04f86edaae0ffccfc9a1a999079452f58e94f06
2017-07-20 22:56:14 +02:00
Translation updater bot d1513da942 Localisation updates from https://translatewiki.net.
Change-Id: If257ec909d3ad8e73276cc05057ce2abe297faa0
2017-07-18 22:58:58 +02:00
Translation updater bot 18821a70a1 Localisation updates from https://translatewiki.net.
Change-Id: I8e6b34d20712fe13429898e2d88c16301df594cd
2017-07-17 22:59:54 +02:00
Piotr Miazga c0052fcb08 Re-enable MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic sniff
Bug: T168384
Change-Id: I4d4681121df974a8471d7c4c8df8a6158f8df22a
2017-07-13 21:14:29 +02:00
jenkins-bot 8ea2211719 Merge "Re-enable MediaWiki.Commenting.FunctionComment.MissingReturn sniff" 2017-07-13 17:42:22 +00:00
jenkins-bot 22d9ef3e24 Merge "Re-enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment sniff" 2017-07-13 17:42:21 +00:00
Piotr Miazga 75ef7c4f93 Re-enable MediaWiki.Commenting.FunctionComment.MissingReturn sniff
Bug: T168384
Change-Id: I8d7b750503ca9c951267a948862c3685ea036100
2017-07-13 15:47:00 +02:00
Piotr Miazga 5b62bc625b Re-enable MediaWiki.Commenting.FunctionComment.MissingParamTag sniff
Changes also solve the MediaWiki.Commenting.FunctionComment.ParamNameNoMatch
sniff

Bug: T168384
Change-Id: Idd80e42943a57a4b6211c50a4aac2f1d20e6232d
2017-07-13 10:43:00 +00:00
Piotr Miazga b8e7a79a20 Re-enable MediaWiki.Commenting.FunctionComment.MissingParamComment sniff
Bug: T168384
Change-Id: I8b29f0ec6804e24ea4d61fb1bf1a528dddaf8fb8
2017-07-13 11:33:04 +01:00
Piotr Miazga 18b6675b4a Re-enable MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment sniff
Bug: T168384
Change-Id: Id64269f5950d6da5fee3f18825ce2d713d0446b0
2017-07-12 22:44:12 +02:00
jenkins-bot 311466cad0 Merge "Send disabled event when user disables Page Preview" 2017-07-12 14:16:36 +00:00
Piotr Miazga 8bba8c1417 Send disabled event when user disables Page Preview
Changes:
 - introduced new UserPreferencesChangeHandler class that listens to
 PreferencesFormPreSave hook
 - introduced wrapper for EventLogging extension plus NullLogger when
 EventLogging extension is not availalbe
 - when user changes PagePreview to disabled system will trigger
 disabled event

Bug: T167365
Change-Id: I63faecb0495eb30a9fc2763e7ddf3944baf7f55a
2017-07-12 15:59:42 +02:00
Translation updater bot 0fb8f5a65a Localisation updates from https://translatewiki.net.
Change-Id: I61de05da6e1679a12952612b7aba25c7cb59d9e5
2017-07-11 22:58:31 +02:00
Translation updater bot fa04af56c6 Localisation updates from https://translatewiki.net.
Change-Id: I1a6585835a1721ba30f7e23a2f7c634950a268fd
2017-07-08 00:18:40 +02:00
Translation updater bot 83aecd60b7 Localisation updates from https://translatewiki.net.
Change-Id: I40de42b4bb595fff4074f95766cd05e078c24fba
2017-07-06 22:55:34 +02:00
jenkins-bot 59290bcf4a Merge "Remove duplicate events filtering" 2017-07-06 18:05:18 +00:00
jenkins-bot eebd0c5e8b Merge "Send disabled event from settings windows" 2017-07-06 18:05:17 +00:00
Piotr Miazga 426356e822 Remove duplicate events filtering
We had instrumentation for over 4 weeks and duplicate events rate
was very low. We want to keep stats so we check the duplicate events
rate but there is no need to filter those.

Bug: T167365
Change-Id: I72585beb21e9db589e45eeace657ef25f432abc9
2017-07-06 17:38:42 +02:00
Translation updater bot caec0a85b5 Localisation updates from https://translatewiki.net.
Change-Id: I954cca0dba2970339111682f70a6014023a61c27
2017-07-05 22:37:47 +02:00
Translation updater bot ef058cacc4 Localisation updates from https://translatewiki.net.
Change-Id: I5c82f25ce87124ad5d64d7052e77c9b459dbb06e
2017-07-04 22:42:26 +02:00
Piotr Miazga 7e2c79ae0d Send disabled event from settings windows
Changes:
 - introduced new event 'disabled', sent from settings popup
 - added unit tests for 'disabled' event handling

Bug: T167365
Change-Id: I048b38122b8843199c86fd1ed9ec2ff21767e114
2017-07-04 19:08:37 +02:00
Amire80 9df91fd043 Change "article" to "page"
This is the usual practice in MediaWiki extensions,
for consistency among wikis where pages are
not necessarily articles.

Change-Id: I25d8ccb9090c31e4672998c8a01ebdfcaf625e9f
2017-07-04 07:15:44 +03:00
jenkins-bot 6a1176c0d2 Merge "Enforce no top&bottom margins on lists on page previews" 2017-07-03 13:52:28 +00:00
jenkins-bot 4f9ad4d0a7 Merge "Override eventLogging to enabled when debug flag is on" 2017-07-03 11:54:56 +00:00
Kunal Mehta e7ac7f0b7d build: Updating mediawiki/mediawiki-codesniffer to 0.10.0
Change-Id: I5c8aaff0ed7b9eef97db7e22188212e37ee3beb1
2017-07-01 01:40:13 -07:00
Translation updater bot 82ee8e990a Localisation updates from https://translatewiki.net.
Change-Id: If9ba575dec354efce94bb24dc52ad3a9a6d5ad63
2017-06-30 23:34:00 +02:00