mediawiki-extensions-Popups/package.json
Thiemo Kreuz 90acf2a778 Fix pointer mask and CSS offsets for flipped popups
I tested this with all 16 possible combinations:
* The pointer can show up in all 4 corners.
* The popup can contain a thumbnail or not. The code for the pointer
  is very different then, because the SVG masks are only relevant in
  this scenario.
* The thumbnail can be tall or not.
* I even tested tall popups without a thumbnail. This is a combination
  that is impossible in production scenarios.

I found 3 issues. This patch fixes 2 of them:
* The pointer is misplaced in the bottom-right corner when the popup
  does not have a thumbnail (as reported in T215194).
* The pointer is misplaced in the upper-right corner when the popup
  shows a thumbnail.
* The pointer in the upper-right corner is gray instead of white when
  the popup is tall, but does not show a thumbnail. As this is not
  relevant in production, I did not fixed it.

It seems both misplacements are because of the same reason: For some
reason, calculations are done based on the assumption the popup would
be 300px wide, but it is 320px wide.

Note I did not just added 20 everywhere, but manually alligned the
pointer triangles so they are placed exactly the same distance from
the corner as in the three other corners.

Note I did not tested this (yet) in RTL scenarios.

Bug: T215194
Change-Id: If0ca63d4d4b6e8083c7de1517fe32f49671a40e6
2019-02-13 13:48:51 +01:00

60 lines
2.1 KiB
JSON

{
"private": true,
"scripts": {
"start": "webpack -w --mode=development",
"build": "NODE_ENV=production webpack --mode=production",
"lint:fix": "grunt fix",
"test:unit": "node tests/node-qunit/run.js 'tests/node-qunit/**/*.test.js' | tap-mocha-reporter dot",
"test": "npm -s run check-built-assets && grunt lint && npm -s run coverage && npm -s run -s doc && bundlesize",
"doc": "jsdoc -c jsdoc.json",
"node-debug": "node -v && npm -v && echo 'Please ensure you are running the correct version of nvm before running this command.'",
"check-built-assets": "echo 'CHECKING BUILD SOURCES ARE COMMITTED OR STAGED' && npm -s run build && git diff --exit-code resources/dist || { npm run node-debug; false; }",
"coverage": "SPAWN_WRAP_SHIM_ROOT=\"$PWD/.nyc_output\" nyc npm -s run test:unit",
"precommit": "npm -s t",
"selenium-daily": "npm run selenium-test",
"selenium-test": "wdio tests/selenium/wdio.conf.js"
},
"engines": {
"node": "6.11.0"
},
"devDependencies": {
"@babel/core": "7.2.0",
"@babel/preset-env": "7.2.0",
"@babel/register": "7.0.0",
"@types/jquery": "3.3.29",
"@wikimedia/mw-node-qunit": "5.0.0",
"babel-loader": "8.0.4",
"bundlesize": "0.17.0",
"clean-webpack-plugin": "1.0.0",
"eslint-config-wikimedia": "0.10.0",
"grunt": "1.0.3",
"grunt-banana-checker": "0.6.0",
"grunt-contrib-watch": "1.1.0",
"grunt-eslint": "21.0.0",
"grunt-jsonlint": "1.1.0",
"grunt-stylelint": "0.10.1",
"grunt-svgmin": "5.0.0",
"jsdoc": "3.5.5",
"nyc": "13.1.0",
"pre-commit": "1.2.2",
"redux": "4.0.1",
"redux-thunk": "2.3.0",
"stylelint-config-wikimedia": "0.5.0",
"svg-inline-loader": "0.8.0",
"tap-mocha-reporter": "3.0.7",
"wdio-junit-reporter": "0.4.4",
"wdio-mediawiki": "0.2.0",
"wdio-mocha-framework": "0.6.3",
"wdio-spec-reporter": "0.1.5",
"webdriverio": "4.14.1",
"webpack": "4.27.1",
"webpack-cli": "3.1.2"
},
"bundlesize": [
{
"path": "resources/dist/index.js",
"maxSize": "13.2KB"
}
]
}