Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c (#8525)

* Merge from vscode a5cf1da01d5db3d2557132be8d30f89c38019f6c

* remove files we don't want

* fix hygiene

* update distro

* update distro

* fix hygiene

* fix strict nulls

* distro

* distro

* fix tests

* fix tests

* add another edit

* fix viewlet icon

* fix azure dialog

* fix some padding

* fix more padding issues
This commit is contained in:
Anthony Dresser
2019-12-04 19:28:22 -08:00
committed by GitHub
parent a8818ab0df
commit f5ce7fb2a5
1507 changed files with 42813 additions and 27370 deletions

View File

@@ -28,7 +28,6 @@ import { KeyCode } from 'vs/base/common/keyCodes';
import { dispose, IDisposable, Disposable, DisposableStore } from 'vs/base/common/lifecycle';
import { ISpliceable } from 'vs/base/common/sequence';
import { escapeRegExpCharacters, startsWith } from 'vs/base/common/strings';
import { URI } from 'vs/base/common/uri';
import { localize } from 'vs/nls';
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
import { ICommandService } from 'vs/platform/commands/common/commands';
@@ -37,7 +36,7 @@ import { IContextMenuService, IContextViewService } from 'vs/platform/contextvie
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
import { IOpenerService } from 'vs/platform/opener/common/opener';
import { errorForeground, focusBorder, foreground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, transparent } from 'vs/platform/theme/common/colorRegistry';
import { errorForeground, focusBorder, foreground, inputValidationErrorBackground, inputValidationErrorBorder, inputValidationErrorForeground, editorBackground } from 'vs/platform/theme/common/colorRegistry';
import { attachButtonStyler, attachInputBoxStyler, attachSelectBoxStyler, attachStyler } from 'vs/platform/theme/common/styler';
import { ICssStyleCollector, ITheme, IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { ITOCEntry } from 'vs/workbench/contrib/preferences/browser/settingsLayout';
@@ -47,6 +46,8 @@ import { SETTINGS_EDITOR_COMMAND_SHOW_CONTEXT_MENU } from 'vs/workbench/contrib/
import { ISetting, ISettingsGroup, SettingValueType } from 'vs/workbench/services/preferences/common/preferences';
import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService';
import { isArray } from 'vs/base/common/types';
import { BrowserFeatures } from 'vs/base/browser/canIUse';
import { isIOS } from 'vs/base/common/platform';
const $ = DOM.$;
@@ -466,7 +467,10 @@ export abstract class AbstractSettingRenderer extends Disposable implements ITre
}
const onChange = (value: any) => this._onDidChangeSetting.fire({ key: element.setting.key, value, type: template.context!.valueType });
template.deprecationWarningElement.innerText = element.setting.deprecationMessage || '';
const deprecationText = element.setting.deprecationMessage || '';
template.deprecationWarningElement.innerText = deprecationText;
DOM.toggleClass(template.containerElement, 'is-deprecated', !!deprecationText);
this.renderValue(element, <ISettingItemTemplate>template, onChange);
}
@@ -485,15 +489,7 @@ export abstract class AbstractSettingRenderer extends Disposable implements ITre
};
this._onDidClickSettingLink.fire(e);
} else {
let uri: URI | undefined;
try {
uri = URI.parse(content);
} catch (err) {
// ignore
}
if (uri) {
this._openerService.open(uri).catch(onUnexpectedError);
}
this._openerService.open(content).catch(onUnexpectedError);
}
},
disposeables
@@ -918,7 +914,9 @@ export class SettingEnumRenderer extends AbstractSettingRenderer implements ITre
renderTemplate(container: HTMLElement): ISettingEnumItemTemplate {
const common = this.renderCommonTemplate(null, container, 'enum');
const selectBox = new SelectBox([], 0, this._contextViewService, undefined, { useCustomDrawn: true });
const selectBox = new SelectBox([], 0, this._contextViewService, undefined, {
useCustomDrawn: !(isIOS && BrowserFeatures.pointerEvents)
});
common.toDispose.push(selectBox);
common.toDispose.push(attachSelectBoxStyler(selectBox, this._themeService, {
@@ -1456,8 +1454,6 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
@IThemeService themeService: IThemeService,
@IInstantiationService instantiationService: IInstantiationService,
) {
const treeClass = 'settings-editor-tree';
super('SettingsTree', container,
new SettingsTreeDelegate(),
renderers,
@@ -1470,7 +1466,7 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
return e.id;
}
},
styleController: new DefaultStyleController(DOM.createStyleSheet(container), treeClass),
styleController: id => new DefaultStyleController(DOM.createStyleSheet(container), id),
filter: instantiationService.createInstance(SettingsTreeFilter, viewState)
});
@@ -1488,6 +1484,8 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
// applying an opacity to the link color.
const fgWithOpacity = new Color(new RGBA(foregroundColor.rgba.r, foregroundColor.rgba.g, foregroundColor.rgba.b, 0.9));
collector.addRule(`.settings-editor > .settings-body > .settings-tree-container .setting-item-contents .setting-item-description { color: ${fgWithOpacity}; }`);
collector.addRule(`.settings-editor > .settings-body .settings-toc-container .monaco-list-row:not(.selected) { color: ${fgWithOpacity}; }`);
}
const errorColor = theme.getColor(errorForeground);
@@ -1523,23 +1521,24 @@ export class SettingsTree extends ObjectTree<SettingsTreeElement> {
}
}));
this.getHTMLElement().classList.add(treeClass);
this.getHTMLElement().classList.add('settings-editor-tree');
this.disposables.add(attachStyler(themeService, {
listActiveSelectionBackground: transparent(Color.white, 0),
listBackground: editorBackground,
listActiveSelectionBackground: editorBackground,
listActiveSelectionForeground: foreground,
listFocusAndSelectionBackground: transparent(Color.white, 0),
listFocusAndSelectionBackground: editorBackground,
listFocusAndSelectionForeground: foreground,
listFocusBackground: transparent(Color.white, 0),
listFocusBackground: editorBackground,
listFocusForeground: foreground,
listHoverForeground: foreground,
listHoverBackground: transparent(Color.white, 0),
listHoverOutline: transparent(Color.white, 0),
listFocusOutline: transparent(Color.white, 0),
listInactiveSelectionBackground: transparent(Color.white, 0),
listHoverBackground: editorBackground,
listHoverOutline: editorBackground,
listFocusOutline: editorBackground,
listInactiveSelectionBackground: editorBackground,
listInactiveSelectionForeground: foreground,
listInactiveFocusBackground: transparent(Color.white, 0),
listInactiveFocusOutline: transparent(Color.white, 0)
listInactiveFocusBackground: editorBackground,
listInactiveFocusOutline: editorBackground
}, colors => {
this.style(colors);
}));