From 15de552c2cf82157ef01db10b57d8ed0cbb7e220 Mon Sep 17 00:00:00 2001 From: Paulo Reis Date: Tue, 4 Apr 2017 10:40:53 +0100 Subject: [PATCH] Make new add comment button styles as the default; removed old add comment button code. --- services/web/app/views/project/editor/editor.pug | 1 - .../web/app/views/project/editor/review-panel.pug | 10 ---------- .../controllers/ReviewPanelController.coffee | 6 ------ .../review-panel/directives/addCommentEntry.coffee | 1 - .../public/stylesheets/app/editor/review-panel.less | 12 +++++++----- 5 files changed, 7 insertions(+), 23 deletions(-) diff --git a/services/web/app/views/project/editor/editor.pug b/services/web/app/views/project/editor/editor.pug index ce24108f77..6c062f3cbe 100644 --- a/services/web/app/views/project/editor/editor.pug +++ b/services/web/app/views/project/editor/editor.pug @@ -20,7 +20,6 @@ div.full-size( 'rp-size-expanded': ui.reviewPanelOpen,\ 'rp-layout-left': reviewPanel.layoutToLeft,\ 'rp-loading-threads': reviewPanel.loadingThreads,\ - 'rp-new-comment-ui': reviewPanel.newAddCommentUI\ }" ) .loading-panel(ng-show="!editor.sharejs_doc || editor.opening") diff --git a/services/web/app/views/project/editor/review-panel.pug b/services/web/app/views/project/editor/review-panel.pug index ca9edbf14f..2035af4775 100644 --- a/services/web/app/views/project/editor/review-panel.pug +++ b/services/web/app/views/project/editor/review-panel.pug @@ -81,8 +81,6 @@ on-start-new="startNewComment();" on-submit="submitNewComment(content);" on-cancel="cancelNewComment();" - on-indicator-click="toggleReviewPanel();" - layout-to-left="reviewPanel.layoutToLeft" ) .rp-entry-list( @@ -322,14 +320,6 @@ script(type='text/ng-template', id='resolvedCommentEntryTemplate') script(type='text/ng-template', id='addCommentEntryTemplate') div .rp-entry-callout.rp-entry-callout-add-comment - .rp-entry-indicator.rp-entry-indicator-add-comment( - ng-if="!commentState.adding" - ng-click="startNewComment(); onIndicatorClick();" - tooltip=translate("add_comment") - tooltip-placement="{{ layoutToLeft ? 'left' : 'right' }}" - tooltip-append-to-body="true" - ) - i.fa.fa-commenting .rp-entry.rp-entry-add-comment( ng-class="[ (state.isAdding ? 'rp-entry-adding-comment' : ''), (entry.focused ? 'rp-entry-focused' : '')]" ) 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 d80c903b57..bf3f96ffc3 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -24,7 +24,6 @@ define [ loading: false commentThreads: {} resolvedThreadIds: {} - layoutToLeft: false rendererData: {} loadingThreads: false @@ -37,11 +36,9 @@ define [ localStorage("docs_collapsed_state:#{$scope.project_id}", valToStore) $scope.$on "layout:pdf:linked", (event, state) -> - $scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed) $scope.$broadcast "review-panel:layout" $scope.$on "layout:pdf:resize", (event, state) -> - $scope.reviewPanel.layoutToLeft = (state.east?.size < 220 || state.east?.initClosed) $scope.$broadcast "review-panel:layout", false $scope.$on "expandable-text-area:resize", (event) -> @@ -50,9 +47,6 @@ define [ $scope.$on "review-panel:sizes", (e, sizes) -> $scope.$broadcast "editor:set-scroll-size", sizes - - $scope.$watch "ui.pdfLayout", (layout) -> - $scope.reviewPanel.layoutToLeft = (layout == "flat") $scope.$watch "project.features.trackChangesVisible", (visible) -> return if !visible? diff --git a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee index 9d33bcb35a..d7224bc6f1 100644 --- a/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee +++ b/services/web/public/coffee/ide/review-panel/directives/addCommentEntry.coffee @@ -8,7 +8,6 @@ define [ onStartNew: "&" onSubmit: "&" onCancel: "&" - onIndicatorClick: "&" layoutToLeft: "=" link: (scope, element, attrs) -> scope.state = diff --git a/services/web/public/stylesheets/app/editor/review-panel.less b/services/web/public/stylesheets/app/editor/review-panel.less index c069c536e2..59f0e40566 100644 --- a/services/web/public/stylesheets/app/editor/review-panel.less +++ b/services/web/public/stylesheets/app/editor/review-panel.less @@ -96,10 +96,12 @@ flex-direction: column; width: @review-panel-width; overflow: visible; + border-left-width: 1px; } .rp-size-mini & { width: @review-off-width; z-index: 6; + border-left-width: 1px; } position: absolute; @@ -107,7 +109,7 @@ bottom: 0px; right: 0px; background-color: @rp-bg-blue; - border-left: solid 1px @rp-border-grey; + border-left: solid 0px @rp-border-grey; font-size: @rp-base-font-size; color: @rp-type-blue; z-index: 6; @@ -181,6 +183,9 @@ .rp-size-mini & { display: block; } + .rp-size-mini &-add-comment { + display: none; + } position: absolute; left: 2px; right: 2px; @@ -200,9 +205,6 @@ z-index: 1; } - .rp-new-comment-ui &-add-comment { - display: none; - } } .rp-entry-wrapper { @@ -576,7 +578,7 @@ } } - .rp-size-mini.rp-new-comment-ui &-add-comment { + .rp-size-mini &-add-comment { display: none; } }