From 8a11c8c3caf2fc77445738d0cda6ffe16ff7d93b Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Tue, 15 Nov 2016 16:02:12 +0000 Subject: [PATCH] Show add comment button when review panel is off. --- .../web/app/views/project/editor/editor.jade | 19 +++++++++++++++---- .../stylesheets/app/editor/review-panel.less | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 6 deletions(-) diff --git a/services/web/app/views/project/editor/editor.jade b/services/web/app/views/project/editor/editor.jade index 7206cd4cfd..fe853ea81d 100644 --- a/services/web/app/views/project/editor/editor.jade +++ b/services/web/app/views/project/editor/editor.jade @@ -58,10 +58,21 @@ div.full-size( .rp-entry-callout( ng-class="'rp-entry-callout-' + entry.type" ) - .rp-entry-indicator(ng-switch="entry.type") - i.fa.fa-pencil(ng-switch-when="insert") - i.rp-icon-delete(ng-switch-when="delete") - i.fa.fa-comment(ng-switch-when="comment") + + div(ng-switch="entry.type") + .rp-entry-indicator(ng-switch-when="insert") + i.fa.fa-pencil + .rp-entry-indicator(ng-switch-when="delete") + i.rp-icon-delete + .rp-entry-indicator(ng-switch-when="comment") + i.fa.fa-comment + .rp-entry-indicator( + ng-switch-when="add-comment" + ng-if="!commentState.adding" + ng-click="startNewComment(); toggleReviewPanel();" + ) + i.fa.fa-commenting + .rp-entry( ng-class="[ 'rp-entry-' + entry.type, (commentState.adding ? 'rp-entry-adding-comment' : ''), (entry.focused ? 'rp-entry-focused' : '')]" ) diff --git a/services/web/public/stylesheets/app/editor/review-panel.less b/services/web/public/stylesheets/app/editor/review-panel.less index b184548f9b..b2d0b62356 100644 --- a/services/web/public/stylesheets/app/editor/review-panel.less +++ b/services/web/public/stylesheets/app/editor/review-panel.less @@ -113,7 +113,9 @@ } .rp-entry-wrapper { - &:hover > .rp-entry { + &:hover > .rp-entry-insert, + &:hover > .rp-entry-delete, + &:hover > .rp-entry-comment { display: block; } } @@ -148,7 +150,7 @@ border-color: @rp-yellow; } - &-focus-position { + &-add-comment { background-color: transparent; right: auto; border-left-width: 0; @@ -429,6 +431,17 @@ right: 10px; z-index: 1; } + + &-add-comment { + right: auto; + width: auto; + + &.rp-entry-adding-comment { + right: 5px; + } + } + + } .rp-entry-indicator {