Skip to content

Commit 3c1cd6b

Browse files
committed
fix(electron): pinned tab style (#8232)
fix PD-1687
1 parent 1d79328 commit 3c1cd6b

File tree

2 files changed

+13
-15
lines changed

2 files changed

+13
-15
lines changed

packages/frontend/core/src/modules/app-tabs-header/views/app-tabs-header.tsx

Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ const WorkbenchTab = ({
237237
<Loading />
238238
)}
239239
</div>
240-
{workbench.pinned || !view.title ? null : (
240+
{!view.title ? null : (
241241
<div
242242
title={view.title}
243243
className={styles.splitViewLabelText}
@@ -254,19 +254,17 @@ const WorkbenchTab = ({
254254
</Fragment>
255255
);
256256
})}
257-
{!workbench.pinned ? (
258-
<div className={styles.tabCloseButtonWrapper}>
259-
{tabsLength > 1 ? (
260-
<button
261-
data-testid="close-tab-button"
262-
className={styles.tabCloseButton}
263-
onClick={handleCloseTab}
264-
>
265-
<CloseIcon />
266-
</button>
267-
) : null}
268-
</div>
269-
) : null}
257+
<div className={styles.tabCloseButtonWrapper}>
258+
{tabsLength > 1 && !workbench.pinned ? (
259+
<button
260+
data-testid="close-tab-button"
261+
className={styles.tabCloseButton}
262+
onClick={handleCloseTab}
263+
>
264+
<CloseIcon />
265+
</button>
266+
) : null}
267+
</div>
270268
</div>
271269
<div className={styles.dropIndicator} data-edge={closestEdge} />
272270
</div>

packages/frontend/core/src/modules/app-tabs-header/views/styles.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ export const tab = style({
9898
boxShadow: cssVar('buttonShadow'),
9999
},
100100
'&[data-pinned="true"]': {
101-
flexShrink: 0,
101+
maxWidth: 64,
102102
},
103103
[`${tabWrapper}[data-dragging="true"] &`]: {
104104
boxShadow: `0 0 0 1px ${cssVar('primaryColor')}`,

0 commit comments

Comments
 (0)