Renaming temporary config variable and splitting it from cirrus search lookup

This allows using the config variable independendly from the cirrus search extension.
This way it can be used for all subtickets of T271802.

Bug: T277028
Change-Id: I1b3bdda5fa6fbfe5c531c3b51c2c8e2a28ed1faf
This commit is contained in:
Svantje Lilienthal 2021-05-07 11:32:20 +02:00 committed by WMDE-Fisch
parent f89301bedf
commit 2665734b10
4 changed files with 7 additions and 6 deletions

View file

@ -182,8 +182,8 @@
"description": "Temporary flag to enable inline parameter descriptions in the transclusion dialog.",
"value": false
},
"VisualEditorCirrusSearchLookup": {
"description": "Temporary feature flag to replace prefixsearch with fulltext CirrusSearch when searching for template names. (T274903)",
"VisualEditorTemplateSearchImprovements": {
"description": "Temporary feature flag to enable various changes around searching for template names. (T271802)",
"value": false
}
},

View file

@ -1051,7 +1051,8 @@ class VisualEditorHooks {
'transclusionDialogInlineDescriptions' =>
$veConfig->get( 'VisualEditorTransclusionDialogInlineDescriptions' ),
'cirrusSearchLookup' => $extensionRegistry->isLoaded( 'CirrusSearch' )
&& $veConfig->get( 'VisualEditorCirrusSearchLookup' ),
&& $veConfig->get( 'VisualEditorTemplateSearchImprovements' ),
'templateSearchImprovements' => $veConfig->get( 'VisualEditorTemplateSearchImprovements' ),
];
}

View file

@ -346,7 +346,7 @@ ve.ui.MWTransclusionDialog.prototype.initialize = function () {
icon: 'puzzle',
title: ve.msg(
// Temporary switch for verbose template search.
mw.config.get( 'wgVisualEditorConfig' ).cirrusSearchLookup ?
mw.config.get( 'wgVisualEditorConfig' ).templateSearchImprovements ?
'visualeditor-dialog-transclusion-template-search' :
'visualeditor-dialog-transclusion-add-template'
)

View file

@ -81,7 +81,7 @@ ve.ui.MWTemplatePlaceholderPage = function VeUiMWTemplatePlaceholderPage( placeh
items: [ addTemplateActionFieldLayout ]
};
// Temporary switch for verbose template search.
if ( mw.config.get( 'wgVisualEditorConfig' ).cirrusSearchLookup ) {
if ( mw.config.get( 'wgVisualEditorConfig' ).templateSearchImprovements ) {
addTemplateFieldsetConfig = ve.extendObject( addTemplateFieldsetConfig, {
label: ve.msg( 'visualeditor-dialog-transclusion-template-search' ),
help: ve.msg( 'visualeditor-dialog-transclusion-template-search-help' ),
@ -117,7 +117,7 @@ ve.ui.MWTemplatePlaceholderPage.prototype.setOutlineItem = function () {
.setFlags( [ 'placeholder' ] )
.setLabel( ve.msg(
// Temporary switch for verbose template search.
mw.config.get( 'wgVisualEditorConfig' ).cirrusSearchLookup ?
mw.config.get( 'wgVisualEditorConfig' ).templateSearchImprovements ?
'visualeditor-dialog-transclusion-template-search' :
'visualeditor-dialog-transclusion-placeholder'
) );