Commit graph

1723 commits

Author SHA1 Message Date
Translation updater bot a449690dc9 Localisation updates from https://translatewiki.net.
Change-Id: I0b29750b8ff5e3d782a624f044e2a0614ba4a84c
2018-09-23 10:27:15 +02:00
Translation updater bot 4e944dd48a Localisation updates from https://translatewiki.net.
Change-Id: I38cd3f2a08316535e0bef7d668454e13f7131d5d
2018-09-22 10:03:50 +02:00
Fomafix 5b6fe60407 Do not use jQuery's hasClass with space separated classes
A parameter with space separated class names is not specified in
https://api.jquery.com/hasClass/

Change-Id: I1b44215115a3e51319c042f0f20547cff640ab52
2018-09-21 08:20:12 -06:00
Translation updater bot f0d59dfcc1 Localisation updates from https://translatewiki.net.
Change-Id: I4d566c9607214a7f87528eca7da613b83c49f0f8
2018-09-21 10:35:20 +02:00
jenkins-bot e4af99f94f Merge "Simplify JavaScript by using native ES5 instead of jQuery" 2018-09-18 17:24:15 +00:00
Fomafix ae472fe689 Simplify JavaScript by using native ES5 instead of jQuery
jQuery.isFunction is deprecated since jQuery 3.3.
https://blog.jquery.com/2018/01/19/jquery-3-3-0-a-fragrant-bouquet-of-deprecations-and-is-that-a-new-feature/
A simple thruthy check suffices here.

Also make the parameters of isValid mandatory.

Change-Id: Ief595dd3304016011cf6df1ffbe88cd51d4ec9ea
2018-09-18 10:08:34 -07:00
Translation updater bot 64f4980a27 Localisation updates from https://translatewiki.net.
Change-Id: I22812458182af0210fb47621e7fe80af54b155b2
2018-09-18 09:52:25 +02:00
Translation updater bot 18d8561a8d Localisation updates from https://translatewiki.net.
Change-Id: I596e6e20f1dc2053d9e8f8b8522222bc4491328a
2018-09-17 10:18:25 +02:00
Translation updater bot 812148fda9 Localisation updates from https://translatewiki.net.
Change-Id: I86eecb9c95110f2589cd8eb6d7b025f6ad1255c9
2018-09-15 09:54:32 +02:00
Translation updater bot e19e209f08 Localisation updates from https://translatewiki.net.
Change-Id: Ie3e5545f14ecbef39052935eb857adca9b979286
2018-09-13 10:15:57 +02:00
Volker E 567bd4176f Remove unique and misplaced italicized text from preferences setting
This is the first step, in a second after the OOUI rollout we should also
remove the paragraphs within the `label`, for appearance and HTML validation
reasons.

Bug: T203992
Change-Id: I4a12e4572ae2518079616e3765a5d3954aab794b
2018-09-12 15:44:10 -07:00
Translation updater bot 7c616db10b Localisation updates from https://translatewiki.net.
Change-Id: I7cc40e695817d96c3a31043fce7dc8d20aa6b82e
2018-09-12 09:19:08 +02:00
Ed Sanders c74d2e5313 build: Update linters
Bug: T202739
Change-Id: Ie3f68977598f46f7e12b216f8381b2e9dc6d83ad
2018-09-11 10:26:35 -07:00
libraryupgrader 5635d8863b build: Updating mediawiki/phan-taint-check-plugin to 1.5.0
Change-Id: Ia9c9cc3426d811d2b7341323f58d73479d5e9943
2018-09-08 04:56:41 +00:00
Translation updater bot 75139cf1df Localisation updates from https://translatewiki.net.
Change-Id: I6abcc9f17409dfc9ec29e5c91646b5e2fe1580f6
2018-09-07 09:03:00 +02:00
Antoine Musso 99d0092096 QA: add missing wdio-junit-reporter
tests/selenium/wdio.conf.js defines a Junit reporter but it is not
installed when running the suite directly from the extension.

