Merge "Rename `wgVectorUseCoreSearch` to `wgVectorUseWvuiSearch`"

This commit is contained in:
jenkins-bot 2021-01-25 22:47:49 +00:00 committed by Gerrit Code Review
commit 27ad6eab12
5 changed files with 10 additions and 10 deletions

View File

@ -37,7 +37,7 @@ class Hooks {
) {
return [
'wgVectorSearchHost' => $config->get( 'VectorSearchHost' ),
'wgVectorUseCoreSearch' => $config->get( 'VectorUseCoreSearch' ),
'wgVectorUseWvuiSearch' => $config->get( 'VectorUseWvuiSearch' ),
];
}
@ -103,7 +103,7 @@ class Hooks {
}
// Tell the `mediawiki.page.ready` module not to wire up search.
// This allows us to use $wgVectorUseCoreSearch to decide to load
// This allows us to use $wgVectorUseWvuiSearch to decide to load
// the historic jquery autocomplete search or the new Vue implementation.
// ResourceLoaderContext has no knowledge of legacy / modern Vector
// and from its point of view they are the same thing.
@ -281,7 +281,7 @@ class Hooks {
$config = $sk->getConfig();
if ( !$config->get( 'VectorUseCoreSearch' ) ) {
if ( $config->get( 'VectorUseWvuiSearch' ) ) {
$bodyAttrs['class'] .= ' skin-vector-search-vue';
}

View File

@ -3,5 +3,5 @@ interface VectorResourceLoaderVirtualConfig {
/**
* The name of the ResourceLoader module that contains search.
*/
wgVectorUseCoreSearch: boolean
wgVectorUseWvuiSearch: boolean
}

View File

@ -14,7 +14,7 @@ var /** @type {VectorResourceLoaderVirtualConfig} */
// T251544: Collect search performance metrics to compare Vue search with
// mediawiki.searchSuggest performance.
SHOULD_TEST_SEARCH = !!(
!config.wgVectorUseCoreSearch &&
config.wgVectorUseWvuiSearch &&
window.performance &&
performance.mark &&
performance.measure &&
@ -142,14 +142,14 @@ function initSearchLoader( document ) {
}
/**
* 1. If $wgVectorUseCoreSearch is true,
* 1. If $wgVectorUseWvuiSearch is false,
* or we are in a browser that doesn't support fetch
* load the legacy searchSuggest module. The check for window.fetch
* can be removed when IE11 support is finally officially dropped.
* 2. If we're using a different search module, enable the loading indicator
* before the search module loads.
**/
if ( config.wgVectorUseCoreSearch || !window.fetch ) {
if ( !config.wgVectorUseWvuiSearch || !window.fetch ) {
loadSearchModule( searchInput, 'mediawiki.searchSuggest', function () {} );
} else {
// Remove tooltips while Vue search is still loading

View File

@ -44,7 +44,7 @@
}
// Only apply the following WVUI-related rules to clients who have js enabled.
// TODO: .skin-vector-search-vue class can be removed when $wgVectorUseCoreSearch is no longer supported.
// TODO: .skin-vector-search-vue class can be removed when $wgVectorUseWvuiSearch is no longer supported.
.client-js .skin-vector-search-vue {
// Derived from @size-search-figure in WVUI
// https://gerrit.wikimedia.org/r/plugins/gitiles/wvui/+/e32b54f3b8d1118b6a25cdc46b5638d6d048533e/src/themes/wikimedia-ui.less#21

View File

@ -220,8 +220,8 @@
"value": "1",
"description": "@var string:['2'|'1'] The version ('2' for latest, '1' for legacy) of the Vector skin to **set** for newly created user accounts. **The value is persisted as a user preference.** This configuration is not used for preexisting accounts (see VectorDefaultSkinVersionForExistingAccounts) and only ever executed once at new account creation time."
},
"VectorUseCoreSearch": {
"value": true
"VectorUseWvuiSearch": {
"value": false
},
"VectorWvuiSearchOptions": {
"value": {