From 3886e62a7b4d0e9627e66a3376215a4feca1589c Mon Sep 17 00:00:00 2001 From: Connor Turland Date: Sun, 17 Sep 2017 09:01:44 -0400 Subject: [PATCH] make desc edit area larger and resizable --- app/assets/stylesheets/base.scss.erb | 12 ++++-------- frontend/src/components/TopicCard/Desc.js | 1 + 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/app/assets/stylesheets/base.scss.erb b/app/assets/stylesheets/base.scss.erb index 6415d535..3871fd18 100644 --- a/app/assets/stylesheets/base.scss.erb +++ b/app/assets/stylesheets/base.scss.erb @@ -139,14 +139,12 @@ $mid-gray-opacity: rgba(66, 66, 66, 0.6); font-family: helvetica, sans-serif; color: #424242; padding: 0; - width: 100%; + width: 258px; margin: 0; border: 0; outline: none; - font-size: 12px; - line-height: 15px; background: none; - resize: none; + overflow-y: scroll; } /* @@ -180,11 +178,9 @@ $mid-gray-opacity: rgba(66, 66, 66, 0.6); .CardOnGraph .riek_desc { display:block; - margin-top:2px; - padding-right: 18px; - margin-right: 8px; + padding-right: 26px; } -.canEdit .CardOnGraph .riek_desc:hover { +.canEdit .CardOnGraph .riek_desc:not(.riek-editing):hover { background-image: url(<%= asset_data_uri('edit.png') %>); background-position: top right; background-repeat: no-repeat; diff --git a/frontend/src/components/TopicCard/Desc.js b/frontend/src/components/TopicCard/Desc.js index 9529cbfe..fa3383e8 100644 --- a/frontend/src/components/TopicCard/Desc.js +++ b/frontend/src/components/TopicCard/Desc.js @@ -38,6 +38,7 @@ class Desc extends Component { change={this.props.onChange} className="riek_desc" classEditing="riek-editing" + rows="6" editProps={{ onKeyPress: e => { const ENTER = 13