mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 (#7880)
* Merge from vscode c58aaab8a1cc22a7139b761166a0d4f37d41e998 * fix pipelines * fix strict-null-checks * add missing files
This commit is contained in:
@@ -21,6 +21,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
|
||||
import { IStorageService } from 'vs/platform/storage/common/storage';
|
||||
import { AsyncDataTree } from 'vs/base/browser/ui/tree/asyncDataTree';
|
||||
import { AbstractTree } from 'vs/base/browser/ui/tree/abstractTree';
|
||||
import { assertIsDefined } from 'vs/base/common/types';
|
||||
|
||||
export abstract class Viewlet extends Composite implements IViewlet {
|
||||
|
||||
@@ -34,8 +35,8 @@ export abstract class Viewlet extends Composite implements IViewlet {
|
||||
super(id, telemetryService, themeService, storageService);
|
||||
}
|
||||
|
||||
getOptimalWidth(): number | null {
|
||||
return null;
|
||||
getOptimalWidth(): number | undefined {
|
||||
return undefined;
|
||||
}
|
||||
|
||||
getContextMenuActions(): IAction[] {
|
||||
@@ -76,7 +77,7 @@ export const Extensions = {
|
||||
};
|
||||
|
||||
export class ViewletRegistry extends CompositeRegistry<Viewlet> {
|
||||
private defaultViewletId!: string;
|
||||
private defaultViewletId: string | undefined;
|
||||
|
||||
/**
|
||||
* Registers a viewlet to the platform.
|
||||
@@ -120,7 +121,7 @@ export class ViewletRegistry extends CompositeRegistry<Viewlet> {
|
||||
* Gets the id of the viewlet that should open on startup by default.
|
||||
*/
|
||||
getDefaultViewletId(): string {
|
||||
return this.defaultViewletId;
|
||||
return assertIsDefined(this.defaultViewletId);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,8 +167,9 @@ export class ShowViewletAction extends Action {
|
||||
private sidebarHasFocus(): boolean {
|
||||
const activeViewlet = this.viewletService.getActiveViewlet();
|
||||
const activeElement = document.activeElement;
|
||||
const sidebarPart = this.layoutService.getContainer(Parts.SIDEBAR_PART);
|
||||
|
||||
return !!(activeViewlet && activeElement && DOM.isAncestor(activeElement, this.layoutService.getContainer(Parts.SIDEBAR_PART)));
|
||||
return !!(activeViewlet && activeElement && sidebarPart && DOM.isAncestor(activeElement, sidebarPart));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user