diff --git a/services/web/app/views/project/editor/editor.pug b/services/web/app/views/project/editor/editor.pug index 6c062f3cbe..e8217a9319 100644 --- a/services/web/app/views/project/editor/editor.pug +++ b/services/web/app/views/project/editor/editor.pug @@ -16,7 +16,7 @@ div.full-size( 'rp-state-current-file-expanded': (reviewPanel.subView === SubViews.CUR_FILE && ui.reviewPanelOpen),\ 'rp-state-current-file-mini': (reviewPanel.subView === SubViews.CUR_FILE && !ui.reviewPanelOpen),\ 'rp-state-overview': (reviewPanel.subView === SubViews.OVERVIEW),\ - 'rp-size-mini': (!ui.reviewPanelOpen && reviewPanel.hasEntries),\ + 'rp-size-mini': ui.miniReviewPanelVisible,\ 'rp-size-expanded': ui.reviewPanelOpen,\ 'rp-layout-left': reviewPanel.layoutToLeft,\ 'rp-loading-threads': reviewPanel.loadingThreads,\ diff --git a/services/web/public/coffee/ide.coffee b/services/web/public/coffee/ide.coffee index 9fbbfe9937..dabf166578 100644 --- a/services/web/public/coffee/ide.coffee +++ b/services/web/public/coffee/ide.coffee @@ -70,6 +70,7 @@ define [ chatOpen: false pdfLayout: 'sideBySide' reviewPanelOpen: localStorage("ui.reviewPanelOpen.#{window.project_id}") + miniReviewPanelVisible: false } $scope.user = window.user 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 bf3f96ffc3..101915a4dc 100644 --- a/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee +++ b/services/web/public/coffee/ide/review-panel/controllers/ReviewPanelController.coffee @@ -126,6 +126,12 @@ define [ else $reviewPanelEl.css "right", "0" + $scope.$watch "!ui.reviewPanelOpen && reviewPanel.hasEntries", (open, prevVal) -> + return if !open? + $scope.ui.miniReviewPanelVisible = open + if open != prevVal + $timeout () -> $scope.$broadcast "review-panel:toggle" + $scope.$watch "ui.reviewPanelOpen", (open) -> return if !open? if !open