mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-28 01:20:07 +00:00
Remove VectorLanguage A/B test code (WgVectorLanguageInHeaderTreatmentABTest)
The removal here is actually relatively straightforward. References inside OverridableConfigRequirementTest are kept as the A/B test capability remains after this removal and the tests here do not relate to the code removed, just examples of how it can be used. Bug: T302027 Change-Id: I2dd92adaff1221d8213723e9ee60aa02787d4cc7
This commit is contained in:
parent
4df2b12e31
commit
b452a85fe8
|
@ -98,17 +98,6 @@ final class Constants {
|
||||||
*/
|
*/
|
||||||
public const REQUIREMENT_LANGUAGE_IN_HEADER = 'LanguageInHeader';
|
public const REQUIREMENT_LANGUAGE_IN_HEADER = 'LanguageInHeader';
|
||||||
|
|
||||||
/**
|
|
||||||
* Defines whether or not the Language in header A/B test is running. See
|
|
||||||
* https://phabricator.wikimedia.org/T280825 for additional detail about the test.
|
|
||||||
*
|
|
||||||
* Note well that if the associated config value is falsy, then we fall back to choosing the
|
|
||||||
* language treatment based on the `VectorLanguageInHeader` config variable.
|
|
||||||
*
|
|
||||||
* @var string
|
|
||||||
*/
|
|
||||||
public const CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST = 'VectorLanguageInHeaderTreatmentABTest';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -53,8 +53,7 @@ return [
|
||||||
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
||||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
||||||
Constants::REQUIREMENT_LANGUAGE_IN_HEADER,
|
Constants::REQUIREMENT_LANGUAGE_IN_HEADER,
|
||||||
null,
|
null
|
||||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -63,13 +62,9 @@ return [
|
||||||
// Temporary T286932 - remove after languages A/B test is finished.
|
// Temporary T286932 - remove after languages A/B test is finished.
|
||||||
$requirementName = 'T286932';
|
$requirementName = 'T286932';
|
||||||
|
|
||||||
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys. In this
|
// MultiConfig checks each config in turn, allowing us to override the main config for specific keys.
|
||||||
// case, override the "VectorLanguageInHeaderABTest" configuration value so that the following requirement
|
|
||||||
// always buckets the user as if the language treatment A/B test were running.
|
|
||||||
$config = new MultiConfig( [
|
$config = new MultiConfig( [
|
||||||
new HashConfig( [
|
new HashConfig( [] ),
|
||||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST => true,
|
|
||||||
] ),
|
|
||||||
$services->getMainConfig(),
|
$services->getMainConfig(),
|
||||||
] );
|
] );
|
||||||
|
|
||||||
|
@ -81,8 +76,7 @@ return [
|
||||||
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
$services->getCentralIdLookupFactory()->getNonLocalLookup(),
|
||||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER,
|
||||||
$requirementName,
|
$requirementName,
|
||||||
/* $overrideName = */ '',
|
/* $overrideName = */ ''
|
||||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST
|
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -539,10 +539,6 @@
|
||||||
},
|
},
|
||||||
"description": "@var When `VectorLanguageAlertInSidebar` is enabled, the language switch alert box is shown in the sidebar."
|
"description": "@var When `VectorLanguageAlertInSidebar` is enabled, the language switch alert box is shown in the sidebar."
|
||||||
},
|
},
|
||||||
"VectorLanguageInHeaderTreatmentABTest": {
|
|
||||||
"value": false,
|
|
||||||
"description": "@var boolean Enables or disables the language in header treatment A/B test. See https://phabricator.wikimedia.org/T280825 and associated tasks for additional detail."
|
|
||||||
},
|
|
||||||
"VectorStickyHeader": {
|
"VectorStickyHeader": {
|
||||||
"value": {
|
"value": {
|
||||||
"logged_in": true,
|
"logged_in": true,
|
||||||
|
|
|
@ -322,7 +322,7 @@ class OverridableConfigRequirementTest extends \MediaWikiUnitTestCase {
|
||||||
) {
|
) {
|
||||||
$config = new HashConfig( [
|
$config = new HashConfig( [
|
||||||
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER => $configValue,
|
Constants::CONFIG_KEY_LANGUAGE_IN_HEADER => $configValue,
|
||||||
Constants::CONFIG_LANGUAGE_IN_HEADER_TREATMENT_AB_TEST => $abValue,
|
$testName => $abValue,
|
||||||
] );
|
] );
|
||||||
|
|
||||||
$user = $this->createMock( User::class );
|
$user = $this->createMock( User::class );
|
||||||
|
|
Loading…
Reference in a new issue