jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/374561 )

Change subject: ve.ui.MWEducationPopupTool: Position blue dots with CSS only
......................................................................


ve.ui.MWEducationPopupTool: Position blue dots with CSS only

We can place them in bottom center of the toolbar buttons with
just CSS, no need to manually calculate the position (which
doesn't give the correct results if the toolbar is not visible).

Also add z-index for correct rendering inside TargetWidget,
not overlapped by the toolbar border (e.g. in the media dialog).

Bug: T174120
Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906
---
M modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
M modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
2 files changed, 14 insertions(+), 18 deletions(-)

Approvals:
  Esanders: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css 
b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
index e965711..d88006f 100644
--- a/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
+++ b/modules/ve-mw/ui/styles/tools/ve.ui.MWEducationPopupTool.css
@@ -5,12 +5,21 @@
  * @license The MIT License (MIT); see LICENSE.txt
  */
 
+.ve-ui-pulsatingDot,
+.ve-ui-stillDot {
+       position: absolute;
+       bottom: 0;
+       left: 50%;
+       z-index: 1;
+       border-radius: 50%;
+       background-color: #36c;
+}
+
 .ve-ui-pulsatingDot {
        width: 2.5em;
        height: 2.5em;
-       border-radius: 50%;
-       background-color: #36c;
-       position: absolute;
+       margin-bottom: -1.25em;
+       margin-left: -1.25em;
        opacity: 0;
        -webkit-animation: pulse 3s ease-out;
        -moz-animation: pulse 3s ease-out;
@@ -23,9 +32,8 @@
 .ve-ui-stillDot {
        width: 0.8em;
        height: 0.8em;
-       border-radius: 50%;
-       background-color: #36c;
-       position: absolute;
+       margin-bottom: -0.4em;
+       margin-left: -0.4em;
 }
 
 .ve-ui-educationPopup-shield {
diff --git a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js 
b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
index 5b83f73..8d1465e 100644
--- a/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
+++ b/modules/ve-mw/ui/tools/ve.ui.MWEducationPopupTool.js
@@ -89,18 +89,6 @@
                        $shield.remove();
                }
        } );
-
-       setTimeout( function () {
-               var radius = tool.$pulsatingDot.width() / 2;
-               tool.$pulsatingDot.css( {
-                       left: tool.$element.width() / 2 - radius,
-                       top: tool.$element.height() - radius
-               } );
-               tool.$stillDot.css( {
-                       left: tool.$element.width() / 2 - radius / 3,
-                       top: tool.$element.height() - radius / 3
-               } );
-       }, 0 );
 };
 
 /* Inheritance */

-- 
To view, visit https://gerrit.wikimedia.org/r/374561
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I556ddfcf252669107cf21810fbed7c9a3751e906
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/VisualEditor
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <[email protected]>
Gerrit-Reviewer: DLynch <[email protected]>
Gerrit-Reviewer: Esanders <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to