Mooeypoo has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/346594 )

Change subject: RCFilters Guided tour: Append the dot to the popup
......................................................................

RCFilters Guided tour: Append the dot to the popup

The dot should be in a higher DOM level so it isn't being cut off
by the div it's in. Append the dot to the bottom of the popup and
then position it properly, to make sure that the animation and the
dot itself are on top of the popup header and aren't cut off.

Bug: T151006
Change-Id: I063c303442f948ddbc375bafbdeb6cf741a5ab5c
---
M modules/rcfilters-highlight-tour-hooks.js
M modules/rcfilters-highlight-tour.less
2 files changed, 17 insertions(+), 7 deletions(-)


  git pull 
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/WikimediaMessages 
refs/changes/94/346594/1

diff --git a/modules/rcfilters-highlight-tour-hooks.js 
b/modules/rcfilters-highlight-tour-hooks.js
index 625a0b7..ce20c43 100644
--- a/modules/rcfilters-highlight-tour-hooks.js
+++ b/modules/rcfilters-highlight-tour-hooks.js
@@ -9,19 +9,29 @@
                        mw.user.options.set( name, value );
                        new mw.Api().saveOption( name, value );
                },
-               highlightButtonSelector = 
'.mw-rcfilters-ui-filtersListWidget-hightlightButton a',
+               // highlightButtonSelector = 
'.mw-rcfilters-ui-filtersListWidget-hightlightButton a',
+               popupSelector = '.mw-rcfilters-ui-filterWrapperWidget-popup 
oo-ui-popupWidget-body',
                showDot = function () {
-                       $( highlightButtonSelector )
+                       var $container = $( '<div>' )
                                .addClass( 
'rcfilters-tour-highlight-dot-container' )
                                .append(
                                        $( '<div>' ).addClass( 
'rcfilters-tour-highlight-pulsatingDot' ),
                                        $( '<div>' ).addClass( 
'rcfilters-tour-highlight-stillDot' )
-                               );
+                               ),
+                               $highlightButton = $( 
'.mw-rcfilters-ui-filtersListWidget-hightlightButton a' ),
+                               position = $highlightButton.position();
+
+                       $( '.mw-rcfilters-ui-filterWrapperWidget-popup 
.oo-ui-popupWidget-body' )
+                               .append( $container );
+
+                       // Position
+                       $container.css( {
+                               left: position.left + ( 
$highlightButton.outerWidth() / 2 ),
+                               top: position.top + 
$highlightButton.outerHeight()
+                       } );
                },
                hideDot = function () {
-                       var $button = $( highlightButtonSelector )
-                               .removeClass( 
'rcfilters-tour-highlight-dot-container' );
-                       $button.find( '.rcfilters-tour-highlight-pulsatingDot, 
.rcfilters-tour-highlight-stillDot' )
+                       $( '.rcfilters-tour-highlight-dot-container' )
                                .remove();
                };
 
diff --git a/modules/rcfilters-highlight-tour.less 
b/modules/rcfilters-highlight-tour.less
index 0e72e1a..b4cd1c8 100644
--- a/modules/rcfilters-highlight-tour.less
+++ b/modules/rcfilters-highlight-tour.less
@@ -19,7 +19,7 @@
 }
 
 .rcfilters-tour-highlight-dot-container {
-       position: relative;
+       position: absolute;
 }
 
 .rcfilters-tour-highlight-pulsatingDot {

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I063c303442f948ddbc375bafbdeb6cf741a5ab5c
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/WikimediaMessages
Gerrit-Branch: master
Gerrit-Owner: Mooeypoo <mor...@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to