From 7e84f7e3cb41c3f76d9c8ace46bc6adb4d5c555e Mon Sep 17 00:00:00 2001
From: chris <kokosias@yahoo.gr>
Date: Mon, 17 Apr 2017 14:07:54 +0300
Subject: [PATCH] editor always to the left

---
 app/components/SimpleEditor/Editor.js         | 20 -------------------
 app/components/SimpleEditor/SimpleEditor.scss |  9 +--------
 .../SimpleEditor/miniEditor/miniEditor.js     |  1 -
 .../panes/Comments/CommentBoxList.js          |  7 -------
 4 files changed, 1 insertion(+), 36 deletions(-)

diff --git a/app/components/SimpleEditor/Editor.js b/app/components/SimpleEditor/Editor.js
index 88a783a..5af3e2e 100644
--- a/app/components/SimpleEditor/Editor.js
+++ b/app/components/SimpleEditor/Editor.js
@@ -23,9 +23,6 @@ class Editor extends ProseEditor {
     super(parent, props)
 
     this.handleActions({
-      'showComments': function () { this.toggleCommentsArea(true) },
-      'hideComments': function () { this.toggleCommentsArea(false) },
-
       // TODO -- clean them up like changesNotSaved
       'trackChangesUpdate': function () { this.updateTrackChange() },
       'trackChangesViewToggle': function () { this.trackChangesViewToggle() },
@@ -235,22 +232,6 @@ class Editor extends ProseEditor {
     this.extendState({ changesNotSaved: false })
   }
 
-  toggleCommentsArea (show) {
-    var self = this
-
-    setTimeout(function () {
-      var el = self.refs.contentPanel
-
-      if (show && !el.hasClass('sc-has-comments')) {
-        el.addClass('sc-has-comments')
-      }
-
-      if (!show && el.hasClass('sc-has-comments')) {
-        el.removeClass('sc-has-comments')
-      }
-    })
-  }
-
   getChildContext () {
     const oldContext = super.getChildContext()
     const doc = this.doc
@@ -276,7 +257,6 @@ class Editor extends ProseEditor {
       notesProvider: notesProvider,
       fragment: this.props.fragment,
       surfaceManager: this.surfaceManager,
-      toggleCommentsArea: this.toggleCommentsArea,
       update: this.props.update
     })
 
diff --git a/app/components/SimpleEditor/SimpleEditor.scss b/app/components/SimpleEditor/SimpleEditor.scss
index 0bfdb6b..ce130a6 100644
--- a/app/components/SimpleEditor/SimpleEditor.scss
+++ b/app/components/SimpleEditor/SimpleEditor.scss
@@ -263,7 +263,7 @@ $active-blue: #4a90e2;
     color: $transparent-black;
     font-family: 'Fira Sans';
     line-height: 38px;
-    margin: 1.5% 17.8% 7%;
+    margin: 1.5% 23.6% 5% 12%;
     min-height: 100vh;
     padding: 3% 4% 1%;
     transition: .3s;
@@ -314,13 +314,6 @@ $active-blue: #4a90e2;
     }
 } // end sc-content
 
-  .sc-has-comments {
-    div.se-content {
-      margin: 1.5% 23.6% 5% 12%;
-      transition: .3s;
-    }
-  }
-
   .se-context-section {
     background-color: $ultra-light-gray;
     border-left: 1px solid $light-gray;
diff --git a/app/components/SimpleEditor/miniEditor/miniEditor.js b/app/components/SimpleEditor/miniEditor/miniEditor.js
index aefce9d..788f1f1 100644
--- a/app/components/SimpleEditor/miniEditor/miniEditor.js
+++ b/app/components/SimpleEditor/miniEditor/miniEditor.js
@@ -94,7 +94,6 @@ class MiniEditor extends ProseEditor {
       editorSession: this.editorSession,
       fragment: this.props.fragment,
       surfaceManager: this.surfaceManager,
-      toggleCommentsArea: this.toggleCommentsArea,
       update: this.props.update
     })
 
diff --git a/app/components/SimpleEditor/panes/Comments/CommentBoxList.js b/app/components/SimpleEditor/panes/Comments/CommentBoxList.js
index 90f1ca8..d520a5d 100644
--- a/app/components/SimpleEditor/panes/Comments/CommentBoxList.js
+++ b/app/components/SimpleEditor/panes/Comments/CommentBoxList.js
@@ -47,13 +47,6 @@ class CommentBoxList extends Component {
       })
     })
 
-    // toggle comments pane
-    if (listItems.length > 0) {
-      this.send('showComments')
-    } else {
-      this.send('hideComments')
-    }
-
     return $$('ul')
       .addClass('sc-comment-pane-list')
       .append(listItems)
-- 
GitLab