From 49e0572611e4b640daf14383f9cf6158964e861a Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Wed, 30 Jan 2019 16:42:44 +0100 Subject: [PATCH 1/3] fix: Error tooltip should have white text on red background. Not red text on red background --- packages/grafana-ui/src/components/Tooltip/_Tooltip.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/grafana-ui/src/components/Tooltip/_Tooltip.scss b/packages/grafana-ui/src/components/Tooltip/_Tooltip.scss index 503b977bbf0..a33724b3460 100644 --- a/packages/grafana-ui/src/components/Tooltip/_Tooltip.scss +++ b/packages/grafana-ui/src/components/Tooltip/_Tooltip.scss @@ -31,7 +31,7 @@ $popper-margin-from-ref: 5px; // Themes &.popper__background--error { - @include popper-theme($tooltipBackgroundError, $tooltipBackgroundError); + @include popper-theme($tooltipBackgroundError, $white); } &.popper__background--info { From 2d4e1a80bc968f562aa7b3be9b42266aa028bc51 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Mon, 4 Feb 2019 14:50:10 +0100 Subject: [PATCH 2/3] chore: wip: Replace brace with ace-builds to get latest version of ace --- package.json | 2 +- .../components/code_editor/code_editor.ts | 28 +++++++++---------- yarn.lock | 17 ++++------- 3 files changed, 20 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index f004ee07732..f26cadbe4bf 100644 --- a/package.json +++ b/package.json @@ -151,13 +151,13 @@ "dependencies": { "@babel/polyfill": "^7.0.0", "@torkelo/react-select": "2.1.1", + "ace-builds": "^1.4.2", "angular": "1.6.6", "angular-bindonce": "0.3.1", "angular-native-dragdrop": "1.2.2", "angular-route": "1.6.6", "angular-sanitize": "1.6.6", "baron": "^3.0.3", - "brace": "^0.10.0", "classnames": "^2.2.6", "clipboard": "^1.7.1", "d3": "^4.11.0", diff --git a/public/app/core/components/code_editor/code_editor.ts b/public/app/core/components/code_editor/code_editor.ts index ca9023e8657..004edb780b8 100644 --- a/public/app/core/components/code_editor/code_editor.ts +++ b/public/app/core/components/code_editor/code_editor.ts @@ -30,20 +30,20 @@ import coreModule from 'app/core/core_module'; import config from 'app/core/config'; -import ace from 'brace'; +import * as ace from 'ace-builds/src-noconflict/ace'; import './theme-grafana-dark'; -import 'brace/ext/language_tools'; -import 'brace/theme/textmate'; -import 'brace/mode/text'; -import 'brace/snippets/text'; -import 'brace/mode/sql'; -import 'brace/snippets/sql'; -import 'brace/mode/sqlserver'; -import 'brace/snippets/sqlserver'; -import 'brace/mode/markdown'; -import 'brace/snippets/markdown'; -import 'brace/mode/json'; -import 'brace/snippets/json'; +import 'ace-builds/src-noconflict/ext-language_tools'; +import 'ace-builds/src-noconflict/theme-textmate'; +import 'ace-builds/src-noconflict/mode-text'; +import 'ace-builds/src-noconflict/snippets/text'; +import 'ace-builds/src-noconflict/mode-sql'; +import 'ace-builds/src-noconflict/snippets/sql'; +import 'ace-builds/src-noconflict/mode-sqlserver'; +import 'ace-builds/src-noconflict/snippets/sqlserver'; +import 'ace-builds/src-noconflict/mode-markdown'; +import 'ace-builds/src-noconflict/snippets/markdown'; +import 'ace-builds/src-noconflict/mode-json'; +import 'ace-builds/src-noconflict/snippets/json'; const DEFAULT_THEME_DARK = 'ace/theme/grafana-dark'; const DEFAULT_THEME_LIGHT = 'ace/theme/textmate'; @@ -143,7 +143,7 @@ function link(scope, elem, attrs) { }); function setLangMode(lang) { - ace.acequire('ace/ext/language_tools'); + // ace.acequire('ace/ext/language_tools'); // TODO: Do we need this? codeEditor.setOptions({ enableBasicAutocompletion: true, enableLiveAutocompletion: true, diff --git a/yarn.lock b/yarn.lock index 2fb4a5d3ee2..ac6c8c9ce78 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2265,6 +2265,11 @@ accepts@~1.3.4, accepts@~1.3.5: mime-types "~2.1.18" negotiator "0.6.1" +ace-builds@^1.4.2: + version "1.4.2" + resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.4.2.tgz#6afc2e43a7b5effdc44d8407436112852568e80d" + integrity sha512-M1JtZctO2Zg+1qeGUFZXtYKsyaRptqQtqpVzlj80I0NzGW9MF3um0DBuizIvQlrPYUlTdm+wcOPZpZoerkxQdA== + acorn-dynamic-import@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" @@ -4125,13 +4130,6 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" -brace@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/brace/-/brace-0.10.0.tgz#edef4eb9b0928ba1ee5f717ffc157749a6dd5d76" - integrity sha1-7e9OubCSi6HuX3F//BV3SabdXXY= - dependencies: - w3c-blob "0.0.1" - braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -17283,11 +17281,6 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" -w3c-blob@0.0.1: - version "0.0.1" - resolved "https://registry.yarnpkg.com/w3c-blob/-/w3c-blob-0.0.1.tgz#b0cd352a1a50f515563420ffd5861f950f1d85b8" - integrity sha1-sM01KhpQ9RVWNCD/1YYflQ8dhbg= - w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045" From 2a655cb38a57022a95a890e3be9d8eaff42756c3 Mon Sep 17 00:00:00 2001 From: Johannes Schill Date: Tue, 12 Feb 2019 12:35:06 +0100 Subject: [PATCH 3/3] Revert "chore: wip: Replace brace with ace-builds to get latest version of ace" This reverts commit c98b86fd6b58ac5f77c197d7551751e62d53bedd. --- package.json | 2 +- .../components/code_editor/code_editor.ts | 28 +++++++++---------- yarn.lock | 17 +++++++---- 3 files changed, 27 insertions(+), 20 deletions(-) diff --git a/package.json b/package.json index f26cadbe4bf..f004ee07732 100644 --- a/package.json +++ b/package.json @@ -151,13 +151,13 @@ "dependencies": { "@babel/polyfill": "^7.0.0", "@torkelo/react-select": "2.1.1", - "ace-builds": "^1.4.2", "angular": "1.6.6", "angular-bindonce": "0.3.1", "angular-native-dragdrop": "1.2.2", "angular-route": "1.6.6", "angular-sanitize": "1.6.6", "baron": "^3.0.3", + "brace": "^0.10.0", "classnames": "^2.2.6", "clipboard": "^1.7.1", "d3": "^4.11.0", diff --git a/public/app/core/components/code_editor/code_editor.ts b/public/app/core/components/code_editor/code_editor.ts index 004edb780b8..ca9023e8657 100644 --- a/public/app/core/components/code_editor/code_editor.ts +++ b/public/app/core/components/code_editor/code_editor.ts @@ -30,20 +30,20 @@ import coreModule from 'app/core/core_module'; import config from 'app/core/config'; -import * as ace from 'ace-builds/src-noconflict/ace'; +import ace from 'brace'; import './theme-grafana-dark'; -import 'ace-builds/src-noconflict/ext-language_tools'; -import 'ace-builds/src-noconflict/theme-textmate'; -import 'ace-builds/src-noconflict/mode-text'; -import 'ace-builds/src-noconflict/snippets/text'; -import 'ace-builds/src-noconflict/mode-sql'; -import 'ace-builds/src-noconflict/snippets/sql'; -import 'ace-builds/src-noconflict/mode-sqlserver'; -import 'ace-builds/src-noconflict/snippets/sqlserver'; -import 'ace-builds/src-noconflict/mode-markdown'; -import 'ace-builds/src-noconflict/snippets/markdown'; -import 'ace-builds/src-noconflict/mode-json'; -import 'ace-builds/src-noconflict/snippets/json'; +import 'brace/ext/language_tools'; +import 'brace/theme/textmate'; +import 'brace/mode/text'; +import 'brace/snippets/text'; +import 'brace/mode/sql'; +import 'brace/snippets/sql'; +import 'brace/mode/sqlserver'; +import 'brace/snippets/sqlserver'; +import 'brace/mode/markdown'; +import 'brace/snippets/markdown'; +import 'brace/mode/json'; +import 'brace/snippets/json'; const DEFAULT_THEME_DARK = 'ace/theme/grafana-dark'; const DEFAULT_THEME_LIGHT = 'ace/theme/textmate'; @@ -143,7 +143,7 @@ function link(scope, elem, attrs) { }); function setLangMode(lang) { - // ace.acequire('ace/ext/language_tools'); // TODO: Do we need this? + ace.acequire('ace/ext/language_tools'); codeEditor.setOptions({ enableBasicAutocompletion: true, enableLiveAutocompletion: true, diff --git a/yarn.lock b/yarn.lock index ac6c8c9ce78..2fb4a5d3ee2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2265,11 +2265,6 @@ accepts@~1.3.4, accepts@~1.3.5: mime-types "~2.1.18" negotiator "0.6.1" -ace-builds@^1.4.2: - version "1.4.2" - resolved "https://registry.yarnpkg.com/ace-builds/-/ace-builds-1.4.2.tgz#6afc2e43a7b5effdc44d8407436112852568e80d" - integrity sha512-M1JtZctO2Zg+1qeGUFZXtYKsyaRptqQtqpVzlj80I0NzGW9MF3um0DBuizIvQlrPYUlTdm+wcOPZpZoerkxQdA== - acorn-dynamic-import@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/acorn-dynamic-import/-/acorn-dynamic-import-3.0.0.tgz#901ceee4c7faaef7e07ad2a47e890675da50a278" @@ -4130,6 +4125,13 @@ brace-expansion@^1.0.0, brace-expansion@^1.1.7: balanced-match "^1.0.0" concat-map "0.0.1" +brace@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/brace/-/brace-0.10.0.tgz#edef4eb9b0928ba1ee5f717ffc157749a6dd5d76" + integrity sha1-7e9OubCSi6HuX3F//BV3SabdXXY= + dependencies: + w3c-blob "0.0.1" + braces@^1.8.2: version "1.8.5" resolved "https://registry.yarnpkg.com/braces/-/braces-1.8.5.tgz#ba77962e12dff969d6b76711e914b737857bf6a7" @@ -17281,6 +17283,11 @@ vm-browserify@0.0.4: dependencies: indexof "0.0.1" +w3c-blob@0.0.1: + version "0.0.1" + resolved "https://registry.yarnpkg.com/w3c-blob/-/w3c-blob-0.0.1.tgz#b0cd352a1a50f515563420ffd5861f950f1d85b8" + integrity sha1-sM01KhpQ9RVWNCD/1YYflQ8dhbg= + w3c-hr-time@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"