Remove some vscode differences (#5010)

* remove some vscode differences

* add dates to todo comments
This commit is contained in:
Anthony Dresser
2019-04-12 21:55:07 -07:00
committed by GitHub
parent c5a32d8373
commit 6dbf757385
25 changed files with 34 additions and 94 deletions

View File

@@ -4,17 +4,12 @@
*--------------------------------------------------------------------------------------------*/
import 'vs/css!./webview';
import {
Component, Input, Inject, ChangeDetectorRef, forwardRef, ComponentFactoryResolver,
ViewChild, ViewChildren, ElementRef, Injector, OnDestroy, QueryList
Component, Input, Inject, ChangeDetectorRef, forwardRef, ElementRef, OnDestroy
} from '@angular/core';
import * as azdata from 'azdata';
import * as vscode from 'vscode';
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
import { IThemeService } from 'vs/platform/theme/common/themeService';
import { URI, UriComponents } from 'vs/base/common/uri';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace';
@@ -22,9 +17,8 @@ import { IWorkspaceContextService } from 'vs/platform/workspace/common/workspace
import { ComponentBase } from 'sql/parts/modelComponents/componentBase';
import { IComponent, IComponentDescriptor, IModelStore, ComponentEventType } from 'sql/parts/modelComponents/interfaces';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IContextKeyService, IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { IContextKey } from 'vs/platform/contextkey/common/contextkey';
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { WebviewContentOptions } from 'vs/workbench/contrib/webview/common/webview';
function reviveWebviewOptions(options: vscode.WebviewOptions): vscode.WebviewOptions {
@@ -52,17 +46,11 @@ export default class WebViewComponent extends ComponentBase implements IComponen
protected findInputFocusContextKey: IContextKey<boolean>;
constructor(
@Inject(forwardRef(() => CommonServiceInterface)) private _commonService: CommonServiceInterface,
@Inject(forwardRef(() => ChangeDetectorRef)) changeRef: ChangeDetectorRef,
@Inject(forwardRef(() => ElementRef)) el: ElementRef,
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
@Inject(IThemeService) private themeService: IThemeService,
@Inject(IEnvironmentService) private environmentService: IEnvironmentService,
@Inject(IContextViewService) private contextViewService: IContextViewService,
@Inject(IOpenerService) private readonly _openerService: IOpenerService,
@Inject(IWorkspaceContextService) private readonly _contextService: IWorkspaceContextService,
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
@Inject(IContextKeyService) contextKeyService: IContextKeyService
) {
super(changeRef, el);
}
@@ -94,8 +82,6 @@ export default class WebViewComponent extends ComponentBase implements IComponen
args: e
});
}));
this._webview.style(this.themeService.getTheme());
this.setHtml();
}

View File

@@ -11,7 +11,6 @@ import { Event, Emitter } from 'vs/base/common/event';
import { IDisposable } from 'vs/base/common/lifecycle';
import { addDisposableListener, EventType } from 'vs/base/browser/dom';
import { memoize } from 'vs/base/common/decorators';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { DashboardServiceInterface } from 'sql/workbench/parts/dashboard/services/dashboardServiceInterface.service';
import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServiceInterface.service';
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
@@ -20,7 +19,6 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
import * as azdata from 'azdata';
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
@Component({
template: '',
@@ -41,9 +39,7 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
constructor(
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
@Inject(IInstantiationService) private instantiationService: IInstantiationService
) {
super();
@@ -115,7 +111,6 @@ export class WebviewContent extends AngularDisposable implements OnInit, IDashbo
this._onMessageDisposable = this._webview.onMessage(e => {
this._onMessage.fire(e);
});
this._webview.style(this.themeService.getTheme());
if (this._html) {
this._webview.contents = this._html;
}

View File

@@ -15,10 +15,8 @@ import { CommonServiceInterface } from 'sql/platform/bootstrap/node/commonServic
import { IDashboardWebview, IDashboardViewService } from 'sql/platform/dashboard/common/dashboardViewService';
import * as azdata from 'azdata';
import { IWorkbenchThemeService } from 'vs/workbench/services/themes/common/workbenchThemeService';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { WebviewElement } from 'vs/workbench/contrib/webview/electron-browser/webviewElement';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
interface IWebviewWidgetConfig {
id: string;
@@ -43,8 +41,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
@Inject(forwardRef(() => CommonServiceInterface)) private _dashboardService: DashboardServiceInterface,
@Inject(WIDGET_CONFIG) protected _config: WidgetConfig,
@Inject(forwardRef(() => ElementRef)) private _el: ElementRef,
@Inject(IWorkbenchLayoutService) private layoutService: IWorkbenchLayoutService,
@Inject(IWorkbenchThemeService) private themeService: IWorkbenchThemeService,
@Inject(IDashboardViewService) private dashboardViewService: IDashboardViewService,
@Inject(IInstantiationService) private instantiationService: IInstantiationService,
) {
@@ -113,7 +109,6 @@ export class WebviewWidget extends DashboardWidget implements IDashboardWidget,
this._onMessageDisposable = this._webview.onMessage(e => {
this._onMessage.fire(e);
});
this._webview.style(this.themeService.getTheme());
if (this._html) {
this._webview.contents = this._html;
}

View File

@@ -3,8 +3,6 @@
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
'use strict';
import 'vs/css!sql/media/icons/common-icons';
import { Button } from 'sql/base/browser/ui/button/button';
import { Modal } from 'sql/workbench/browser/modal/modal';
@@ -95,14 +93,10 @@ export class WebViewDialog extends Modal {
this._webview.mountTo(this._body);
this._webview.style(this._themeService.getTheme());
this._webview.onMessage(message => {
this._onMessage.fire(message);
}, null, this.contentDisposables);
this._themeService.onThemeChange(theme => this._webview.style(theme), null, this.contentDisposables);
this.contentDisposables.push(this._webview);
this.contentDisposables.push(toDisposable(() => this._webview = null));
}