From 9903795cff2060526d68d7cc357493e3e3749476 Mon Sep 17 00:00:00 2001 From: anika-ahluwalia Date: Wed, 10 Jun 2020 15:21:07 -0500 Subject: UI cleanup --- src/client/views/nodes/ScriptingBox.scss | 9 ++++++++- src/client/views/nodes/ScriptingBox.tsx | 15 ++++++++------- 2 files changed, 16 insertions(+), 8 deletions(-) (limited to 'src/client/views') diff --git a/src/client/views/nodes/ScriptingBox.scss b/src/client/views/nodes/ScriptingBox.scss index 1e4dc4868..a2e1ad267 100644 --- a/src/client/views/nodes/ScriptingBox.scss +++ b/src/client/views/nodes/ScriptingBox.scss @@ -35,15 +35,20 @@ flex-direction: row; justify-content: center; - + .descriptor { + overflow: hidden; + } .scriptingBox-textArea { flex: 70; height: 100%; + max-width: 95%; + min-width: none; box-sizing: border-box; resize: none; padding: 7px; overflow-y: scroll; + overflow-x: hidden; body { font-family: Arial, Helvetica, sans-serif; @@ -188,8 +193,10 @@ .scriptingBox-toolbar { width: 100%; height: 30px; + overflow: hidden; .scriptingBox-button { + font-size: xx-small; width: 50%; resize: auto; } diff --git a/src/client/views/nodes/ScriptingBox.tsx b/src/client/views/nodes/ScriptingBox.tsx index 61f58cb0f..cf941fb7a 100644 --- a/src/client/views/nodes/ScriptingBox.tsx +++ b/src/client/views/nodes/ScriptingBox.tsx @@ -22,7 +22,6 @@ const _global = (window /* browser */ || global /* node */) as any; import ReactTextareaAutocomplete from "@webscopeio/react-textarea-autocomplete"; import "@webscopeio/react-textarea-autocomplete/style.css"; -//import { ScriptManager } from "../../util/ScriptManager"; const ScriptingSchema = createSchema({}); @@ -240,6 +239,8 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent { + this._errorMessage = ""; + if (this.functionName.length === 0) { this._errorMessage = "Must enter a function name"; return false; @@ -321,12 +322,12 @@ export class ScriptingBox extends ViewBoxAnnotatableComponent; return
this.props.isSelected() && e.stopPropagation()} > -
-
-
Enter a name for this function:
-
{nameInput}
-
Enter a description of this function:
-
{descriptionInput}
+
+
+
Enter a function name:
+
{nameInput}
+
Enter a function description:
+
{descriptionInput}
{this.renderErrorMessage()} -- cgit v1.2.3-70-g09d2