Merge "Add font size feature flag"

This commit is contained in:
jenkins-bot 2023-08-24 21:33:39 +00:00 committed by Gerrit Code Review
commit 580b7a022f
4 changed files with 46 additions and 0 deletions

View file

@ -250,6 +250,21 @@ final class Constants {
*/ */
public const REQUIREMENT_ZEBRA_AB_TEST = 'VectorZebraDesign'; public const REQUIREMENT_ZEBRA_AB_TEST = 'VectorZebraDesign';
/**
* @var string
*/
public const CONFIG_KEY_FONT_SIZE = 'VectorCustomFontSize';
/**
* @var string
*/
public const FEATURE_FONT_SIZE = 'CustomFontSize';
/**
* @var string
*/
public const REQUIREMENT_FONT_SIZE = 'CustomFontSize';
/** /**
* This class is for namespacing constants only. Forbid construction. * This class is for namespacing constants only. Forbid construction.
* @throws FatalError * @throws FatalError

View file

@ -277,6 +277,26 @@ return [
] ]
); );
// Feature: T343928: Feature Font Size.
// ================================
$featureManager->registerRequirement(
new OverridableConfigRequirement(
$services->getMainConfig(),
$context->getUser(),
$context->getRequest(),
Constants::CONFIG_KEY_FONT_SIZE,
Constants::REQUIREMENT_FONT_SIZE
)
);
// Register 'custom-font-size' as the default requirement
$featureManager->registerFeature(
Constants::FEATURE_FONT_SIZE,
[
Constants::REQUIREMENT_FULLY_INITIALISED,
Constants::REQUIREMENT_FONT_SIZE
]
);
return $featureManager; return $featureManager;
} }
]; ];

View file

@ -89,6 +89,10 @@ pre,
font-size: @font-size-base--trident-hack; font-size: @font-size-base--trident-hack;
line-height: @line-height-base; line-height: @line-height-base;
.vector-feature-custom-font-size-enabled & {
font-size: 16px;
}
#siteSub { #siteSub {
font-size: 12.8px; // T311421 font-size: 12.8px; // T311421
} }

View file

@ -600,6 +600,13 @@
"logged_out": false "logged_out": false
}, },
"description": "@var boolean Temporary feature flag that enables the zebra design for the Vector skin." "description": "@var boolean Temporary feature flag that enables the zebra design for the Vector skin."
},
"VectorCustomFontSize": {
"value": {
"logged_in": false,
"logged_out": false
},
"description": "@var boolean feature flag that enables customizing the Vector font-size."
} }
}, },
"ServiceWiringFiles": [ "ServiceWiringFiles": [