Skip to content

Commit df9f6f8

Browse files
authored
Data Explorer: Add option to VerticalSplitter to always show the collapse button in the data explorer (#9148)
Addresses #6509. We could make this always-showing option configurable in the Settings UI, but having it always visible does not seem too bad.
1 parent 9117c91 commit df9f6f8

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/vs/base/browser/ui/positronComponents/splitters/verticalSplitter.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,10 +44,12 @@ type VerticalSplitterCollapseProps = | {
4444
readonly collapsible?: false;
4545
readonly isCollapsed?: never;
4646
readonly onCollapsedChanged?: never;
47+
readonly alwaysShowExpandCollapseButton?: never;
4748
} | {
4849
readonly collapsible: true;
4950
readonly isCollapsed: boolean;
5051
readonly onCollapsedChanged: (collapsed: boolean) => void;
52+
readonly alwaysShowExpandCollapseButton?: boolean;
5153
};
5254

5355
/**
@@ -80,6 +82,7 @@ const getSashSize = (configurationService: IConfigurationService) =>
8082
const getHoverDelay = (configurationService: IConfigurationService) =>
8183
configurationService.getValue<number>('workbench.sash.hoverDelay');
8284

85+
8386
/**
8487
* Determines whether a point is inside an element.
8588
* @param x The X coordinate.
@@ -136,6 +139,7 @@ export const VerticalSplitter = ({
136139
showSash,
137140
collapsible,
138141
isCollapsed,
142+
alwaysShowExpandCollapseButton,
139143
onCollapsedChanged,
140144
onBeginResize,
141145
onResize,
@@ -412,7 +416,7 @@ export const VerticalSplitter = ({
412416
/>
413417
}
414418
</div>
415-
{collapsible && (hovering || resizing || collapsed) &&
419+
{collapsible && (alwaysShowExpandCollapseButton || hovering || resizing || collapsed) &&
416420
<Button
417421
ref={expandCollapseButtonRef}
418422
className='expand-collapse-button'

src/vs/workbench/browser/positronDataExplorer/components/dataExplorerPanel/components/dataExplorer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,6 +360,7 @@ export const DataExplorer = () => {
360360
}
361361
<div ref={splitterRef} className='splitter'>
362362
<VerticalSplitter
363+
alwaysShowExpandCollapseButton={true}
363364
collapsible={true}
364365
invert={layout === PositronDataExplorerLayout.SummaryOnRight}
365366
isCollapsed={columnsCollapsed}

0 commit comments

Comments
 (0)