Commit graph

962 commits

Author SHA1 Message Date
joakin f3839189dc Test: Migrate isEnabled.test.js to node-qunit
Change-Id: I85a08725c9138f47a51cdc34c20bc3a60b61af34
2017-02-20 20:01:01 +01:00
joakin c233ffb4a5 Test: Migrate preview/model.test.js to node-qunit
Change-Id: Ie5a895a1760dbfc58e11369fdb8b979021b8ae74
2017-02-20 20:01:01 +01:00
joakin b7a4029adb Test: Migrate reducers/eventLogging.test.js to node-qunit
Change-Id: I4bc6d77a496a8c4bf1ecafbf3a6a71986c77e423
2017-02-20 20:01:01 +01:00
joakin d06bbe5871 Test: Migrate reducers/preview.test.js to node-qunit
Change-Id: I700bc43dace64503058337a6b458673070bc5db0
2017-02-20 20:01:01 +01:00
joakin 33c05394f4 Set up qunit running in node to migrate tests to commonjs
In order to run qunit tests on sources that use common.js modules, set
up infra to run qunit tests in the node cli when running:

    npm run test:node

Changes:
* Add npm script test:node that runs the tests
* Run node tests on CI (npm test)
* Add a qunit node test runner: mw-node-qunit
* Migrate a test from the root hierarchy and another one from the nested
  one to prove it works (globs fail otherwise)
  * reducers/settings.test.js to node qunit to prove it works
  * counts.test.js to node qunit to prove it works

Change-Id: I55d76b7db168f3745e0ac69852c152322ab385c3
2017-02-20 20:01:01 +01:00
joakin 78cb95cda2 Hygiene: Remove unnecessary IIFE and use proper requires
In index.js. Instead of using the global variable/object popups, require
things from their files so that we can remove the global variables when
we can run qunit tests with commonjs in node.

Change-Id: I85408f01eca27f97cf46b2076176fcc16c037829
2017-02-20 18:39:51 +01:00
joakin f1e6e2bfa1 Hygiene: Remove unnecessary IIFE in gateway/mediawiki.js
Change-Id: If6d76c2915b13f9871dea3b7f33cb74ec5906566
2017-02-20 18:39:49 +01:00
joakin 0260325bb9 Hygiene: Remove unnecessary IIFE in schema.js
Change-Id: Ic152668ff7e4c96fb63934283897a51e81e58dd4
2017-02-20 18:39:47 +01:00
joakin 5fc46b4cdd Hygiene: Remove unnecessary IIFE in renderer.js
Change-Id: I89a1ac2205385db8e2f2c040ac22d2f4de793a18
2017-02-20 18:39:45 +01:00
joakin 2c1a30e35e Hygiene: Remove unnecessary IIFE in processLinks.js
Change-Id: Icd6ab0a9b0a189c19310915cb77f861459aecddf
2017-02-20 18:39:42 +01:00
joakin d54cfc2e42 Hygiene: Remove unnecessary IIFE in previewBehavior.js
Change-Id: I4f6f4094ba545f827dad28e966d69e6ecec3cea2
2017-02-20 18:39:33 +01:00
jenkins-bot 7b86981054 Merge "Hygiene: Remove unnecessary IIFE in checkin.js" 2017-02-20 17:31:01 +00:00
jenkins-bot 8097314077 Merge "Hygiene: Remove unnecessary IIFE in changeListeners/render.js" 2017-02-20 17:30:03 +00:00
jenkins-bot cafe6d4edb Merge "Hygiene: Remove unnecessary IIFE in changeListeners/linkTitle.js" 2017-02-20 17:30:01 +00:00
jenkins-bot b6c49825c5 Merge "Hygiene: Remove unnecessary IIFE in changeListeners/footerLink.js" 2017-02-20 17:30:01 +00:00
jenkins-bot 319c04ce2f Merge "Hygiene: Remove unnecessary IIFE in changeListeners/eventLogging.js" 2017-02-20 17:23:35 +00:00
jenkins-bot 0199fc782a Merge "Hygiene: Remove useless IIFE in settingsDialog.js" 2017-02-20 17:19:35 +00:00
jenkins-bot ef78e27571 Merge "Hygiene: Remove unnecessary IIFE in wait.js" 2017-02-20 17:19:34 +00:00
jenkins-bot f0bac7a4fa Merge "Hygiene: Remove unnecessary IIFE in actions.js" 2017-02-20 17:19:33 +00:00
Translation updater bot 8868f05c34 Localisation updates from https://translatewiki.net.
Change-Id: I10aa08a217a5255ab7cf76a035ee7331853ffc5b
2017-02-19 22:41:54 +01:00
Translation updater bot 2e9d2344dc Localisation updates from https://translatewiki.net.
Change-Id: I8f6b1cf7616709b9bb47921b7a23a096469f306b
2017-02-18 22:41:22 +01:00
Translation updater bot d9e8024160 Localisation updates from https://translatewiki.net.
Change-Id: If348e2271c9f1d3202b1b80eff0498654e1ed9bf
2017-02-17 22:45:12 +01:00
Umherirrender 655f8b02eb Remove duplicate config key from extension.json
Having PopupsConflictingNavPopupsGadgetName once is enough

