Merge "Remove hacks that avoid duplicate event logging with MobileFrontend"

This commit is contained in:
jenkins-bot 2023-04-14 16:36:02 +00:00 committed by Gerrit Code Review
commit e312f83cb0
2 changed files with 0 additions and 19 deletions

View file

@ -121,13 +121,6 @@ class Hooks implements
if ( !$extensionRegistry->isLoaded( 'EventLogging' ) || !$extensionRegistry->isLoaded( 'WikimediaEvents' ) ) {
return false;
}
if ( $extensionRegistry->isLoaded( 'MobileFrontend' ) ) {
$mobFrontContext = MediaWikiServices::getInstance()->getService( 'MobileFrontend.Context' );
if ( $mobFrontContext->shouldDisplayMobileView() ) {
// on a MobileFrontend page the logging should be handled by it
return false;
}
}
$inSample = $this->inEventSample( $data['editing_session_id'] );
$shouldOversample = WikimediaEventsHooks::shouldSchemaEditAttemptStepOversample( $article->getContext() );
if ( !$inSample && !$shouldOversample ) {

View file

@ -9,12 +9,6 @@
require( './jquery.wikiEditor.js' );
function logEditEvent( data ) {
if ( mw.config.get( 'wgMFMode' ) !== null ) {
// Visiting a ?action=edit URL can, depending on user settings, result
// in the MobileFrontend overlay appearing on top of WikiEditor. In
// these cases, don't log anything.
return;
}
mw.track( 'editAttemptStep', $.extend( {
// eslint-disable-next-line camelcase
editor_interface: 'wikitext',
@ -24,12 +18,6 @@
}
function logEditFeature( feature, action ) {
if ( mw.config.get( 'wgMFMode' ) !== null ) {
// Visiting a ?action=edit URL can, depending on user settings, result
// in the MobileFrontend overlay appearing on top of WikiEditor. In
// these cases, don't log anything.
return;
}
mw.track( 'visualEditorFeatureUse', {
feature: feature,
action: action,