Merge pull request #34479 from overleaf/mj-toolbar-border

[web] Hide toolbar border when tabs are enabled

GitOrigin-RevId: 58a33980006d1bc148db16d864fc0547d9c5d421
This commit is contained in:
Mathias Jakobsen
2026-06-16 08:06:21 +00:00
committed by Copybot
parent 7096b0f8a3
commit 481a0b1da9
2 changed files with 9 additions and 3 deletions
@@ -181,6 +181,11 @@ const Toolbar = memo(function Toolbar() {
id="ol-cm-toolbar-wrapper"
className={classNames('ol-cm-toolbar-wrapper', {
'ol-cm-toolbar-wrapper-indented': showReviewPanelHeader,
// The border is only needed when the header is flush with the
// toolbar, which is the case when tabs are disabled and the review
// panel is shown
'ol-cm-toolbar-wrapper-needs-border':
showReviewPanelHeader && !tabsVisible,
})}
>
<div
@@ -152,9 +152,10 @@ const toolbarTheme = EditorView.theme({
padding: 0,
},
},
'.ol-cm-toolbar-wrapper-indented .ol-cm-toolbar-button-group:first-child': {
borderLeft: '1px solid rgba(125, 125, 125, 0.3)',
},
'.ol-cm-toolbar-wrapper-needs-border .ol-cm-toolbar-button-group:first-child':
{
borderLeft: '1px solid rgba(125, 125, 125, 0.3)',
},
'.ol-cm-toolbar-button': {
display: 'inline-flex',
alignItems: 'center',