Skip to content

Commit 839c705

Browse files
Fix data explorer layout bug (#9838)
Cherry picking `c3c321abe6bd7314cf98c9d29a5d78c0cf5caa12` into the `prerelease/2025.10` branch from #9836. I chatted with @juliasilge who reviewed the changes and agreed to cherry-pick the change if possible! ### Release Notes <!-- Optionally, replace `N/A` with text to be included in the next release notes. The `N/A` bullets are ignored. If you refer to one or more Positron issues, these issues are used to collect information about the feature or bugfix, such as the relevant language pack as determined by Github labels of type `lang: `. The note will automatically be tagged with the language. These notes are typically filled by the Positron team. If you are an external contributor, you may ignore this section. --> #### New Features - N/A #### Bug Fixes - Fix data explorer layout when summary is on right ### QA Notes <!-- Positron team members: please add relevant e2e test tags, so the tests can be run when you open this pull request. - Instructions: https://github.com/posit-dev/positron/blob/main/test/e2e/README.md#pull-requests-and-test-tags - Available tags: https://github.com/posit-dev/positron/blob/main/test/e2e/infra/test-runner/test-tags.ts --> <!-- Add additional information for QA on how to validate the change, paying special attention to the level of risk, adjacent areas that could be affected by the change, and any important contextual information not present in the linked issues. --> @:data-explorer @:web @:win
1 parent 98c1ae1 commit 839c705

File tree

2 files changed

+34
-6
lines changed

2 files changed

+34
-6
lines changed

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

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,18 @@
4141
grid-template-columns: 100%;
4242
grid-row: main-row / end-rows;
4343
grid-column: left-column / collapsed-left-spacer;
44+
}
45+
46+
/* When summary is on left, left column needs space for action bar */
47+
.data-explorer-panel .data-explorer.summary-on-left .left-column {
4448
grid-template-rows: [summary-row-action-bar] 36px [data-grid] 1fr [end-rows];
4549
}
4650

51+
/* When summary is on left, right column shows main data (no action bar space needed) */
52+
.data-explorer-panel .data-explorer.summary-on-left .right-column {
53+
grid-template-rows: [data-grid] 1fr [end-rows];
54+
}
55+
4756
.data-explorer-panel .data-explorer .left-column .data-grid-container {
4857
/* min-height: 0 allows the data grid to shrink properly when the panel is resized */
4958
min-height: 0;
@@ -80,6 +89,23 @@
8089
min-width: 0;
8190
min-height: 0;
8291
display: grid;
92+
grid-template-columns: 100%;
8393
grid-row: main-row / end-rows;
8494
grid-column: right-column / end-columns;
8595
}
96+
97+
/* When summary is on right, left column shows main data (no action bar space needed) */
98+
.data-explorer-panel .data-explorer.summary-on-right .left-column {
99+
grid-template-rows: [data-grid] 1fr [end-rows];
100+
}
101+
102+
/* When summary is on right, right column needs space for action bar */
103+
.data-explorer-panel .data-explorer.summary-on-right .right-column {
104+
grid-template-rows: [summary-row-action-bar] 36px [data-grid] 1fr [end-rows];
105+
}
106+
107+
.data-explorer-panel .data-explorer .right-column .data-grid-container {
108+
/* min-height: 0 allows the data grid to shrink properly when the panel is resized */
109+
min-height: 0;
110+
grid-row: data-grid / end-rows;
111+
}

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

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -383,12 +383,14 @@ export const DataExplorer = () => {
383383
instance={context.instance.tableSchemaDataGridInstance}
384384
/>
385385
}
386-
<PositronDataGrid
387-
instance={layout === PositronDataExplorerLayout.SummaryOnLeft ?
388-
context.instance.tableDataDataGridInstance :
389-
context.instance.tableSchemaDataGridInstance
390-
}
391-
/>
386+
<div className='data-grid-container'>
387+
<PositronDataGrid
388+
instance={layout === PositronDataExplorerLayout.SummaryOnLeft ?
389+
context.instance.tableDataDataGridInstance :
390+
context.instance.tableSchemaDataGridInstance
391+
}
392+
/>
393+
</div>
392394
</div>
393395
</div >
394396
);

0 commit comments

Comments
 (0)