From 2dbcd6c97c58820fe111da8574dd7e1a52770c19 Mon Sep 17 00:00:00 2001 From: Nancy <42977925+mantis-toboggan-md@users.noreply.github.com> Date: Wed, 18 Sep 2024 07:26:42 -0700 Subject: [PATCH] Fix yaml editor styling (#11823) * fix codemirror styling * fix keyvalue codemirror style * fix codemirror json annotation display * fix fold gutters --- shell/components/CodeMirror.vue | 149 ++++++++++++++++++-------------- shell/components/YamlEditor.vue | 2 +- 2 files changed, 83 insertions(+), 68 deletions(-) diff --git a/shell/components/CodeMirror.vue b/shell/components/CodeMirror.vue index 268caa645f9..e40b27a29fa 100644 --- a/shell/components/CodeMirror.vue +++ b/shell/components/CodeMirror.vue @@ -57,7 +57,7 @@ export default { theme: `base16-${ theme }`, lineNumbers: true, line: true, - styleActiveLine: true, + styleActiveLine: false, lineWrapping: true, foldGutter: true, styleSelectedText: true, @@ -66,6 +66,7 @@ export default { if (this.asTextArea) { out.lineNumbers = false; + out.foldGutter = false; out.tabSize = 0; out.extraKeys = { Tab: false }; } @@ -178,6 +179,7 @@ export default { :value="value" :options="combinedOptions" :disabled="isDisabled" + :original-style="true" @ready="onReady" @input="onInput" @changes="onChanges" @@ -194,72 +196,8 @@ export default { diff --git a/shell/components/YamlEditor.vue b/shell/components/YamlEditor.vue index 6b1b7c40948..7cb761adb81 100644 --- a/shell/components/YamlEditor.vue +++ b/shell/components/YamlEditor.vue @@ -103,7 +103,7 @@ export default { mode: 'yaml', lint: !readOnly, lineNumbers: !readOnly, - styleActiveLine: true, + styleActiveLine: false, tabSize: 2, indentWithTabs: false, cursorBlinkRate: ( readOnly ? -1 : 530 ),