mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/Vector.git
synced 2024-11-13 17:57:06 +00:00
Merge "Add font size feature flag"
This commit is contained in:
commit
580b7a022f
|
@ -250,6 +250,21 @@ final class Constants {
|
|||
*/
|
||||
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.
|
||||
* @throws FatalError
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
];
|
||||
|
|
|
@ -89,6 +89,10 @@ pre,
|
|||
font-size: @font-size-base--trident-hack;
|
||||
line-height: @line-height-base;
|
||||
|
||||
.vector-feature-custom-font-size-enabled & {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
#siteSub {
|
||||
font-size: 12.8px; // T311421
|
||||
}
|
||||
|
|
|
@ -600,6 +600,13 @@
|
|||
"logged_out": false
|
||||
},
|
||||
"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": [
|
||||
|
|
Loading…
Reference in a new issue