Merge VS Code 1.23.1 (#1520)

This commit is contained in:
Matt Irvine
2018-06-05 11:24:51 -07:00
committed by GitHub
parent e3baf5c443
commit 0c58f09e59
3651 changed files with 74249 additions and 48599 deletions

View File

@@ -2,12 +2,14 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the Source EULA. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
.progress-container {
.monaco-progress-container {
width: 100%;
height: 5px;
overflow: hidden; /* keep progress bit in bounds */
}
.progress-container .progress-bit {
.monaco-progress-container .progress-bit {
width: 2%;
height: 5px;
position: absolute;
@@ -15,11 +17,11 @@
display: none;
}
.progress-container.active .progress-bit {
.monaco-progress-container.active .progress-bit {
display: inherit;
}
.progress-container.discrete .progress-bit {
.monaco-progress-container.discrete .progress-bit {
left: 0;
transition: width 100ms linear;
-webkit-transition: width 100ms linear;
@@ -28,11 +30,11 @@
-ms-transition: width 100ms linear;
}
.progress-container.discrete.done .progress-bit {
.monaco-progress-container.discrete.done .progress-bit {
width: 100%;
}
.progress-container.infinite .progress-bit {
.monaco-progress-container.infinite .progress-bit {
animation-name: progress;
animation-duration: 4s;
animation-iteration-count: infinite;
@@ -49,11 +51,17 @@
-moz-animation-duration: 4s;
-moz-animation-iteration-count: infinite;
-moz-animation-timing-function: linear;
will-change: transform;
}
@keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-ms-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-webkit-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
@-moz-keyframes progress { from { left: 0; width: 2%; } 50% { left: 50%; width: 5%; } to { left: 98%; width: 2%; } }
/**
* The progress bit has a width: 2% (1/50) of the parent container. The animation moves it from 0% to 100% of
* that container. Since translateX is relative to the progress bit size, we have to multiple it with
* its relative size to the parent container:
* 50%: 50 * 50 = 2500%
* 100%: 50 * 100 - 50 (do not overflow): 4950%
*/
@keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }
@-ms-keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }
@-webkit-keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }
@-moz-keyframes progress { from { transform: translateX(0%) scaleX(1) } 50% { transform: translateX(2500%) scaleX(3) } to { transform: translateX(4950%) scaleX(1) } }

View File

@@ -7,9 +7,9 @@
import 'vs/css!./progressbar';
import { TPromise, ValueCallback } from 'vs/base/common/winjs.base';
import assert = require('vs/base/common/assert');
import * as assert from 'vs/base/common/assert';
import { Builder, $ } from 'vs/base/browser/builder';
import DOM = require('vs/base/browser/dom');
import * as DOM from 'vs/base/browser/dom';
import { IDisposable, dispose } from 'vs/base/common/lifecycle';
import { Color } from 'vs/base/common/color';
import { mixin } from 'vs/base/common/objects';
@@ -18,7 +18,7 @@ const css_done = 'done';
const css_active = 'active';
const css_infinite = 'infinite';
const css_discrete = 'discrete';
const css_progress_container = 'progress-container';
const css_progress_container = 'monaco-progress-container';
const css_progress_bit = 'progress-bit';
export interface IProgressBarOptions extends IProgressBarStyles {
@@ -45,9 +45,7 @@ export class ProgressBar {
private animationStopToken: ValueCallback;
private progressBarBackground: Color;
constructor(container: Builder, options?: IProgressBarOptions);
constructor(container: HTMLElement, options?: IProgressBarOptions);
constructor(container: any, options?: IProgressBarOptions) {
constructor(container: HTMLElement, options?: IProgressBarOptions) {
this.options = options || Object.create(null);
mixin(this.options, defaultOpts, false);
@@ -59,10 +57,8 @@ export class ProgressBar {
this.create(container);
}
private create(container: Builder): void;
private create(container: HTMLElement): void;
private create(container: any): void {
$(container).div({ 'class': css_progress_container }, (builder) => {
private create(container: HTMLElement): void {
$(container).div({ 'class': css_progress_container }, builder => {
this.element = builder.clone();
builder.div({ 'class': css_progress_bit }).on([DOM.EventType.ANIMATION_START, DOM.EventType.ANIMATION_END, DOM.EventType.ANIMATION_ITERATION], (e: Event) => {
@@ -201,11 +197,20 @@ export class ProgressBar {
return this;
}
/**
* Returns the builder this progress bar is building in.
*/
public getContainer(): Builder {
return $(this.element);
public getContainer(): HTMLElement {
return this.element.getHTMLElement();
}
public show(delay?: number): void {
if (typeof delay === 'number') {
this.element.showDelayed(delay);
} else {
this.element.show();
}
}
public hide(): void {
this.element.hide();
}
public style(styles: IProgressBarStyles): void {