mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-28 16:20:52 +00:00
Analytics: track more things for Growth
Bug: T207802 Change-Id: I77652325ce7b9dda9c4f4a86c1d34421451cf025
This commit is contained in:
parent
ad3fc3c12d
commit
803f476528
|
@ -82,6 +82,8 @@ ve.ui.MWEducationPopupTool = function VeUiMwEducationPopupTool( config ) {
|
|||
tool.$stillDot.hide();
|
||||
tool.popup.toggle( true );
|
||||
$shield.remove();
|
||||
|
||||
ve.track( 'activity.' + tool.constructor.static.name + 'EducationPopup', { action: 'show' } );
|
||||
}
|
||||
} );
|
||||
};
|
||||
|
|
|
@ -25,12 +25,28 @@ ve.ui.MWPopupTool = function VeUiMWPopupTool( title, toolGroup, config ) {
|
|||
ve.ui.MWPopupTool.super.call( this, toolGroup, config );
|
||||
|
||||
this.$element.addClass( 've-ui-mwPopupTool' );
|
||||
|
||||
this.$link.on( 'click', this.onToolLinkClick.bind( this ) );
|
||||
};
|
||||
|
||||
/* Inheritance */
|
||||
|
||||
OO.inheritClass( ve.ui.MWPopupTool, OO.ui.PopupTool );
|
||||
|
||||
/**
|
||||
* Handle clicks on the main tool button.
|
||||
*
|
||||
* @param {jQuery.Event} e Click event
|
||||
*/
|
||||
ve.ui.MWPopupTool.prototype.onToolLinkClick = function () {
|
||||
if ( this.popup.isVisible() ) {
|
||||
// Popup will be visible if this just opened, thanks to sequencing.
|
||||
// Can't just track this with toggle, because the notices popup is auto-opened and we
|
||||
// want to know about deliberate interactions.
|
||||
ve.track( 'activity.' + this.constructor.static.name + 'Popup', { action: 'show' } );
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* MediaWiki UserInterface notices popup tool.
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue