mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-26 01:25:38 -05:00
Change visibility type for panel hiding (#864)
* change visibility method for panels * make the new visibility type opt in
This commit is contained in:
@@ -109,4 +109,8 @@ panel {
|
||||
.tabbedPanel > .title > .monaco-scrollable-element {
|
||||
flex: 0 1 auto;
|
||||
width: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
.visibility.hidden {
|
||||
visibility: hidden;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ export abstract class TabChild {
|
||||
@Component({
|
||||
selector: 'tab',
|
||||
template: `
|
||||
<div *ngIf="active" class="fullsize">
|
||||
<div class="visibility" [class.hidden]="!active && visibilityType == 'visibility'" *ngIf="visibilityType == 'visibility' || active" class="fullsize">
|
||||
<ng-content class="body fullsize"></ng-content>
|
||||
</div>
|
||||
`
|
||||
@@ -25,6 +25,7 @@ export class TabComponent implements OnDestroy {
|
||||
@Input() public actions: Array<Action>;
|
||||
public _active = false;
|
||||
@Input() public identifier: string;
|
||||
@Input() private visibilityType: 'if' | 'visibility' = 'if';
|
||||
|
||||
public set active(val: boolean) {
|
||||
this._active = val;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
-->
|
||||
<panel class="dashboard-panel" (onTabChange)="handleTabChange($event)" (onTabClose)="handleTabClose($event)" [actions]="panelActions">
|
||||
<tab *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
|
||||
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
|
||||
<dashboard-home-container *ngIf="tab.id === 'homeTab'; else not_home" [properties]="propertiesWidget" [tab]="tab">
|
||||
</dashboard-home-container>
|
||||
<ng-template #not_home>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
-->
|
||||
<panel [options]="panelOpt" style="flex: 1 1 auto;" class="dashboard-panel" (onTabChange)="handleTabChange($event)">
|
||||
<tab *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
|
||||
<tab [visibilityType]="'visibility'" *ngFor="let tab of tabs" [title]="tab.title" class="fullsize" [identifier]="tab.id" [canClose]="tab.canClose" [actions]="tab.actions">
|
||||
<dashboard-webview-container *ngIf="getContentType(tab) === 'webview-container'" [tab]="tab">
|
||||
</dashboard-webview-container>
|
||||
<dashboard-widget-container *ngIf="getContentType(tab) === 'widgets-container'" [tab]="tab">
|
||||
|
||||
@@ -48,7 +48,7 @@ export class WebviewContent implements OnInit, IDashboardWebview {
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
this._createWebview();
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
public get id(): string {
|
||||
|
||||
@@ -80,7 +80,7 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
|
||||
}
|
||||
|
||||
public layout(): void {
|
||||
this._createWebview();
|
||||
this._webview.layout();
|
||||
}
|
||||
|
||||
public sendMessage(message: string): void {
|
||||
|
||||
Reference in New Issue
Block a user