Change-Id: I59c15162e20ba209e4bd8e292e2b223ee3cf6638
2017-02-17 18:24:19 +01:00
joakin f2e9654d23 Hygiene: Remove unnecessary IIFE in checkin.js
Change-Id: I84afc09540f24af425e2abd4603115bdf0030aa7
2017-02-17 06:39:25 +01:00
joakin 27d1ad8318 Hygiene: Remove unnecessary IIFE in changeListeners/render.js
Change-Id: Ib313ddd52d59c6422e02d98b67b5b475b35e79b7
2017-02-17 06:39:21 +01:00
joakin dfe44acef2 Hygiene: Remove unnecessary IIFE in changeListeners/linkTitle.js
Change-Id: Ifc882875475d1bd5056879c59314030a6f616daa
2017-02-17 06:39:16 +01:00
joakin 36287477d0 Hygiene: Remove unnecessary IIFE in changeListeners/footerLink.js
Change-Id: Id1535ce6af0d2dda0e58b784180d3d072844daa8
2017-02-17 06:39:10 +01:00
joakin dfb5ed6688 Hygiene: Remove unnecessary IIFE in changeListeners/eventLogging.js
Change-Id: If379092ab5132b47525ba350d6bbb4cee4568a15
2017-02-17 06:39:00 +01:00
joakin 8d22cf248a Hygiene: Remove useless IIFE in settingsDialog.js
Change-Id: I2885e02d0e61f9e98e086ce4399bc9a18517e531
2017-02-17 06:38:55 +01:00
joakin fd91fe7d93 Hygiene: Remove unnecessary IIFE in wait.js
Change-Id: Ia360bbd99b3d657116c0ba11c5acca726e4602a4
2017-02-17 06:38:46 +01:00
joakin dc7b05c27e Hygiene: Remove unnecessary IIFE in actions.js
Change-Id: I6031efbce04d4cd91a37690469d49ffd0372b41c
2017-02-17 06:38:35 +01:00
jenkins-bot ade818e89e Merge "Resize thumbnails images returned by REST endpoint" 2017-02-17 00:30:28 +00:00
jdlrobson 6d859a73a3 Resize thumbnails images returned by REST endpoint
This change resizes thumbnails to the appropriate width
based on the value of mw.popups.gateway.THUMBNAIL_SIZE

Tests cover
* When requested thumbnail is < than original size
* When requested thumbnail is > than original size
* When requested thumbnail is an svg and originalimage
smaller than requested thumb size

Bug: T156800
Change-Id: Ib375b97e2bc959e91de5177efc3df1f2ded54a5b
2017-02-16 16:19:14 -08:00
jenkins-bot 740d6f2720 Merge "Position image correctly inside the card" 2017-02-16 23:41:20 +00:00
Derk-Jan Hartman b839b29008 Position image correctly inside the card
inline-blocks need to be forced to be aligned correctly on the baseline

