mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-04-02 10:00:29 -04:00
Revert "change sizing behavior to allow the messages to fulling collapse down (set results to have no max height) (#4313)"
This reverts commit 7de294a58e.
This commit is contained in:
@@ -145,7 +145,6 @@ export class GridPanel extends ViewletPanel {
|
|||||||
@IInstantiationService private instantiationService: IInstantiationService
|
@IInstantiationService private instantiationService: IInstantiationService
|
||||||
) {
|
) {
|
||||||
super(options, keybindingService, contextMenuService, configurationService);
|
super(options, keybindingService, contextMenuService, configurationService);
|
||||||
this.maximumBodySize = 0;
|
|
||||||
this.splitView = new ScrollableSplitView(this.container, { enableResizing: false, verticalScrollbarVisibility: ScrollbarVisibility.Visible });
|
this.splitView = new ScrollableSplitView(this.container, { enableResizing: false, verticalScrollbarVisibility: ScrollbarVisibility.Visible });
|
||||||
this.splitView.onScroll(e => {
|
this.splitView.onScroll(e => {
|
||||||
if (this.state && this.splitView.length !== 0) {
|
if (this.state && this.splitView.length !== 0) {
|
||||||
@@ -196,6 +195,9 @@ export class GridPanel extends ViewletPanel {
|
|||||||
}
|
}
|
||||||
return p;
|
return p;
|
||||||
}, []));
|
}, []));
|
||||||
|
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||||
|
return p + c.maximumSize;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
if (this.state && this.state.scrollPosition) {
|
if (this.state && this.state.scrollPosition) {
|
||||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||||
@@ -218,6 +220,10 @@ export class GridPanel extends ViewletPanel {
|
|||||||
t.state.canBeMaximized = this.tables.length > 1;
|
t.state.canBeMaximized = this.tables.length > 1;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||||
|
return p + c.maximumSize;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
if (this.state && this.state.scrollPosition) {
|
if (this.state && this.state.scrollPosition) {
|
||||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||||
}
|
}
|
||||||
@@ -244,6 +250,9 @@ export class GridPanel extends ViewletPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const sizeChanges = () => {
|
const sizeChanges = () => {
|
||||||
|
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||||
|
return p + c.maximumSize;
|
||||||
|
}, 0);
|
||||||
|
|
||||||
if (this.state && this.state.scrollPosition) {
|
if (this.state && this.state.scrollPosition) {
|
||||||
this.splitView.setScrollPosition(this.state.scrollPosition);
|
this.splitView.setScrollPosition(this.state.scrollPosition);
|
||||||
@@ -270,9 +279,6 @@ export class GridPanel extends ViewletPanel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private addResultSet(resultSet: azdata.ResultSetSummary[]) {
|
private addResultSet(resultSet: azdata.ResultSetSummary[]) {
|
||||||
if (resultSet.length > 0) {
|
|
||||||
this.maximumBodySize = Number.POSITIVE_INFINITY;
|
|
||||||
}
|
|
||||||
let tables: GridTable<any>[] = [];
|
let tables: GridTable<any>[] = [];
|
||||||
|
|
||||||
for (let set of resultSet) {
|
for (let set of resultSet) {
|
||||||
@@ -316,12 +322,15 @@ export class GridPanel extends ViewletPanel {
|
|||||||
for (let i = this.splitView.length - 1; i >= 0; i--) {
|
for (let i = this.splitView.length - 1; i >= 0; i--) {
|
||||||
this.splitView.removeView(i);
|
this.splitView.removeView(i);
|
||||||
}
|
}
|
||||||
this.maximumBodySize = 0;
|
|
||||||
dispose(this.tables);
|
dispose(this.tables);
|
||||||
dispose(this.tableDisposable);
|
dispose(this.tableDisposable);
|
||||||
this.tableDisposable = [];
|
this.tableDisposable = [];
|
||||||
this.tables = [];
|
this.tables = [];
|
||||||
this.maximizedGrid = undefined;
|
this.maximizedGrid = undefined;
|
||||||
|
|
||||||
|
this.maximumBodySize = this.tables.reduce((p, c) => {
|
||||||
|
return p + c.maximumSize;
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
private maximizeTable(tableid: string): void {
|
private maximizeTable(tableid: string): void {
|
||||||
|
|||||||
Reference in New Issue
Block a user