From 5408f8328bd3a34f17cfd9fe5a880beb28f36d03 Mon Sep 17 00:00:00 2001 From: Keeyan Ghoreshi Date: Fri, 3 Aug 2018 14:24:39 -0400 Subject: [PATCH 1/8] Changed "Enter Value" to "Add Remarks" --- src/components/editor/State.css | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/editor/State.css b/src/components/editor/State.css index face804..452df23 100644 --- a/src/components/editor/State.css +++ b/src/components/editor/State.css @@ -60,11 +60,11 @@ span.editable-text:empty { } span.editable-text:empty:after { - content: 'Enter value'; + content: 'Add Remarks'; } -span.editable-text > :empty:after { - content: 'Enter value'; +span.editable-text > :first-child:empty:after { + content: 'Add Remarks'; } .section { From d6466d487552637a364d72b38f6743024195ba99 Mon Sep 17 00:00:00 2001 From: Keeyan Ghoreshi Date: Mon, 6 Aug 2018 13:11:23 -0400 Subject: [PATCH 2/8] changed text area behavior to avoid empty spans being added with breaks --- src/components/editor/State.css | 22 ++++++++++++-- src/components/editor/State.js | 9 +++--- src/components/editor/TextArea.js | 49 +++++++++++++++++++++++++++++++ 3 files changed, 74 insertions(+), 6 deletions(-) create mode 100644 src/components/editor/TextArea.js diff --git a/src/components/editor/State.css b/src/components/editor/State.css index 452df23..e87a24a 100644 --- a/src/components/editor/State.css +++ b/src/components/editor/State.css @@ -51,6 +51,15 @@ textarea { padding-right: .2em; } +.remarks-text { + font-style: italic; + text-decoration: underline !important; + cursor: text; + color: #336699 !important; + padding-left: .2em; + padding-right: .2em; +} + .editable-error { color: #ff3300 !important; } @@ -59,14 +68,22 @@ span.editable-text:empty { color: #ff3300 !important; } -span.editable-text:empty:after { +span.remarks-text:empty:after { content: 'Add Remarks'; } -span.editable-text > :first-child:empty:after { +span.remarks-text > :empty:after { content: 'Add Remarks'; } +span.editable-text:empty:after { + content: 'Enter Value'; +} + +span.editable-text > :empty:after { + content: 'Enter Value'; +} + .section { position: relative; padding-left: 10px; @@ -91,3 +108,4 @@ span.editable-text > :first-child:empty:after { .warning { color: #ff3300; } + diff --git a/src/components/editor/State.js b/src/components/editor/State.js index 3a2f644..150d91e 100644 --- a/src/components/editor/State.js +++ b/src/components/editor/State.js @@ -12,7 +12,7 @@ import ConditionalEditor from './Conditional'; import Transition from './Transition'; import { getTemplate } from '../../templates/Templates'; import { BasicTutorial, EditTutorial } from '../../templates/Tutorial'; - +import TextArea from './TextArea' import './State.css'; @@ -123,7 +123,6 @@ class StateEditor extends Component { let remarks = this.props.state.remarks ||""; remarks = Array.isArray(remarks)? remarks.join("\n"): remarks; - const transitionType = (this.props.state.transition||{}).type; return (
@@ -133,8 +132,8 @@ class StateEditor extends Component {

State Type:
- -
+