diff --git a/services/web/frontend/js/features/review-panel-new/components/review-panel-container.tsx b/services/web/frontend/js/features/review-panel-new/components/review-panel-container.tsx index c24de044a2..93be6ab439 100644 --- a/services/web/frontend/js/features/review-panel-new/components/review-panel-container.tsx +++ b/services/web/frontend/js/features/review-panel-new/components/review-panel-container.tsx @@ -20,23 +20,17 @@ function ReviewPanelContainer() { return null } - // the full-width review panel - if (reviewPanelOpen) { - return ReactDOM.createPortal(, view.scrollDOM) - } + const hasCommentOrChange = hasActiveRange(ranges, threads) + const showPanel = reviewPanelOpen || hasCommentOrChange + const showTrackChangesWidget = wantTrackChanges && !reviewPanelOpen - // the mini review panel - if (hasActiveRange(ranges, threads)) { - return ReactDOM.createPortal( - <> - {wantTrackChanges && } - - , - view.scrollDOM - ) - } - - return null + return ReactDOM.createPortal( + <> + {showTrackChangesWidget && } + {showPanel && } + , + view.scrollDOM + ) } export default memo(ReviewPanelContainer)