Remove block notice tracking

This is a clean up after collecting the necessary data related to
blocks and how often users see the block notices

See: https://phabricator.wikimedia.org/T189724

Bug: T214214
Change-Id: I532a0cd95009109ba25caa8dd31badd5c1900da7
This commit is contained in:
Dayllan Maza 2019-04-23 10:48:51 -04:00
parent 19ba1bfee2
commit 96de1353d3
3 changed files with 1 additions and 16 deletions

View file

@ -508,12 +508,6 @@ class ApiVisualEditor extends ApiBase {
)->parseAsBlock(), )->parseAsBlock(),
]; ];
} }
if ( $this->getConfig()->get( 'EnableBlockNoticeStats' ) ) {
$statsd = MediaWikiServices::getInstance()->getStatsdDataFactory();
$wiki = $this->getConfig()->get( 'DBname' );
$statsd->increment( 'BlockNotices.' . $wiki . '.VisualEditor.returned' );
}
} }
// HACK: Build a fake EditPage so we can get checkboxes from it // HACK: Build a fake EditPage so we can get checkboxes from it

View file

@ -925,7 +925,6 @@ class VisualEditorHooks {
'feedbackApiUrl' => $veConfig->get( 'VisualEditorFeedbackAPIURL' ), 'feedbackApiUrl' => $veConfig->get( 'VisualEditorFeedbackAPIURL' ),
'feedbackTitle' => $veConfig->get( 'VisualEditorFeedbackTitle' ), 'feedbackTitle' => $veConfig->get( 'VisualEditorFeedbackTitle' ),
'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ), 'sourceFeedbackTitle' => $veConfig->get( 'VisualEditorSourceFeedbackTitle' ),
'enableBlockNoticeStats' => $coreConfig->get( 'EnableBlockNoticeStats' ),
]; ];
} }

View file

@ -1465,7 +1465,7 @@ ve.init.mw.DesktopArticleTarget.prototype.maybeShowMetaDialog = function () {
// Pop out the notices when the welcome dialog is closed // Pop out the notices when the welcome dialog is closed
this.welcomeDialogPromise this.welcomeDialogPromise
.always( function () { .always( function () {
var popup, wiki; var popup;
if ( if (
target.switched && target.switched &&
!mw.user.options.get( 'visualeditor-hidevisualswitchpopup' ) !mw.user.options.get( 'visualeditor-hidevisualswitchpopup' )
@ -1477,14 +1477,6 @@ ve.init.mw.DesktopArticleTarget.prototype.maybeShowMetaDialog = function () {
} else if ( target.actionsToolbar.tools.notices ) { } else if ( target.actionsToolbar.tools.notices ) {
// Show notices // Show notices
target.actionsToolbar.tools.notices.getPopup().toggle( true ); target.actionsToolbar.tools.notices.getPopup().toggle( true );
if ( mw.config.get( 'wgVisualEditorConfig' ).enableBlockNoticeStats &&
target.actionsToolbar.tools.notices.noticeItems.some( function ( item ) {
return item.type === 'block';
} )
) {
wiki = mw.config.get( 'wgDBname' );
mw.track( 'counter.MediaWiki.BlockNotices.' + wiki + '.VisualEditor.shown', 1 );
}
} }
} ); } );
} }