From aef76f6c41f1e93a52036653ffbaa9505f43b421 Mon Sep 17 00:00:00 2001 From: Prendota Date: Thu, 15 Nov 2018 12:05:03 +0300 Subject: [PATCH 1/3] BREAKING CHANGES: fix close console button position in container `js-code-output-canvas-placeholder` class -> `.js-code-output-executor` --- src/executable-code/executable-fragment.js | 2 +- src/executable-code/executable-fragment.monk | 8 +++---- src/js-executor/index.scss | 1 - src/styles.scss | 22 +++++++++++--------- 4 files changed, 17 insertions(+), 16 deletions(-) diff --git a/src/executable-code/executable-fragment.js b/src/executable-code/executable-fragment.js index 6ea2a924..2eb0904a 100644 --- a/src/executable-code/executable-fragment.js +++ b/src/executable-code/executable-fragment.js @@ -24,7 +24,7 @@ const KEY_CODES = { const DEBOUNCE_TIME = 500; const SELECTORS = { - CANVAS_PLACEHOLDER_OUTPUT: ".js-code-output-canvas-placeholder", + CANVAS_PLACEHOLDER_OUTPUT: ".js-code-output-executor", FOLD_BUTTON: ".fold-button", UNMODIFIABLE_LINE_DARK: "unmodifiable-line-dark", UNMODIFIABLE_LINE: "unmodifiable-line", diff --git a/src/executable-code/executable-fragment.monk b/src/executable-code/executable-fragment.monk index 77a4b91c..b22b42af 100644 --- a/src/executable-code/executable-fragment.monk +++ b/src/executable-code/executable-fragment.monk @@ -14,10 +14,10 @@ {% endif %} - {% if (openConsole) %} -
- {% endif %} -
+
+ {% if (openConsole) %} +
+ {% endif %} {% if (waitingForOutput) %}
diff --git a/src/js-executor/index.scss b/src/js-executor/index.scss index b7e59065..e8351931 100644 --- a/src/js-executor/index.scss +++ b/src/js-executor/index.scss @@ -1,6 +1,5 @@ .k2js-iframe { display: none; - padding-top: 2px } iframe { border: none; diff --git a/src/styles.scss b/src/styles.scss index f8f90450..753f55a0 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -28,7 +28,9 @@ $wt-color-azure: #167dff; } .executable-fragment { - border: 1px solid $wt-color-athens; + border-top: 1px solid $wt-color-athens; + border-right: 1px solid $wt-color-athens; + border-left: 1px solid $wt-color-athens; } .hidden-dependency { @@ -109,9 +111,8 @@ $wt-color-azure: #167dff; height: 20px; width: 16px; cursor: pointer; - background: url("img/run.svg"); background-size: cover; - background-repeat: no-repeat; + background: url("img/run.svg") no-repeat; &._disabled { cursor: default; @@ -209,8 +210,13 @@ $wt-color-azure: #167dff; padding-bottom: 2px; } -.output-wrapper { +.js-code-output-executor { border-top: 1px solid $wt-color-athens; + position: relative; +} + +.output-wrapper { + border-bottom: 1px solid $wt-color-athens; min-height: 60px; font-size: 14px; background-color: white; @@ -262,11 +268,10 @@ $wt-color-azure: #167dff; .console-close { position: absolute; - right: 1px; - margin-top: 1px; + right: 0; width: 16px; height: 16px; - background: $wt-color-silver url('img/close-console-icon.svg'); + background: $wt-color-silver url('img/close-console-icon.svg') no-repeat; } .console-close.darcula { @@ -396,9 +401,6 @@ $wt-color-azure: #167dff; } } -.executable-fragment-wrapper { -} - .CodeMirror-hints { padding-left: 0 !important; border: 1px solid $wt-color-silver; From eba13cada04fc0558d613ac903c08c64e3217982 Mon Sep 17 00:00:00 2001 From: Prendota Date: Thu, 15 Nov 2018 12:12:54 +0300 Subject: [PATCH 2/3] fix(console): clear exception state after cleaning the console --- src/executable-code/executable-fragment.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/executable-code/executable-fragment.js b/src/executable-code/executable-fragment.js index 2eb0904a..7e20c15d 100644 --- a/src/executable-code/executable-fragment.js +++ b/src/executable-code/executable-fragment.js @@ -230,7 +230,7 @@ export default class ExecutableFragment extends ExecutableCodeTemplate { if (targetPlatform === TargetPlatform.CANVAS) { this.jsExecutor.reloadIframeScripts(jsLibs, this.getNodeForMountIframe(TargetPlatform.CANVAS)); } - this.update({output: "", openConsole: false}); + this.update({output: "", openConsole: false, exception: null}); if (onCloseConsole) onCloseConsole(); } From f1dfbd8ede7721e5bec7c723c0bb61b7536100fe Mon Sep 17 00:00:00 2001 From: Prendota Date: Thu, 15 Nov 2018 12:19:38 +0300 Subject: [PATCH 3/3] style(editor): simplify border styles --- src/styles.scss | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/styles.scss b/src/styles.scss index 753f55a0..304d1501 100644 --- a/src/styles.scss +++ b/src/styles.scss @@ -28,9 +28,8 @@ $wt-color-azure: #167dff; } .executable-fragment { - border-top: 1px solid $wt-color-athens; - border-right: 1px solid $wt-color-athens; - border-left: 1px solid $wt-color-athens; + border: 1px solid $wt-color-athens; + border-bottom-width: 0; } .hidden-dependency {