Bug: T153840
Change-Id: Iec45caa4483b36b01261309e4895c71e3fc2e675
2017-02-16 23:35:15 +00:00
Translation updater bot 16c6d96c92 Localisation updates from https://translatewiki.net.
Change-Id: I1d0665a4d85c1ca30bbd8a7ad951bb74750c69dc
2017-02-16 22:57:52 +01:00
jenkins-bot abad4ba4a1 Merge "Hygiene: Move Popups.hooks into includes folder" 2017-02-15 22:00:04 +00:00
Translation updater bot 636bd416a9 Localisation updates from https://translatewiki.net.
Change-Id: Ifd6abb5e3e14b876456e8cea239640686a322cc4
2017-02-15 22:37:46 +01:00
Translation updater bot 7ef1899383 Localisation updates from https://translatewiki.net.
Change-Id: I6787a7d2f0e8b990e3d86b2815bcbb5fa18190f0
2017-02-14 22:46:12 +01:00
Piotr Miazga 2988a6e620 Hygiene: Move Popups.hooks into includes folder
Lets keep all extenion PHP files in one folder

Change-Id: I225019b895df038c1d43a082ac4244053d0b96dd
2017-02-14 21:04:49 +01:00
jdlrobson 6908b59ccf Merge remote-tracking branch 'gerrit/mpga'
Switch default branch to master

Change-Id: I4abbaae83e84a9666bbd5cef0150e25fc0fee0c6
2017-02-14 11:20:17 -08:00
joakin fa2b10a2e7 Hygiene: Move build/ext.popups/ to src/
This way, src contains sources, and dist contains distribution files.

Also, add some documentation about the folders in the README and an adr.

Change-Id: Ie0b9f6475b8423b90e927633d883bde3cd5d5e4d
2017-02-14 09:59:59 -08:00
joakin c593ed3502 CI: Check built assets are up to date with sources
When running the CI npm job in jenkins, make sure to check that the
compiled assets from the bundler are up to date with the sources.

That way, CI will not verify if the assets commited are not up to date
so that we don't have out-of-sync sources and built assets.

Change-Id: I56bc0097f5b4fa6c9b7afa3ae14b7db4ab480a94
2017-02-14 18:39:38 +01:00
joakin ba4844cdc2 Tooling: Separate built resources from RL resources
In order to automatically verify in CI that the built assets are up to
date with the commited sources, we need to keep the built assets in
a folder separate from the RL assets.

* Rename the compiled assets folder to industry standard `dist`

Change-Id: I8c5898f9bb29fee7164a7038b835a5f7efd33dbc
2017-02-14 18:39:38 +01:00
joakin 82afb169f6 Docs: Add a README.md with development instructions
Change-Id: I1ff47d0925a5c97cc4653df875b745a8666cbd8a
2017-02-14 18:39:38 +01:00
joakin 45046da7f1 Tooling: Add npm start script for development mode
Run webpack in watch mode for development. Scripts are documented in
a followup commit in the README.

Change-Id: Id1e2f8b8578169eee53a5e4f8c468d5426d4c2ea
2017-02-14 18:39:38 +01:00
jenkins-bot 0041b5bc1e Merge "Hygiene: Include sourcemaps in the repo in the compiled assets folder" into mpga 2017-02-14 17:18:20 +00:00
Sam Smith 454cf1843e Add missing ext.eventLogging.Schema dependency
Bug: T156333
Change-Id: I9daa38db4fada95d5c34415b2615c9c96790ca9d
2017-02-14 14:18:34 +00:00
joakin 908d4eed7e Hygiene: Include sourcemaps in the repo in the compiled assets folder
So that production code can be debugged properly. Independent source
maps files aren't loaded until the developer tools are open.

Change-Id: Ic8c3c10315d3a3be0f42505834005a3cab77d130
2017-02-13 17:59:03 -08:00
Translation updater bot 512f1a7dae Localisation updates from https://translatewiki.net.
Change-Id: Iabb72850dff0b2851a209c2977ac70943f41026d
2017-02-13 23:08:24 +01:00