Bug: T203591
Change-Id: Idf192506d0af01abbfea479223a3bbcfc5eef4ea
2018-09-06 16:08:44 +02:00
jenkins-bot ddc705c664 Merge "Selenium: add selenium-daily NPM script" 2018-09-06 08:20:04 +00:00
Stephen Niedzielski 16004549cf Doc: add linkInteractionToken description
Add documentation for the Schema:Popups' linkInteractionToken property
in the EventLogging reducer.

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

Bug: T203013
Change-Id: I7fc872beda284ef8639ad036ddeb9efc8581a452
2018-09-05 20:02:32 +00:00
jdlrobson 53d1a2c329 Use getPageviewToken api
Currently the Popups schema is disabled but if we were to re-enable
it, the page tokens would now be consistent with the ReadingDepth
schema

The getToken function is kept to allow generation of the
pageInteractionToken's relating to a link interaction, for which
there is no centralised API.

Additional changes:
* I've updated various tests to use the central mw.user stub to make
clearer where tokens come from.

Bug: T203013
Change-Id: If746bea5aeed2b4c192a9b8a02feb1fe06480633
2018-09-05 20:02:17 +00:00
jenkins-bot 14df0a587c Merge "Update package.json to ensure assets get built on every commit" 2018-09-05 19:50:42 +00:00
jdlrobson 04afdd4741 Update package.json to ensure assets get built on every commit
diffs now correctly output errors. This will pick up changes to
index.js and index.js.json that have not been committed

--exit-code is passed to ensure that if there are changes then an
error is thrown and the action is not allowed.

The dist folder became out of date as depending on what version
of node you run, the output is different.

To aid debugging, the script that checks the diff now outputs the
node version and the npm version. From now on, we will all have
to use the same node version to build assets.

This is annoying, but we will re-evaluate the approach we are taking
to build assets in T202743. We can easily work around this by all using
nvm and making consistent use of the same node version.

The assets have been rebuilt with the node version that CI uses.

Bug: T202748
Change-Id: I82aee879d4b04ca06447f95eb81230bfc24d20e9
2018-09-05 13:36:39 -06:00
Stephen Niedzielski 510577fcd3 Hygiene: add NVM config
Add Node Version Manager configuration file to simplify Node.js usage.

Change-Id: I6f4c0b5d0c52237af9f85a0b6508f7a30e51f296
2018-09-05 19:16:36 +00:00
Željko Filipin c578de27d8 Selenium: add selenium-daily NPM script
The script is needed to run the new Docker-based Jenkins job that runs daily and targets beta cluster.
selenium-test script and NPM packages are dependencies. selenium-daily now just calls selenium-test.

selenium-daily might seem redundant, but it provides flexibility. In case a
repository does not want to run all tests daily, that's easily fixed by updating the
selenium-daily script.

Bug: T188742
Change-Id: I35c93ff1897afc4b9e66703a1acf765e3fe7b643
2018-09-05 19:16:12 +00:00
Piotr Miazga df9e724d89 Fix failing isTranslatedTitleBlacklistedTest
Somhow the testIsTranslatedTitleBlacklisted start to fail, the test
looks like it's broken but because of some reason it used to work.
For now let me fix the test because it blocks merged, and later
I'll try to investigate whats wrong.

Changes:
 - testIsTranslatedTitleBlacklisted() has to define blacklisted
 pages in canonical way (eg: Special:Preferences, not in a language
 variant)
 - use MediaWikiServices::getSpecialPageFactory() as
 SpecialPageFactory static calls are deprectated

