mediawiki-extensions-Popups/src/ui
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
..
templates Fix pointer mask and CSS offsets for flipped popups 2019-02-13 13:48:51 +01:00
index.less Add reference preview type 2019-01-23 12:12:36 +01:00
mixins.less Fix pointer mask and CSS offsets for flipped popups 2019-02-13 13:48:51 +01:00
pointer-mask.svg Fix pointer mask and CSS offsets for flipped popups 2019-02-13 13:48:51 +01:00
renderer.js Fix pointer mask and CSS offsets for flipped popups 2019-02-13 13:48:51 +01:00
settingsDialog.js Make renderSettingsDialog() return a jQuery object 2019-02-08 16:08:05 +01:00
settingsDialogRenderer.js build: Update eslint-config-wikimedia to 0.10.0 2019-01-31 11:05:33 +01:00
settingsDialogRenderer.less Hygiene: split LESS into components 2018-04-03 16:37:05 -07:00
thumbnail.js Hygiene: move imports above constants 2019-01-24 08:33:29 -07:00
variables.less Hygiene: Separate variables and mixins from code 2018-05-01 10:43:42 -05:00