Vscode merge (#4582)

* Merge from vscode 37cb23d3dd4f9433d56d4ba5ea3203580719a0bd

* fix issues with merges

* bump node version in azpipe

* replace license headers

* remove duplicate launch task

* fix build errors

* fix build errors

* fix tslint issues

* working through package and linux build issues

* more work

* wip

* fix packaged builds

* working through linux build errors

* wip

* wip

* wip

* fix mac and linux file limits

* iterate linux pipeline

* disable editor typing

* revert series to parallel

* remove optimize vscode from linux

* fix linting issues

* revert testing change

* add work round for new node

* readd packaging for extensions

* fix issue with angular not resolving decorator dependencies
This commit is contained in:
Anthony Dresser
2019-03-19 17:44:35 -07:00
committed by GitHub
parent 833d197412
commit 87765e8673
1879 changed files with 54505 additions and 38058 deletions

View File

@@ -42,9 +42,10 @@ export abstract class Panel implements IView {
private static readonly HEADER_SIZE = 22;
readonly element: HTMLElement;
private header: HTMLElement;
private body: HTMLElement;
protected _expanded: boolean;
protected disposables: IDisposable[] = [];
private expandedSize: number | undefined = undefined;
private _headerVisible = true;
@@ -52,12 +53,13 @@ export abstract class Panel implements IView {
private _maximumBodySize: number;
private ariaHeaderLabel: string;
private styles: IPanelStyles = {};
private header: HTMLElement;
private animationTimer: number | undefined = undefined;
private _onDidChange = new Emitter<number | undefined>();
readonly onDidChange: Event<number | undefined> = this._onDidChange.event;
protected disposables: IDisposable[] = [];
get draggableElement(): HTMLElement {
return this.header;
}
@@ -131,8 +133,19 @@ export abstract class Panel implements IView {
this._expanded = !!expanded;
this.updateHeader();
this._onDidChange.fire(expanded ? this.expandedSize : undefined);
if (expanded) {
if (typeof this.animationTimer === 'number') {
clearTimeout(this.animationTimer);
}
append(this.element, this.body);
} else {
this.animationTimer = window.setTimeout(() => {
this.body.remove();
}, 200);
}
this._onDidChange.fire(expanded ? this.expandedSize : undefined);
return true;
}
@@ -159,8 +172,9 @@ export abstract class Panel implements IView {
this.renderHeader(this.header);
const focusTracker = trackFocus(this.header);
focusTracker.onDidFocus(() => addClass(this.header, 'focused'));
focusTracker.onDidBlur(() => removeClass(this.header, 'focused'));
this.disposables.push(focusTracker);
focusTracker.onDidFocus(() => addClass(this.header, 'focused'), null, this.disposables);
focusTracker.onDidBlur(() => removeClass(this.header, 'focused'), null, this.disposables);
this.updateHeader();
@@ -179,15 +193,8 @@ export abstract class Panel implements IView {
domEvent(this.header, 'click')
(() => this.setExpanded(!this.isExpanded()), null, this.disposables);
// TODO@Joao move this down to panelview
// onHeaderKeyDown.filter(e => e.keyCode === KeyCode.UpArrow)
// .event(focusPrevious, this, this.disposables);
// onHeaderKeyDown.filter(e => e.keyCode === KeyCode.DownArrow)
// .event(focusNext, this, this.disposables);
const body = append(this.element, $('.panel-body'));
this.renderBody(body);
this.body = append(this.element, $('.panel-body'));
this.renderBody(this.body);
}
layout(height: number): void {
@@ -268,7 +275,7 @@ class PanelDraggable extends Disposable {
e.dataTransfer.effectAllowed = 'move';
const dragImage = append(document.body, $('.monaco-panel-drag-image', {}, this.panel.draggableElement.textContent || ''));
const dragImage = append(document.body, $('.monaco-drag-image', {}, this.panel.draggableElement.textContent || ''));
e.dataTransfer.setDragImage(dragImage, -10, -10);
setTimeout(() => document.body.removeChild(dragImage), 0);
@@ -373,7 +380,7 @@ export class PanelView extends Disposable {
private panelItems: IPanelItem[] = [];
private width: number;
private splitview: SplitView;
private animationTimer: number | null = null;
private animationTimer: number | undefined = undefined;
private _onDidDrop = this._register(new Emitter<{ from: Panel, to: Panel }>());
readonly onDidDrop: Event<{ from: Panel, to: Panel }> = this._onDidDrop.event;
@@ -475,7 +482,7 @@ export class PanelView extends Disposable {
addClass(this.el, 'animated');
this.animationTimer = window.setTimeout(() => {
this.animationTimer = null;
this.animationTimer = undefined;
removeClass(this.el, 'animated');
}, 200);
}