Merge "Log the context of the ULS in which no search results were found"

This commit is contained in:
jenkins-bot
2018-03-13 11:49:20 +00:00
committed by Gerrit Code Review
7 changed files with 21 additions and 6 deletions

View File

@@ -145,7 +145,7 @@ class UniversalLanguageSelectorHooks {
} }
public static function onEventLoggingRegisterSchemas( array &$schemas ) { public static function onEventLoggingRegisterSchemas( array &$schemas ) {
$schemas['UniversalLanguageSelector'] = 7327441; $schemas['UniversalLanguageSelector'] = 17799034;
} }
/** /**

View File

@@ -190,6 +190,7 @@
$trigger.removeClass( 'selector-open' ); $trigger.removeClass( 'selector-open' );
}, },
languages: ulsLanguageList, languages: ulsLanguageList,
ulsPurpose: 'compact-language-links',
// Show common languages // Show common languages
quickList: self.getCommonLanguages( languages ), quickList: self.getCommonLanguages( languages ),
noResultsTemplate: function () { noResultsTemplate: function () {

View File

@@ -356,6 +356,7 @@
// the apply button // the apply button
displaySettings.markDirty(); displaySettings.markDirty();
}, },
ulsPurpose: 'interface-language',
quickList: function () { quickList: function () {
return mw.uls.getFrequentLanguageList(); return mw.uls.getFrequentLanguageList();
} }

View File

@@ -237,13 +237,16 @@
/** /**
* Log search strings which produce no search results. * Log search strings which produce no search results.
* *
* @param {jQuery.event} event The orignal event * @param {jQuery.event} event The original event
* @param {string} context The query string * @param {string} context The query string
* @param {string} ulsPurpose The ulsPurpose option of the ULS panel that triggered the event
*/ */
noSearchResults: function ( event, context ) { noSearchResults: function ( event, context, ulsPurpose ) {
this.log( { this.log( {
action: 'no-search-results', action: 'no-search-results',
context: context context: context,
ulsPurpose: ulsPurpose,
title: mw.config.get( 'wgPageName' )
} ); } );
} }
}; };

View File

@@ -293,6 +293,7 @@
$input.focus(); $input.focus();
}, },
languages: mw.ime.getLanguagesWithIME(), languages: mw.ime.getLanguagesWithIME(),
ulsPurpose: 'ime-selector',
top: $input.offset().top top: $input.offset().top
} ); } );

View File

@@ -390,7 +390,8 @@
inputSettings.prepareLanguages(); inputSettings.prepareLanguages();
inputSettings.markDirty(); inputSettings.markDirty();
}, },
languages: mw.ime.getLanguagesWithIME() languages: mw.ime.getLanguagesWithIME(),
ulsPurpose: 'input-settings'
} ); } );
$moreLanguagesButton.on( 'click', function () { $moreLanguagesButton.on( 'click', function () {

View File

@@ -367,7 +367,15 @@
}, },
onSelect: function ( language ) { onSelect: function ( language ) {
mw.uls.changeLanguage( language ); mw.uls.changeLanguage( language );
} },
// Not actually used on sites with the gear icon
// in the interlanguage area, because this ULS
// will be a container for other ULS panels.
// However, this is used on sites with ULS
// in the personal bar, and in that case it has the same
// purpose as the selector in Display settings,
// so it has the same identifier.
ulsPurpose: 'interface-language'
} ); } );
// Allow styles to apply first and position to work by // Allow styles to apply first and position to work by