Bug: T203522
Change-Id: I0db1481c96c9c0e27364d028a57c1178865741ba
2018-09-05 21:04:52 +02:00
Translation updater bot 33a5cbce00 Localisation updates from https://translatewiki.net.
Change-Id: Idca2bb5ac6ac80be6e7531ba084503080bb2d193
2018-09-03 22:15:29 +02:00
libraryupgrader f9ea076bbc build: Updating mediawiki/mediawiki-codesniffer to 22.0.0
Change-Id: Ib7bfe61e9ce064e712d061f8360c88a7552c688d
2018-09-03 09:24:02 +00:00
libraryupgrader c03ebb6521 build: Updating mediawiki/phan-taint-check-plugin to 1.4.0
Change-Id: Id118b3d76cd1cdd11e4328309faf1705bb56e659
2018-09-01 13:16:51 +00:00
Translation updater bot bce353cd17 Localisation updates from https://translatewiki.net.
Change-Id: I02d381421068f24ba7bbaa36605bb17557748fca
2018-08-29 22:28:22 +02:00
Translation updater bot 7732202881 Localisation updates from https://translatewiki.net.
Change-Id: I34d8a1cc134898f2acfb18770f66884a694484be
2018-08-27 22:17:29 +02:00
Fomafix 27cfa1ce02 Start showing warning for deprecated PHP entry point
Change-Id: I01f3fd805b76c666eedc358d3c860248011622e4
2018-08-24 18:32:21 +02:00
Translation updater bot fb1dca8a37 Localisation updates from https://translatewiki.net.
Change-Id: I036eb03e4ff0861d93241f783e46fbc9b6cd6611
2018-08-23 23:26:18 +02:00
libraryupgrader be13e39358 build: Updating mediawiki/phan-taint-check-plugin to 1.3.0
And updating CoC link to use Special:MyLanguage (T202047).

