Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3 (#12295)

* Merge from vscode fcf3346a8e9f5ee1e00674461d9e2c2292a14ee3

* Fix test build break

* Update distro

* Fix build errors

* Update distro

* Update REH build file

* Update build task names for REL

* Fix product build yaml

* Fix product REH task name

* Fix type in task name

* Update linux build step

* Update windows build tasks

* Turn off server publish

* Disable REH

* Fix typo

* Bump distro

* Update vscode tests

* Bump distro

* Fix type in disto

* Bump distro

* Turn off docker build

* Remove docker step from release

Co-authored-by: ADS Merger <andresse@microsoft.com>
Co-authored-by: Karl Burtram <karlb@microsoft.com>
This commit is contained in:
Christopher Suh
2020-10-03 14:42:05 -04:00
committed by GitHub
parent 58d02b76db
commit 6ff1e3866b
687 changed files with 10507 additions and 9104 deletions

View File

@@ -9,8 +9,7 @@ import { Event, Emitter } from 'vs/base/common/event';
import { domEvent } from 'vs/base/browser/event';
import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent';
import { KeyCode } from 'vs/base/common/keyCodes';
import { $, append, addClass, removeClass, toggleClass, trackFocus, EventHelper, clearNode } from 'vs/base/browser/dom';
import { firstIndex } from 'vs/base/common/arrays';
import { $, append, trackFocus, EventHelper, clearNode } from 'vs/base/browser/dom';
import { Color, RGBA } from 'vs/base/common/color';
import { SplitView, IView } from './splitview';
import { isFirefox } from 'vs/base/browser/browser';
@@ -143,7 +142,7 @@ export abstract class Pane extends Disposable implements IView {
}
if (this.element) {
toggleClass(this.element, 'expanded', expanded);
this.element.classList.toggle('expanded', expanded);
}
this._expanded = !!expanded;
@@ -191,8 +190,8 @@ export abstract class Pane extends Disposable implements IView {
this._orientation = orientation;
if (this.element) {
toggleClass(this.element, 'horizontal', this.orientation === Orientation.HORIZONTAL);
toggleClass(this.element, 'vertical', this.orientation === Orientation.VERTICAL);
this.element.classList.toggle('horizontal', this.orientation === Orientation.HORIZONTAL);
this.element.classList.toggle('vertical', this.orientation === Orientation.VERTICAL);
}
if (this.header) {
@@ -201,9 +200,9 @@ export abstract class Pane extends Disposable implements IView {
}
render(): void {
toggleClass(this.element, 'expanded', this.isExpanded());
toggleClass(this.element, 'horizontal', this.orientation === Orientation.HORIZONTAL);
toggleClass(this.element, 'vertical', this.orientation === Orientation.VERTICAL);
this.element.classList.toggle('expanded', this.isExpanded());
this.element.classList.toggle('horizontal', this.orientation === Orientation.HORIZONTAL);
this.element.classList.toggle('vertical', this.orientation === Orientation.VERTICAL);
this.header = $('.pane-header');
append(this.element, this.header);
@@ -215,8 +214,8 @@ export abstract class Pane extends Disposable implements IView {
const focusTracker = trackFocus(this.header);
this._register(focusTracker);
this._register(focusTracker.onDidFocus(() => addClass(this.header, 'focused'), null));
this._register(focusTracker.onDidBlur(() => removeClass(this.header, 'focused'), null));
this._register(focusTracker.onDidFocus(() => this.header.classList.add('focused'), null));
this._register(focusTracker.onDidBlur(() => this.header.classList.remove('focused'), null));
this.updateHeader();
@@ -255,7 +254,7 @@ export abstract class Pane extends Disposable implements IView {
const height = this._orientation === Orientation.VERTICAL ? size - headerSize : this.orthogonalSize - headerSize;
if (this.isExpanded()) {
toggleClass(this.body, 'wide', width >= 600);
this.body.classList.toggle('wide', width >= 600);
this.layoutBody(height, width);
this.expandedSize = size;
}
@@ -275,8 +274,8 @@ export abstract class Pane extends Disposable implements IView {
const expanded = !this.headerVisible || this.isExpanded();
this.header.style.lineHeight = `${this.headerSize}px`;
toggleClass(this.header, 'hidden', !this.headerVisible);
toggleClass(this.header, 'expanded', expanded);
this.header.classList.toggle('hidden', !this.headerVisible);
this.header.classList.toggle('expanded', expanded);
this.header.setAttribute('aria-expanded', String(expanded));
this.header.style.color = this.styles.headerForeground ? this.styles.headerForeground.toString() : '';
@@ -474,7 +473,7 @@ export class PaneView extends Disposable {
}
removePane(pane: Pane): void {
const index = firstIndex(this.paneItems, item => item.pane === pane);
const index = this.paneItems.findIndex(item => item.pane === pane);
if (index === -1) {
return;
@@ -486,8 +485,8 @@ export class PaneView extends Disposable {
}
movePane(from: Pane, to: Pane): void {
const fromIndex = firstIndex(this.paneItems, item => item.pane === from);
const toIndex = firstIndex(this.paneItems, item => item.pane === to);
const fromIndex = this.paneItems.findIndex(item => item.pane === from);
const toIndex = this.paneItems.findIndex(item => item.pane === to);
if (fromIndex === -1 || toIndex === -1) {
return;
@@ -500,7 +499,7 @@ export class PaneView extends Disposable {
}
resizePane(pane: Pane, size: number): void {
const index = firstIndex(this.paneItems, item => item.pane === pane);
const index = this.paneItems.findIndex(item => item.pane === pane);
if (index === -1) {
return;
@@ -510,7 +509,7 @@ export class PaneView extends Disposable {
}
getPaneSize(pane: Pane): number {
const index = firstIndex(this.paneItems, item => item.pane === pane);
const index = this.paneItems.findIndex(item => item.pane === pane);
if (index === -1) {
return -1;
@@ -561,11 +560,11 @@ export class PaneView extends Disposable {
window.clearTimeout(this.animationTimer);
}
addClass(this.el, 'animated');
this.el.classList.add('animated');
this.animationTimer = window.setTimeout(() => {
this.animationTimer = undefined;
removeClass(this.el, 'animated');
this.el.classList.remove('animated');
}, 200);
}

View File

@@ -7,12 +7,12 @@ import 'vs/css!./splitview';
import { IDisposable, toDisposable, Disposable, combinedDisposable } from 'vs/base/common/lifecycle';
import { Event, Emitter } from 'vs/base/common/event';
import * as types from 'vs/base/common/types';
import * as dom from 'vs/base/browser/dom';
import { clamp } from 'vs/base/common/numbers';
import { range, firstIndex, pushToStart, pushToEnd } from 'vs/base/common/arrays';
import { range, pushToStart, pushToEnd } from 'vs/base/common/arrays';
import { Sash, Orientation, ISashEvent as IBaseSashEvent, SashState } from 'vs/base/browser/ui/sash/sash';
import { Color } from 'vs/base/common/color';
import { domEvent } from 'vs/base/browser/event';
import { $, append } from 'vs/base/browser/dom';
export { Orientation } from 'vs/base/browser/ui/sash/sash';
export interface ISplitViewStyles {
@@ -93,7 +93,7 @@ abstract class ViewItem<TLayoutContext> {
this.size = 0;
}
dom.toggleClass(this.container, 'visible', visible);
this.container.classList.toggle('visible', visible);
if (this.view.setVisible) {
this.view.setVisible(visible);
@@ -122,7 +122,7 @@ abstract class ViewItem<TLayoutContext> {
if (typeof size === 'number') {
this._size = size;
this._cachedVisibleSize = undefined;
dom.addClass(container, 'visible');
container.classList.add('visible');
} else {
this._size = 0;
this._cachedVisibleSize = size.cachedVisibleSize;
@@ -296,12 +296,12 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
this.proportionalLayout = types.isUndefined(options.proportionalLayout) ? true : !!options.proportionalLayout;
this.el = document.createElement('div');
dom.addClass(this.el, 'monaco-split-view2');
dom.addClass(this.el, this.orientation === Orientation.VERTICAL ? 'vertical' : 'horizontal');
this.el.classList.add('monaco-split-view2');
this.el.classList.add(this.orientation === Orientation.VERTICAL ? 'vertical' : 'horizontal');
container.appendChild(this.el);
this.sashContainer = dom.append(this.el, dom.$('.sash-container'));
this.viewContainer = dom.append(this.el, dom.$('.split-view-container'));
this.sashContainer = append(this.el, $('.sash-container'));
this.viewContainer = append(this.el, $('.split-view-container'));
this.style(options.styles || defaultStyles);
@@ -323,10 +323,10 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
style(styles: ISplitViewStyles): void {
if (styles.separatorBorder.isTransparent()) {
dom.removeClass(this.el, 'separator-border');
this.el.classList.remove('separator-border');
this.el.style.removeProperty('--separator-border');
} else {
dom.addClass(this.el, 'separator-border');
this.el.classList.add('separator-border');
this.el.style.setProperty('--separator-border', styles.separatorBorder.toString());
}
}
@@ -460,7 +460,7 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
item.enabled = false;
}
const index = firstIndex(this.sashItems, item => item.sash === sash);
const index = this.sashItems.findIndex(item => item.sash === sash);
// This way, we can press Alt while we resize a sash, macOS style!
const disposable = combinedDisposable(
@@ -657,7 +657,7 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
this.state = State.Busy;
// Add view
const container = dom.$('.split-view-view');
const container = $('.split-view-view');
if (index === this.viewItems.length) {
this.viewContainer.appendChild(container);
@@ -709,11 +709,11 @@ export class SplitView<TLayoutContext = undefined> extends Disposable {
const onStartDisposable = onStart(this.onSashStart, this);
const onChange = Event.map(sash.onDidChange, sashEventMapper);
const onChangeDisposable = onChange(this.onSashChange, this);
const onEnd = Event.map(sash.onDidEnd, () => firstIndex(this.sashItems, item => item.sash === sash));
const onEnd = Event.map(sash.onDidEnd, () => this.sashItems.findIndex(item => item.sash === sash));
const onEndDisposable = onEnd(this.onSashEnd, this);
const onDidResetDisposable = sash.onDidReset(() => {
const index = firstIndex(this.sashItems, item => item.sash === sash);
const index = this.sashItems.findIndex(item => item.sash === sash);
const upIndexes = range(index, -1);
const downIndexes = range(index + 1, this.viewItems.length);
const snapBeforeIndex = this.findFirstSnapIndex(upIndexes);