adjust modals for title bar (#5648)

This commit is contained in:
Anthony Dresser
2019-05-27 14:40:16 -07:00
committed by GitHub
parent 3e8f25d864
commit b4cce9f147
22 changed files with 45 additions and 50 deletions

View File

@@ -33,8 +33,8 @@ import { AccountListRenderer, AccountListDelegate } from 'sql/platform/accounts/
import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/platform/accounts/common/eventTypes'; import { AccountProviderAddedEventParams, UpdateAccountListEventParams } from 'sql/platform/accounts/common/eventTypes';
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys'; import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
class AccountPanel extends ViewletPanel { class AccountPanel extends ViewletPanel {
public index: number; public index: number;
@@ -114,7 +114,7 @@ export class AccountDialog extends Modal {
public get onCloseEvent(): Event<void> { return this._onCloseEmitter.event; } public get onCloseEvent(): Event<void> { return this._onCloseEmitter.event; }
constructor( constructor(
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,
@IContextMenuService private _contextMenuService: IContextMenuService, @IContextMenuService private _contextMenuService: IContextMenuService,

View File

@@ -21,8 +21,8 @@ import { attachModalDialogStyler, attachButtonStyler } from 'sql/platform/theme/
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys'; import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class AutoOAuthDialog extends Modal { export class AutoOAuthDialog extends Modal {
private _copyAndOpenButton: Button; private _copyAndOpenButton: Button;
@@ -43,7 +43,7 @@ export class AutoOAuthDialog extends Modal {
public get onCloseEvent(): Event<void> { return this._onCloseEvent.event; } public get onCloseEvent(): Event<void> { return this._onCloseEvent.event; }
constructor( constructor(
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,

View File

@@ -18,7 +18,6 @@ import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IWindowsService } from 'vs/platform/windows/common/windows'; import { IWindowsService } from 'vs/platform/windows/common/windows';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
import { Button } from 'sql/base/browser/ui/button/button'; import { Button } from 'sql/base/browser/ui/button/button';
@@ -29,6 +28,7 @@ import { InputBox } from 'sql/base/browser/ui/inputBox/inputBox';
import { IAccountPickerService } from 'sql/platform/accounts/common/accountPicker'; import { IAccountPickerService } from 'sql/platform/accounts/common/accountPicker';
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys'; import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
// TODO: Make the help link 1) extensible (01/08/2018, https://github.com/Microsoft/azuredatastudio/issues/450) // TODO: Make the help link 1) extensible (01/08/2018, https://github.com/Microsoft/azuredatastudio/issues/450)
// in case that other non-Azure sign in is to be used // in case that other non-Azure sign in is to be used
@@ -63,7 +63,7 @@ export class FirewallRuleDialog extends Modal {
constructor( constructor(
@IAccountPickerService private _accountPickerService: IAccountPickerService, @IAccountPickerService private _accountPickerService: IAccountPickerService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,

View File

@@ -22,8 +22,8 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { append, $ } from 'vs/base/browser/dom'; import { append, $ } from 'vs/base/browser/dom';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class WizardModal extends Modal { export class WizardModal extends Modal {
private _dialogPanes = new Map<WizardPage, DialogPane>(); private _dialogPanes = new Map<WizardPage, DialogPane>();
@@ -47,7 +47,7 @@ export class WizardModal extends Modal {
private _wizard: Wizard, private _wizard: Wizard,
name: string, name: string,
options: IModalOptions, options: IModalOptions,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,

View File

@@ -22,9 +22,9 @@ import { localize } from 'vs/nls';
import { MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes'; import { MessageLevel } from 'sql/workbench/api/common/sqlExtHostTypes';
import * as os from 'os'; import * as os from 'os';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { isUndefinedOrNull } from 'vs/base/common/types'; import { isUndefinedOrNull } from 'vs/base/common/types';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export const MODAL_SHOWING_KEY = 'modalShowing'; export const MODAL_SHOWING_KEY = 'modalShowing';
export const MODAL_SHOWING_CONTEXT = new RawContextKey<Array<string>>(MODAL_SHOWING_KEY, []); export const MODAL_SHOWING_CONTEXT = new RawContextKey<Array<string>>(MODAL_SHOWING_KEY, []);
@@ -143,7 +143,7 @@ export abstract class Modal extends Disposable implements IThemable {
private _title: string, private _title: string,
private _name: string, private _name: string,
private _telemetryService: ITelemetryService, private _telemetryService: ITelemetryService,
protected layoutService: ILayoutService, protected layoutService: IWorkbenchLayoutService,
protected _clipboardService: IClipboardService, protected _clipboardService: IClipboardService,
protected _themeService: IThemeService, protected _themeService: IThemeService,
protected logService: ILogService, protected logService: ILogService,
@@ -172,6 +172,8 @@ export abstract class Modal extends Disposable implements IThemable {
} }
this._bodyContainer = DOM.$(`.${builderClass}`, { role: 'dialog', 'aria-label': this._title }); this._bodyContainer = DOM.$(`.${builderClass}`, { role: 'dialog', 'aria-label': this._title });
const top = this.layoutService.getTitleBarOffset();
this._bodyContainer.style.top = `${top}px`;
this._modalDialog = DOM.append(this._bodyContainer, DOM.$('.modal-dialog', { role: 'document' })); this._modalDialog = DOM.append(this._bodyContainer, DOM.$('.modal-dialog', { role: 'document' }));
const modalContent = DOM.append(this._modalDialog, DOM.$('.modal-content')); const modalContent = DOM.append(this._modalDialog, DOM.$('.modal-content'));

View File

@@ -30,9 +30,9 @@ import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { append, $ } from 'vs/base/browser/dom'; import { append, $ } from 'vs/base/browser/dom';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class CategoryView extends ViewletPanel { export class CategoryView extends ViewletPanel {
@@ -87,7 +87,7 @@ export class OptionsDialog extends Modal {
title: string, title: string,
name: string, name: string,
options: IOptionsDialogOptions, options: IOptionsDialogOptions,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,

View File

@@ -18,7 +18,7 @@ import { bootstrapAngular } from 'sql/platform/bootstrap/node/bootstrapService';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { append, $ } from 'vs/base/browser/dom'; import { append, $ } from 'vs/base/browser/dom';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class BackupDialog extends Modal { export class BackupDialog extends Modal {
private _body: HTMLElement; private _body: HTMLElement;
@@ -27,7 +27,7 @@ export class BackupDialog extends Modal {
constructor( constructor(
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,

View File

@@ -23,7 +23,7 @@ export class AdvancedPropertiesController {
this._options = this._advancedDialog.optionValues; this._options = this._advancedDialog.optionValues;
} }
public showDialog(providerOptions: azdata.ConnectionOption[], container: HTMLElement, options: { [name: string]: any }): void { public showDialog(providerOptions: azdata.ConnectionOption[], options: { [name: string]: any }): void {
this._options = options; this._options = options;
let serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option)); let serviceOptions = providerOptions.map(option => AdvancedPropertiesController.connectionOptionToServiceOption(option));
this.advancedDialog.open(serviceOptions, this._options); this.advancedDialog.open(serviceOptions, this._options);

View File

@@ -16,7 +16,6 @@ import { Event, Emitter } from 'vs/base/common/event';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { Button } from 'sql/base/browser/ui/button/button'; import { Button } from 'sql/base/browser/ui/button/button';
@@ -27,6 +26,7 @@ import { attachButtonStyler, attachModalDialogStyler } from 'sql/platform/theme/
import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys'; import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class ServerGroupDialog extends Modal { export class ServerGroupDialog extends Modal {
private _addServerButton: Button; private _addServerButton: Button;
@@ -49,7 +49,7 @@ export class ServerGroupDialog extends Modal {
public onCloseEvent: Event<void> = this._onCloseEvent.event; public onCloseEvent: Event<void> = this._onCloseEvent.event;
constructor( constructor(
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,

View File

@@ -24,8 +24,8 @@ import { Event, Emitter } from 'vs/base/common/event';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView'; import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
class EventItem { class EventItem {
@@ -310,7 +310,7 @@ export class ProfilerColumnEditorDialog extends Modal {
private _treeContainer: HTMLElement; private _treeContainer: HTMLElement;
constructor( constructor(
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,

View File

@@ -24,7 +24,7 @@ import * as DOM from 'vs/base/browser/dom';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { ProfilerFilter, ProfilerFilterClause, ProfilerFilterClauseOperator } from 'sql/workbench/services/profiler/common/interfaces'; import { ProfilerFilter, ProfilerFilterClause, ProfilerFilterClauseOperator } from 'sql/workbench/services/profiler/common/interfaces';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
const ClearText: string = localize('profilerFilterDialog.clear', "Clear All"); const ClearText: string = localize('profilerFilterDialog.clear', "Clear All");
@@ -71,7 +71,7 @@ export class ProfilerFilterDialog extends Modal {
constructor( constructor(
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@ILogService logService: ILogService, @ILogService logService: ILogService,

View File

@@ -17,7 +17,6 @@ import { localize } from 'vs/nls';
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey'; import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { mixin } from 'vs/base/common/objects'; import { mixin } from 'vs/base/common/objects';
import * as strings from 'vs/base/common/strings'; import * as strings from 'vs/base/common/strings';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import * as DOM from 'vs/base/browser/dom'; import * as DOM from 'vs/base/browser/dom';
import * as azdata from 'azdata'; import * as azdata from 'azdata';
@@ -43,6 +42,7 @@ import { ServiceOptionType } from 'sql/workbench/api/common/sqlExtHostTypes';
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
import { IFileBrowserDialogController } from 'sql/workbench/services/fileBrowser/common/fileBrowserDialogController'; import { IFileBrowserDialogController } from 'sql/workbench/services/fileBrowser/common/fileBrowserDialogController';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
interface FileListElement { interface FileListElement {
logicalFileName: string; logicalFileName: string;
@@ -129,7 +129,7 @@ export class RestoreDialog extends Modal {
constructor( constructor(
optionsMetadata: azdata.ServiceOption[], optionsMetadata: azdata.ServiceOption[],
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,

View File

@@ -17,9 +17,8 @@ import { localize } from 'vs/nls';
import { IDisposable, toDisposable } from 'vs/base/common/lifecycle'; import { IDisposable, toDisposable } from 'vs/base/common/lifecycle';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement'; import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
import * as DOM from 'vs/base/browser/dom'; import * as DOM from 'vs/base/browser/dom';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
export class WebViewDialog extends Modal { export class WebViewDialog extends Modal {
@@ -42,7 +41,7 @@ export class WebViewDialog extends Modal {
constructor( constructor(
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@ILogService logService: ILogService, @ILogService logService: ILogService,

View File

@@ -15,14 +15,14 @@ import { CmsConnectionWidget } from 'sql/workbench/services/connection/browser/c
*/ */
export class CmsConnectionController extends ConnectionController { export class CmsConnectionController extends ConnectionController {
constructor(container: HTMLElement, constructor(
connectionManagementService: IConnectionManagementService, connectionManagementService: IConnectionManagementService,
connectionProperties: ConnectionProviderProperties, connectionProperties: ConnectionProviderProperties,
callback: IConnectionComponentCallbacks, callback: IConnectionComponentCallbacks,
providerName: string, providerName: string,
authTypeChanged: boolean = false, authTypeChanged: boolean = false,
@IInstantiationService _instantiationService: IInstantiationService) { @IInstantiationService _instantiationService: IInstantiationService) {
super(container, connectionManagementService, connectionProperties, callback, providerName, _instantiationService); super(connectionManagementService, connectionProperties, callback, providerName, _instantiationService);
let specialOptions = this._providerOptions.filter( let specialOptions = this._providerOptions.filter(
(property) => (property.specialValueType !== null && property.specialValueType !== undefined)); (property) => (property.specialValueType !== null && property.specialValueType !== undefined));
this._connectionWidget = this._instantiationService.createInstance(CmsConnectionWidget, specialOptions, { this._connectionWidget = this._instantiationService.createInstance(CmsConnectionWidget, specialOptions, {

View File

@@ -17,7 +17,6 @@ import { ConnectionProviderProperties } from 'sql/workbench/parts/connection/com
import { ConnectionWidget } from 'sql/workbench/services/connection/browser/connectionWidget'; import { ConnectionWidget } from 'sql/workbench/services/connection/browser/connectionWidget';
export class ConnectionController implements IConnectionComponentController { export class ConnectionController implements IConnectionComponentController {
private _container: HTMLElement;
private _connectionManagementService: IConnectionManagementService; private _connectionManagementService: IConnectionManagementService;
private _advancedController: AdvancedPropertiesController; private _advancedController: AdvancedPropertiesController;
private _model: IConnectionProfile; private _model: IConnectionProfile;
@@ -28,13 +27,12 @@ export class ConnectionController implements IConnectionComponentController {
/* key: uri, value : list of databases */ /* key: uri, value : list of databases */
protected _databaseCache = new Map<string, string[]>(); protected _databaseCache = new Map<string, string[]>();
constructor(container: HTMLElement, constructor(
connectionManagementService: IConnectionManagementService, connectionManagementService: IConnectionManagementService,
connectionProperties: ConnectionProviderProperties, connectionProperties: ConnectionProviderProperties,
callback: IConnectionComponentCallbacks, callback: IConnectionComponentCallbacks,
providerName: string, providerName: string,
@IInstantiationService protected _instantiationService: IInstantiationService) { @IInstantiationService protected _instantiationService: IInstantiationService) {
this._container = container;
this._connectionManagementService = connectionManagementService; this._connectionManagementService = connectionManagementService;
this._callback = callback; this._callback = callback;
this._providerOptions = connectionProperties.connectionOptions; this._providerOptions = connectionProperties.connectionOptions;
@@ -111,7 +109,7 @@ export class ConnectionController implements IConnectionComponentController {
} }
let advancedOption = this._providerOptions.filter( let advancedOption = this._providerOptions.filter(
(property) => (property.specialValueType === undefined || property.specialValueType === null)); (property) => (property.specialValueType === undefined || property.specialValueType === null));
this._advancedController.showDialog(advancedOption, this._container, this._model.options); this._advancedController.showDialog(advancedOption, this._model.options);
} }
public showUiComponent(container: HTMLElement): void { public showUiComponent(container: HTMLElement): void {

View File

@@ -60,7 +60,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
_serviceBrand: any; _serviceBrand: any;
private _container: HTMLElement;
private _connectionDialog: ConnectionDialogWidget; private _connectionDialog: ConnectionDialogWidget;
private _connectionControllerMap: { [providerDisplayName: string]: IConnectionComponentController } = {}; private _connectionControllerMap: { [providerDisplayName: string]: IConnectionComponentController } = {};
private _model: ConnectionProfile; private _model: ConnectionProfile;
@@ -281,14 +280,14 @@ export class ConnectionDialogService implements IConnectionDialogService {
if (providerName === Constants.cmsProviderName) { if (providerName === Constants.cmsProviderName) {
this._connectionControllerMap[providerName] = this._connectionControllerMap[providerName] =
this._instantiationService.createInstance(CmsConnectionController, this._instantiationService.createInstance(CmsConnectionController,
this._container, this._connectionManagementService, this._connectionManagementService,
this._capabilitiesService.getCapabilities(providerName).connection, { this._capabilitiesService.getCapabilities(providerName).connection, {
onSetConnectButton: (enable: boolean) => this.handleSetConnectButtonEnable(enable) onSetConnectButton: (enable: boolean) => this.handleSetConnectButtonEnable(enable)
}, providerName, this._inputModel ? this._inputModel.options.authTypeChanged : false); }, providerName, this._inputModel ? this._inputModel.options.authTypeChanged : false);
} else { } else {
this._connectionControllerMap[providerName] = this._connectionControllerMap[providerName] =
this._instantiationService.createInstance(ConnectionController, this._instantiationService.createInstance(ConnectionController,
this._container, this._connectionManagementService, this._connectionManagementService,
this._capabilitiesService.getCapabilities(providerName).connection, { this._capabilitiesService.getCapabilities(providerName).connection, {
onSetConnectButton: (enable: boolean) => this.handleSetConnectButtonEnable(enable) onSetConnectButton: (enable: boolean) => this.handleSetConnectButtonEnable(enable)
}, providerName); }, providerName);
@@ -420,8 +419,6 @@ export class ConnectionDialogService implements IConnectionDialogService {
private doShowDialog(params: INewConnectionParams): Promise<void> { private doShowDialog(params: INewConnectionParams): Promise<void> {
if (!this._connectionDialog) { if (!this._connectionDialog) {
let container = this.layoutService.getWorkbenchElement().parentElement;
this._container = container;
this._connectionDialog = this._instantiationService.createInstance(ConnectionDialogWidget, this._providerTypes, this._providerNameToDisplayNameMap[this._model.providerName], this._providerNameToDisplayNameMap); this._connectionDialog = this._instantiationService.createInstance(ConnectionDialogWidget, this._providerTypes, this._providerNameToDisplayNameMap[this._model.providerName], this._providerNameToDisplayNameMap);
this._connectionDialog.onCancel(() => { this._connectionDialog.onCancel(() => {
this._connectionDialog.databaseDropdownExpanded = this.uiController.databaseDropdownExpanded; this._connectionDialog.databaseDropdownExpanded = this.uiController.databaseDropdownExpanded;

View File

@@ -35,8 +35,8 @@ import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService'; import { IThemeService, ITheme } from 'vs/platform/theme/common/themeService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export interface OnShowUIResponse { export interface OnShowUIResponse {
selectedProviderType: string; selectedProviderType: string;
@@ -91,13 +91,13 @@ export class ConnectionDialogWidget extends Modal {
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,
@IConnectionManagementService private _connectionManagementService: IConnectionManagementService, @IConnectionManagementService private _connectionManagementService: IConnectionManagementService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@IContextMenuService private _contextMenuService: IContextMenuService, @IContextMenuService private _contextMenuService: IContextMenuService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILayoutService logService: ILogService @ILogService logService: ILogService
) { ) {
super(localize('connection', "Connection"), TelemetryKeys.Connection, telemetryService, layoutService, clipboardService, themeService, logService, contextKeyService, { hasSpinner: true, hasErrors: true }); super(localize('connection', "Connection"), TelemetryKeys.Connection, telemetryService, layoutService, clipboardService, themeService, logService, contextKeyService, { hasSpinner: true, hasErrors: true });
} }

View File

@@ -25,8 +25,8 @@ import * as TelemetryKeys from 'sql/platform/telemetry/telemetryKeys';
import { NewDashboardTabViewModel, IDashboardUITab } from 'sql/workbench/services/dashboard/common/newDashboardTabViewModel'; import { NewDashboardTabViewModel, IDashboardUITab } from 'sql/workbench/services/dashboard/common/newDashboardTabViewModel';
import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry'; import { IDashboardTab } from 'sql/platform/dashboard/common/dashboardRegistry';
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
class ExtensionListDelegate implements IListVirtualDelegate<IDashboardUITab> { class ExtensionListDelegate implements IListVirtualDelegate<IDashboardUITab> {
@@ -107,7 +107,7 @@ export class NewDashboardTabDialog extends Modal {
public get onCancel(): Event<void> { return this._onCancel.event; } public get onCancel(): Event<void> { return this._onCancel.event; }
constructor( constructor(
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,

View File

@@ -20,8 +20,8 @@ import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService
import { localize } from 'vs/nls'; import { localize } from 'vs/nls';
import { IAction } from 'vs/base/common/actions'; import { IAction } from 'vs/base/common/actions';
import * as DOM from 'vs/base/browser/dom'; import * as DOM from 'vs/base/browser/dom';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
const maxActions = 1; const maxActions = 1;
@@ -44,7 +44,7 @@ export class ErrorMessageDialog extends Modal {
constructor( constructor(
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@ILogService logService: ILogService @ILogService logService: ILogService

View File

@@ -24,14 +24,13 @@ import { IContextViewService } from 'vs/platform/contextview/browser/contextView
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'; import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { attachInputBoxStyler, attachSelectBoxStyler } from 'vs/platform/theme/common/styler'; import { attachInputBoxStyler, attachSelectBoxStyler } from 'vs/platform/theme/common/styler';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme';
import * as DOM from 'vs/base/browser/dom'; import * as DOM from 'vs/base/browser/dom';
import * as strings from 'vs/base/common/strings'; import * as strings from 'vs/base/common/strings';
import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService'; import { IClipboardService } from 'sql/platform/clipboard/common/clipboardService';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
import { IThemeService } from 'vs/platform/theme/common/themeService'; import { IThemeService } from 'vs/platform/theme/common/themeService';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
export class FileBrowserDialog extends Modal { export class FileBrowserDialog extends Modal {
private _viewModel: FileBrowserViewModel; private _viewModel: FileBrowserViewModel;
@@ -49,7 +48,7 @@ export class FileBrowserDialog extends Modal {
private _isFolderSelected: boolean; private _isFolderSelected: boolean;
constructor(title: string, constructor(title: string,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IInstantiationService private _instantiationService: IInstantiationService, @IInstantiationService private _instantiationService: IInstantiationService,
@IContextViewService private _contextViewService: IContextViewService, @IContextViewService private _contextViewService: IContextViewService,

View File

@@ -40,7 +40,7 @@ import { ViewletPanel, IViewletPanelOptions } from 'vs/workbench/browser/parts/v
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration';
import { ILogService } from 'vs/platform/log/common/log'; import { ILogService } from 'vs/platform/log/common/log';
import { ILayoutService } from 'vs/platform/layout/browser/layoutService'; import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
const labelDisplay = nls.localize("insights.item", "Item"); const labelDisplay = nls.localize("insights.item", "Item");
const valueDisplay = nls.localize("insights.value", "Value"); const valueDisplay = nls.localize("insights.value", "Value");
@@ -158,7 +158,7 @@ export class InsightsDialogView extends Modal {
private _model: IInsightsDialogModel, private _model: IInsightsDialogModel,
@IThemeService themeService: IThemeService, @IThemeService themeService: IThemeService,
@IClipboardService clipboardService: IClipboardService, @IClipboardService clipboardService: IClipboardService,
@ILayoutService layoutService: ILayoutService, @IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
@ITelemetryService telemetryService: ITelemetryService, @ITelemetryService telemetryService: ITelemetryService,
@IContextKeyService contextKeyService: IContextKeyService, @IContextKeyService contextKeyService: IContextKeyService,
@ILogService logService: ILogService, @ILogService logService: ILogService,

View File

@@ -100,7 +100,7 @@ suite('Advanced properties dialog tests', () => {
isAdvancedDialogCalled = true; isAdvancedDialogCalled = true;
}); });
advancedController.advancedDialog = advanceDialog.object; advancedController.advancedDialog = advanceDialog.object;
advancedController.showDialog(providerOptions, $('div'), options); advancedController.showDialog(providerOptions, options);
assert.equal(isAdvancedDialogCalled, true); assert.equal(isAdvancedDialogCalled, true);
}); });
}); });