From db5dc6ef15115d7f2b84f54034a947e1f9fc1e00 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 16 Nov 2016 11:03:29 +0000 Subject: [PATCH 1/2] Positive action buttons on the right. --- services/web/app/views/project/editor/editor.jade | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/services/web/app/views/project/editor/editor.jade b/services/web/app/views/project/editor/editor.jade index ab16e9d32b..667d11fcdc 100644 --- a/services/web/app/views/project/editor/editor.jade +++ b/services/web/app/views/project/editor/editor.jade @@ -92,12 +92,12 @@ div.full-size( span(ng-switch-when="delete") Delete  del.rp-content-highlight {{ entry.content }} .rp-entry-actions - a.rp-entry-button(href, ng-click="acceptChange(entry_id)") - i.fa.fa-check - |  Accept a.rp-entry-button(href, ng-click="rejectChange(entry_id)") i.fa.fa-times |  Reject + a.rp-entry-button(href, ng-click="acceptChange(entry_id)") + i.fa.fa-check + |  Accept div(ng-if="entry.type == 'comment'") .rp-comment( ng-repeat="comment in entry.thread" @@ -139,12 +139,12 @@ div.full-size( placeholder="Add your comment here" ) .rp-entry-actions - a.rp-entry-button(href, ng-click="submitNewComment()") - i.fa.fa-comment - |  Comment a.rp-entry-button(href, ng-click="cancelNewComment()") i.fa.fa-times |  Cancel + a.rp-entry-button(href, ng-click="submitNewComment()") + i.fa.fa-comment + |  Comment .ui-layout-east div(ng-if="ui.pdfLayout == 'sideBySide'") From f640c17d4d7d35123b26eaa2d002e5b099528abb Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Wed, 16 Nov 2016 12:31:47 +0000 Subject: [PATCH 2/2] Add review panel substate toggling. --- .../web/app/views/project/editor/editor.jade | 16 ++++++++ .../controllers/ReviewPanelController.coffee | 8 ++++ .../stylesheets/app/editor/review-panel.less | 39 ++++++++++++++++++- 3 files changed, 61 insertions(+), 2 deletions(-) diff --git a/services/web/app/views/project/editor/editor.jade b/services/web/app/views/project/editor/editor.jade index 667d11fcdc..ed19268a7a 100644 --- a/services/web/app/views/project/editor/editor.jade +++ b/services/web/app/views/project/editor/editor.jade @@ -146,6 +146,22 @@ div.full-size( i.fa.fa-comment |  Comment + .rp-nav + a.rp-nav-item( + href + ng-click="setSubView(SubViews.CUR_FILE);" + ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.CUR_FILE }" + ) + i.fa.fa-file-text-o + span.rp-nav-label Current file + a.rp-nav-item( + href + ng-click="setSubView(SubViews.OVERVIEW);" + ng-class="{ 'rp-nav-item-active' : reviewPanel.subView === SubViews.OVERVIEW }" + ) + i.fa.fa-list + span.rp-nav-label Overview + .ui-layout-east div(ng-if="ui.pdfLayout == 'sideBySide'") include ./pdf diff --git a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee index f6a92a384e..a12fe0e549 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -5,10 +5,15 @@ define [ "ide/review-panel/ChangesTracker" ], (App, EventEmitter, ColorManager, ChangesTracker) -> App.controller "ReviewPanelController", ($scope, $element, ide, $timeout) -> + $scope.SubViews = + CUR_FILE : "cur_file" + OVERVIEW : "overview" + $scope.reviewPanel = entries: {} trackNewChanges: false hasEntries: false + subView: $scope.SubViews.CUR_FILE $scope.commentState = adding: false @@ -141,6 +146,9 @@ define [ entry.replyContent = "" $scope.$broadcast "review-panel:layout" + $scope.setSubView = (subView) -> + $scope.reviewPanel.subView = subView + # TODO: Eventually we need to get this from the server, and update it # when we get an id we don't know. This'll do for client side testing refreshUsers = () -> diff --git a/services/web/public/stylesheets/app/editor/review-panel.less b/services/web/public/stylesheets/app/editor/review-panel.less index a92f7aa59e..6d92d01a2f 100644 --- a/services/web/public/stylesheets/app/editor/review-panel.less +++ b/services/web/public/stylesheets/app/editor/review-panel.less @@ -369,6 +369,39 @@ } } +.rp-nav { + display: none; + position: absolute; + bottom: 0; + width: 100%; + font-size: @rp-icon-large-size; + text-align: center; + background-color: @rp-bg-dim-blue; + border-top: solid 1px @rp-border-grey; +} + .rp-nav-item { + color: lighten(@rp-type-blue, 25%); + flex: 0 0 50%; + border-top: solid 3px transparent; + padding-bottom: 2px; + + &:hover, + &:focus { + text-decoration: none; + color: @rp-type-blue; + } + + &-active { + color: @rp-type-blue; + border-top: solid 3px @rp-highlight-blue; + } + } + .rp-nav-label { + display: block; + font-size: @rp-base-font-size; + } + + .has-entries { #editor { right: @review-off-width; @@ -440,11 +473,13 @@ right: 5px; } } - - } .rp-entry-indicator { display: none; } + + .rp-nav { + display: flex; + } } \ No newline at end of file