Merge pull request #28117 from overleaf/dp-tab-headings

Align rail panel headers to use the same font-weight and line-height

GitOrigin-RevId: e982f6d816e2f1b0e8f4a0af603222262d58bab0
This commit is contained in:
David
2025-08-27 08:05:47 +00:00
committed by Copybot
parent e915003a61
commit 43fccf60b9
5 changed files with 21 additions and 5 deletions
@@ -3,16 +3,26 @@ import { ReviewPanelResolvedThreadsButton } from './review-panel-resolved-thread
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import { PanelHeading } from '@/shared/components/panel-heading' import { PanelHeading } from '@/shared/components/panel-heading'
import useReviewPanelLayout from '../hooks/use-review-panel-layout' import useReviewPanelLayout from '../hooks/use-review-panel-layout'
import RailPanelHeader from '@/features/ide-redesign/components/rail/rail-panel-header'
import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-utils'
const ReviewPanelHeader: FC = () => { const ReviewPanelHeader: FC = () => {
const { closeReviewPanel } = useReviewPanelLayout() const { closeReviewPanel } = useReviewPanelLayout()
const { t } = useTranslation() const { t } = useTranslation()
const newEditor = useIsNewEditorEnabled()
return ( return (
<div className="review-panel-header"> <div className="review-panel-header">
<PanelHeading title={t('review')} handleClose={closeReviewPanel}> {newEditor ? (
<ReviewPanelResolvedThreadsButton /> <RailPanelHeader
</PanelHeading> title={t('review')}
actions={[<ReviewPanelResolvedThreadsButton key="resolve-threads" />]}
/>
) : (
<PanelHeading title={t('review')} handleClose={closeReviewPanel}>
<ReviewPanelResolvedThreadsButton />
</PanelHeading>
)}
</div> </div>
) )
} }
@@ -4,6 +4,7 @@ import MaterialIcon from '@/shared/components/material-icon'
import { useTranslation } from 'react-i18next' import { useTranslation } from 'react-i18next'
import OLTooltip from '@/shared/components/ol/ol-tooltip' import OLTooltip from '@/shared/components/ol/ol-tooltip'
// TODO ide-redesign-cleanup: Remove this component and only use RailPanelHeader
export const PanelHeading: FC< export const PanelHeading: FC<
React.PropsWithChildren<{ React.PropsWithChildren<{
title: string title: string
@@ -87,8 +87,9 @@
h4 { h4 {
color: var(--file-tree-expand-button-color); color: var(--file-tree-expand-button-color);
font-size: var(--font-size-02); font-size: var(--font-size-02);
line-height: var(--line-height-02);
margin: 0; margin: 0;
font-weight: normal; font-weight: bold;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
white-space: nowrap; white-space: nowrap;
@@ -76,7 +76,9 @@
} }
.outline-header-name { .outline-header-name {
font-weight: unset; font-weight: bold;
font-size: var(--font-size-02);
line-height: var(--line-height-02);
} }
.outline-carat-icon { .outline-carat-icon {
@@ -43,8 +43,10 @@ body {
.rail-panel-title { .rail-panel-title {
font-size: var(--font-size-02); font-size: var(--font-size-02);
line-height: var(--line-height-02);
color: var(--ide-rail-color); color: var(--ide-rail-color);
margin-bottom: 0; margin-bottom: 0;
font-weight: bold;
} }
.ide-rail-tab-button { .ide-rail-tab-button {