mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CodeMirror
synced 2024-11-27 15:40:00 +00:00
Remove $wgCodeMirrorAccessibilityColors feature flag
Get rid of the flag, without making any substantial changes to the code. A follow-up commit will merge the CSS into base rules. Bug: T307188 Change-Id: I601df5047d0db3cfb9559538487d3d39bb6c7cf4
This commit is contained in:
parent
cca42569b5
commit
396d50cd5d
|
@ -20,14 +20,9 @@
|
|||
"description": "Temporary feature flag for the matchbrackets addon.",
|
||||
"public": true
|
||||
},
|
||||
"CodeMirrorAccessibilityColors": {
|
||||
"value": false,
|
||||
"description": "Temporary feature flag for accessibility colors.",
|
||||
"public": true
|
||||
},
|
||||
"CodeMirrorColorblindColors": {
|
||||
"value": false,
|
||||
"description": "Temporary feature flag for colorblind-friendly colors. Depends on the CodeMirrorAccessibilityColors setting being enabled as well.",
|
||||
"description": "Temporary feature flag for colorblind-friendly colors.",
|
||||
"public": true
|
||||
},
|
||||
"CodeMirrorLineNumberingNamespaces": {
|
||||
|
|
|
@ -70,8 +70,6 @@ class Hooks {
|
|||
|| RequestContext::getMain()->getRequest()
|
||||
->getCookie( '-codemirror-bracket-matching-test', 'mw' );
|
||||
|
||||
$vars['wgCodeMirrorAccessibilityColors'] = $config->get( 'CodeMirrorAccessibilityColors' );
|
||||
|
||||
$vars['wgCodeMirrorColorblindColors'] = $config->get( 'CodeMirrorColorblindColors' );
|
||||
|
||||
$vars['wgCodeMirrorLineNumberingNamespaces'] = $config->get( 'CodeMirrorLineNumberingNamespaces' );
|
||||
|
@ -93,7 +91,7 @@ class Hooks {
|
|||
];
|
||||
|
||||
$config = MediaWikiServices::getInstance()->getMainConfig();
|
||||
if ( $config->get( 'CodeMirrorAccessibilityColors' ) && $config->get( 'CodeMirrorColorblindColors' ) ) {
|
||||
if ( $config->get( 'CodeMirrorColorblindColors' ) ) {
|
||||
$defaultPreferences['usecodemirror-colorblind'] = [
|
||||
'type' => 'toggle',
|
||||
'label-message' => 'codemirror-prefs-colorblind',
|
||||
|
|
|
@ -250,11 +250,9 @@
|
|||
// T194102: UniversalLanguageSelector integration is buggy, disabling it completely
|
||||
.addClass( 'noime' );
|
||||
|
||||
if ( mw.config.get( 'wgCodeMirrorAccessibilityColors' ) ) {
|
||||
$codeMirror.addClass( 'cm-mw-accessible-colors' );
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
$codeMirror.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
$codeMirror.addClass( 'cm-mw-accessible-colors' );
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
$codeMirror.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
|
||||
// T305333: Reload CodeMirror to fix a cursor caret issue.
|
||||
|
|
|
@ -121,11 +121,9 @@ 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( 'wgCodeMirrorAccessibilityColors' ) ) {
|
||||
surfaceView.$element.addClass( 'cm-mw-accessible-colors' );
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
surfaceView.$element.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
surfaceView.$element.addClass( 'cm-mw-accessible-colors' );
|
||||
if ( mw.config.get( 'wgCodeMirrorColorblindColors' ) && mw.user.options.get( 'usecodemirror-colorblind' ) ) {
|
||||
surfaceView.$element.addClass( 'cm-mw-colorblind-colors' );
|
||||
}
|
||||
|
||||
var profile = $.client.profile();
|
||||
|
|
Loading…
Reference in a new issue