Change-Id: I9ff0c587dc1807a9ee5424b11d09d74f5ef5fe00
2018-08-19 15:37:11 +00:00
Stephen Niedzielski 76195013be Doc: fix typo
Change-Id: I14fc469a735d8838f093fbd0b23e8f5235b4dfc9
2018-08-14 12:42:56 -05:00
Translation updater bot 9840679042 Localisation updates from https://translatewiki.net.
Change-Id: I242877cf49a66d3a96849a8ce4d96a62895d93b7
2018-08-13 22:14:49 +02:00
Translation updater bot 25eed1125e Localisation updates from https://translatewiki.net.
Change-Id: I19a154672c95492b016ce641dede646021f7b8d3
2018-08-10 22:18:54 +02:00
Nicholas Ray 6a25f70ad5 Use window.devicePixelRatio instead of deprecated jQuery.hidpi
jQuery.hidpi was deprecated by T127328
(https://gerrit.wikimedia.org/r/441614). This repo used the
"bracketedDevicePixelRatio" function from that plugin. Since browser
compatibility is good now for window.devicePixelRatio, this commit adds
a function which relies on that instead.

Bug: T198579
Change-Id: I56c234048d7741f12f35bfff5f7319c6e085c29f
2018-08-10 10:00:28 -06:00
jdlrobson a714eda573 Revert "Whole popup area should be clickable"
This change made it impossible to open links in new tabs.
Reverting so we can try again.

This reverts commit ff5bfd1d04.

Bug: T200940
Change-Id: I10a387df8bdeb891f8d8be0eb9075f0d324646b6
2018-08-08 21:26:07 +00:00
Volker E ed529488f8 Manually optimize & reduce SVG markup
Reduce and optimize SVG markup by
- removing unnecessary `id` attributes,
- lowercasing hex colors following code standard
- merging repeating `fill` attributes in `<g>` elements and
- following `<svg>` root element attribute sequence as anywhere else

Change-Id: I71df1df5fee0c363df41a996b5ec32d587b76f56
2018-08-08 17:09:15 +02:00
Stephen Niedzielski f96762880b Fix: viewBox in cog.svg and sad-face.svg
svgmin was removing this attribute from cog when the capitalization was
incorrect and sad-face never had it.

Bug: T185596
Change-Id: I980694f4a611ea8fd13d6c1419dbed6d49f4d94e
2018-08-08 09:19:55 -05:00
jenkins-bot 3d426ba630 Merge "build: Bring SVGO optimization to build step" 2018-08-08 11:03:01 +00:00
Umherirrender c65c1d9f95 Declare class fields in PopupsContext
Change-Id: If5754d49d4abdcd946e7958e22eede7d33008851
2018-08-07 09:48:23 +02:00
Translation updater bot c25209421d Localisation updates from https://translatewiki.net.
Change-Id: Ibb9eb6228a4965cfde9d9c020502d047da069e31
2018-08-06 22:22:26 +02:00
Kunal Mehta 0ae3a127d5 Configure phan-taint-check-plugin
The plugin checks and flags potential security issues (XSS, SQLi, etc.)
using static analysis.

See <https://www.mediawiki.org/wiki/Phan-taint-check-plugin> for more
details.

Bug: T201219
Change-Id: I307dc7848562ba7db9b0aca4085b135a314cd66f
2018-08-03 21:30:01 -07:00
Translation updater bot 2d56971b89 Localisation updates from https://translatewiki.net.
Change-Id: I3f5eb07a66353a889b4698ec374c60b35a07c9d8
2018-08-01 22:10:41 +02:00
Volker E f47e333ff1 build: Bring SVGO optimization to build step
Enabling SVGO automation with 'grunt-svgmin' and conservative
plugin settings to build step, among those:
- enable removeRasterImages and sortAttrs,
- disable cleanupIDs, removeDesc, removeTitle, & removeViewBox as
  described in
  https://www.mediawiki.org/wiki/Manual:Coding_conventions/SVG#Exemplified_safe_configuration
- disable removeXMLProcInst; if the SVG doesn't start with an XML
  declaration, then it's MIME type will be detected as "text/plain"
  rather than "image/svg+xml" by libmagic and, consequently, MediaWiki's
  CSSMin CSS minifier. libmagic's default database currently requires
  that SVGs contain an XML declaration:
  <https://github.com/threatstack/libmagic/blob/master/magic/Magdir/sgml#L5>.
- make use of pretty and multipass options.

Settings are stored in a JSON file to be independent of the Grunt build
process. Also updating SVG accordingly.

Bug: T185596
Change-Id: I715ad4cf2e900665e4c32c78b4c2d9d9cebf0222
2018-08-01 10:51:43 -05:00
libraryupgrader c42b25585b build: Updating mediawiki/mediawiki-codesniffer to 21.0.0
Change-Id: Ibd1a92e09449b26d73053a0ef1f266c03729c2c0
2018-07-27 13:42:06 +00:00
Stephen Niedzielski 8ba5c0f773 Hygiene: make JSDoc configs consistent
Make the Popups, MobileFrontend, and MinervaNeue JSDocs consistent. For
Popups, specify package.json, readme, and default template options and
moved doc/ to docs/ and autogenerated JavaScript documentation from
doc/autogenerated to docs/js.

http://usejsdoc.org/about-configuring-jsdoc.html
http://usejsdoc.org/about-commandline.html
http://usejsdoc.org/about-configuring-default-template.html

Bug: T188261
Change-Id: I81e64f06265f1ecc4e2ee159deef9b204ea7e957
2018-07-23 14:45:14 -05:00
Translation updater bot 9b15c940c0 Localisation updates from https://translatewiki.net.
Change-Id: I3481832413cae702316a46dfffdd2d08219f32e2
2018-07-21 22:12:00 +02:00
Translation updater bot 0c36b81cbe Localisation updates from https://translatewiki.net.
Change-Id: Id4e63ed681541852f7216220aa55542cc4debc80
2018-07-19 22:30:54 +02:00
Antoine Musso 1cff4a15a7 QA: Selenium no more needs wgUsejQueryThree
$wgUsejQueryThree was a transient setting that has been removed with
MediaWiki 1.31.  It is thus no more needed in the Selenium
LocalSettings.php file.

Bug: T199939
Change-Id: I74565cc81ff3704d2d91c8768b0e8f8ee7a4dcc3
2018-07-19 15:57:47 +02:00