Remove $wgCodeMirrorColorblindColors feature flag

Bug: T307188
Change-Id: I7a8f2b02cad160df838ebfb167b63296123b4a08
This commit is contained in:
WMDE-Fisch 2022-06-13 13:20:24 +02:00
parent 9f34c4d220
commit 574ceba9bf
4 changed files with 8 additions and 18 deletions

View file

@ -15,11 +15,6 @@
"MediaWiki": ">= 1.38.0"
},
"config": {
"CodeMirrorColorblindColors": {
"value": false,
"description": "Temporary feature flag for colorblind-friendly colors.",
"public": true
},
"CodeMirrorLineNumberingNamespaces": {
"value": null,
"description": "List of namespace IDs where line numbering should be enabled, or `null` to enable for all namespaces. Set to [] to disable everywhere. Defaults to `null` for all namespaces.",

View file

@ -64,8 +64,6 @@ class Hooks {
/** @var Config $config */
$config = MediaWikiServices::getInstance()->getMainConfig();
$vars['wgCodeMirrorColorblindColors'] = $config->get( 'CodeMirrorColorblindColors' );
$vars['wgCodeMirrorLineNumberingNamespaces'] = $config->get( 'CodeMirrorLineNumberingNamespaces' );
}
@ -84,8 +82,6 @@ class Hooks {
'type' => 'api',
];
$config = MediaWikiServices::getInstance()->getMainConfig();
if ( $config->get( 'CodeMirrorColorblindColors' ) ) {
$defaultPreferences['usecodemirror-colorblind'] = [
'type' => 'toggle',
'label-message' => 'codemirror-prefs-colorblind',
@ -93,6 +89,5 @@ class Hooks {
'section' => 'editing/accessibility',
];
}
}
}

View file

@ -248,7 +248,7 @@
// T194102: UniversalLanguageSelector integration is buggy, disabling it completely
.addClass( 'noime' );
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
if ( mw.user.options.get( 'usecodemirror-colorblind' ) ) {
$codeMirror.addClass( 'cm-mw-colorblind-colors' );
}

View file

@ -119,7 +119,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) {
// so revert any editfont user preference
surfaceView.$element.removeClass( 'mw-editfont-sans-serif mw-editfont-serif' ).addClass( 'mw-editfont-monospace' );
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
if ( mw.user.options.get( 'usecodemirror-colorblind' ) ) {
surfaceView.$element.addClass( 'cm-mw-colorblind-colors' );
}