From ce56a796031aac4fdf30e7b5426d43fc227bf12f Mon Sep 17 00:00:00 2001 From: David <33458145+davidmcpowell@users.noreply.github.com> Date: Tue, 15 Jul 2025 09:58:18 +0100 Subject: [PATCH] Merge pull request #27053 from overleaf/dp-review-panel-disabled Disable review panel tab when it cannot be opened in new editor GitOrigin-RevId: 586ef06bc7cd27efdec6cb7ccc287f4ad41e4da5 --- .../web/frontend/js/features/ide-redesign/components/rail.tsx | 3 ++- .../frontend/stylesheets/bootstrap-5/pages/editor/rail.scss | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/services/web/frontend/js/features/ide-redesign/components/rail.tsx b/services/web/frontend/js/features/ide-redesign/components/rail.tsx index 877e40666e..0c8d49202d 100644 --- a/services/web/frontend/js/features/ide-redesign/components/rail.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/rail.tsx @@ -142,6 +142,7 @@ export const RailLayout = () => { title: t('review_panel'), component: null, hide: !features.trackChangesVisible, + disabled: view !== 'editor', }, { key: 'chat', @@ -160,7 +161,7 @@ export const RailLayout = () => { disabled: errorLogsDisabled, }, ], - [t, features.trackChangesVisible, newErrorlogs, errorLogsDisabled] + [t, features.trackChangesVisible, newErrorlogs, errorLogsDisabled, view] ) const railActions: RailAction[] = useMemo( diff --git a/services/web/frontend/stylesheets/bootstrap-5/pages/editor/rail.scss b/services/web/frontend/stylesheets/bootstrap-5/pages/editor/rail.scss index bc8e42daaa..46f30a3028 100644 --- a/services/web/frontend/stylesheets/bootstrap-5/pages/editor/rail.scss +++ b/services/web/frontend/stylesheets/bootstrap-5/pages/editor/rail.scss @@ -65,6 +65,10 @@ body { position: relative; overflow: visible; + &.disabled { + color: var(--content-disabled-themed); + } + &:visited, &:focus { color: var(--ide-rail-color);