mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 10:58:30 -05:00
Merge from vscode 10492ba146318412cbee8b76a8c630f226914734
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
* Licensed under the Source EULA. See License.txt in the project root for license information.
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
.quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-entry-action-bar .action-label.dirty-workspace::before {
|
||||
.monaco-workbench .quick-input-list .quick-input-list-entry.has-actions:hover .quick-input-list-entry-action-bar .action-label.dirty-workspace::before {
|
||||
content: "\ea76"; /* Close icon flips between black dot and "X" for dirty workspaces */
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
.monaco-workbench .part > .drop-block-overlay.visible {
|
||||
display: block;
|
||||
backdrop-filter: brightness(97%) blur(2px);
|
||||
|
||||
@@ -18,7 +18,9 @@ import { IPaneComposite } from 'vs/workbench/common/panecomposite';
|
||||
import { IAction, IActionViewItem } from 'vs/base/common/actions';
|
||||
|
||||
export class PaneComposite extends Composite implements IPaneComposite {
|
||||
constructor(id: string,
|
||||
|
||||
constructor(
|
||||
id: string,
|
||||
protected readonly viewPaneContainer: ViewPaneContainer,
|
||||
@ITelemetryService
|
||||
telemetryService: ITelemetryService,
|
||||
@@ -33,24 +35,30 @@ export class PaneComposite extends Composite implements IPaneComposite {
|
||||
@IExtensionService
|
||||
protected extensionService: IExtensionService,
|
||||
@IWorkspaceContextService
|
||||
protected contextService: IWorkspaceContextService) {
|
||||
protected contextService: IWorkspaceContextService
|
||||
) {
|
||||
super(id, telemetryService, themeService, storageService);
|
||||
|
||||
this._register(this.viewPaneContainer.onTitleAreaUpdate(() => this.updateTitleArea()));
|
||||
}
|
||||
|
||||
create(parent: HTMLElement): void {
|
||||
this.viewPaneContainer.create(parent);
|
||||
}
|
||||
|
||||
setVisible(visible: boolean): void {
|
||||
super.setVisible(visible);
|
||||
this.viewPaneContainer.setVisible(visible);
|
||||
}
|
||||
|
||||
layout(dimension: Dimension): void {
|
||||
this.viewPaneContainer.layout(dimension);
|
||||
}
|
||||
|
||||
getOptimalWidth(): number {
|
||||
return this.viewPaneContainer.getOptimalWidth();
|
||||
}
|
||||
|
||||
openView(id: string, focus?: boolean): IView {
|
||||
return this.viewPaneContainer.openView(id, focus);
|
||||
}
|
||||
|
||||
@@ -196,8 +196,8 @@ export class GlobalActivityActionViewItem extends ActivityActionViewItem {
|
||||
colors: (theme: IColorTheme) => ICompositeBarColors,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IMenuService private readonly menuService: IMenuService,
|
||||
@IContextMenuService protected contextMenuService: IContextMenuService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IContextMenuService protected readonly contextMenuService: IContextMenuService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService
|
||||
) {
|
||||
super(action, { draggable: false, colors, icon: true }, themeService);
|
||||
}
|
||||
|
||||
@@ -87,18 +87,18 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
|
||||
private globalActivityAction: ActivityAction | undefined;
|
||||
private globalActivityActionBar: ActionBar | undefined;
|
||||
private globalActivity: ICompositeActivity[] = [];
|
||||
private readonly globalActivity: ICompositeActivity[] = [];
|
||||
|
||||
private customMenubar: CustomMenubarControl | undefined;
|
||||
private menubar: HTMLElement | undefined;
|
||||
private content: HTMLElement | undefined;
|
||||
|
||||
private cachedViewlets: ICachedViewlet[] = [];
|
||||
private readonly cachedViewlets: ICachedViewlet[] = [];
|
||||
|
||||
private compositeBar: CompositeBar;
|
||||
private readonly compositeActions: Map<string, { activityAction: ViewletActivityAction, pinnedAction: ToggleCompositePinnedAction }> = new Map();
|
||||
private readonly compositeActions = new Map<string, { activityAction: ViewletActivityAction, pinnedAction: ToggleCompositePinnedAction }>();
|
||||
|
||||
private readonly viewletDisposables: Map<string, IDisposable> = new Map<string, IDisposable>();
|
||||
private readonly viewletDisposables = new Map<string, IDisposable>();
|
||||
|
||||
constructor(
|
||||
@IViewletService private readonly viewletService: IViewletService,
|
||||
@@ -116,6 +116,7 @@ export class ActivitybarPart extends Part implements IActivityBarService {
|
||||
@IProductService private readonly productService: IProductService
|
||||
) {
|
||||
super(Parts.ACTIVITYBAR_PART, { hasTitle: false }, themeService, storageService, layoutService);
|
||||
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: ActivitybarPart.PINNED_VIEWLETS, version: 1 });
|
||||
this.migrateFromOldCachedViewletsValue();
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ export class CompositeDragAndDrop implements ICompositeDragAndDrop {
|
||||
private openComposite: (id: string, focus?: boolean) => Promise<IPaneComposite | undefined>,
|
||||
private moveComposite: (from: string, to: string, before?: Before2D) => void,
|
||||
) { }
|
||||
|
||||
drop(data: CompositeDragAndDropData, targetCompositeId: string | undefined, originalEvent: DragEvent, before?: Before2D): void {
|
||||
const dragData = data.getData();
|
||||
const viewContainerRegistry = Registry.as<IViewContainersRegistry>(ViewContainerExtensions.ViewContainersRegistry);
|
||||
@@ -150,6 +151,7 @@ export class CompositeDragAndDrop implements ICompositeDragAndDrop {
|
||||
}
|
||||
|
||||
export interface ICompositeBarOptions {
|
||||
|
||||
readonly icon: boolean;
|
||||
readonly orientation: ActionsOrientation;
|
||||
readonly colors: (theme: IColorTheme) => ICompositeBarColors;
|
||||
@@ -169,6 +171,9 @@ export interface ICompositeBarOptions {
|
||||
|
||||
export class CompositeBar extends Widget implements ICompositeBar {
|
||||
|
||||
private readonly _onDidChange = this._register(new Emitter<void>());
|
||||
readonly onDidChange = this._onDidChange.event;
|
||||
|
||||
private dimension: Dimension | undefined;
|
||||
|
||||
private compositeSwitcherBar: ActionBar | undefined;
|
||||
@@ -179,12 +184,9 @@ export class CompositeBar extends Widget implements ICompositeBar {
|
||||
private visibleComposites: string[];
|
||||
private compositeSizeInBar: Map<string, number>;
|
||||
|
||||
private readonly _onDidChange: Emitter<void> = this._register(new Emitter<void>());
|
||||
readonly onDidChange = this._onDidChange.event;
|
||||
|
||||
constructor(
|
||||
items: ICompositeBarItem[],
|
||||
private options: ICompositeBarOptions,
|
||||
private readonly options: ICompositeBarOptions,
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IContextMenuService private readonly contextMenuService: IContextMenuService
|
||||
) {
|
||||
|
||||
@@ -138,7 +138,7 @@ export class ActivityActionViewItem extends BaseActionViewItem {
|
||||
constructor(
|
||||
action: ActivityAction,
|
||||
options: IActivityActionViewItemOptions,
|
||||
@IThemeService protected themeService: IThemeService
|
||||
@IThemeService protected readonly themeService: IThemeService
|
||||
) {
|
||||
super(null, action, options);
|
||||
|
||||
|
||||
@@ -60,11 +60,11 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
||||
protected toolBar: ToolBar | undefined;
|
||||
protected titleLabelElement: HTMLElement | undefined;
|
||||
|
||||
private mapCompositeToCompositeContainer = new Map<string, HTMLElement>();
|
||||
private mapActionsBindingToComposite = new Map<string, () => void>();
|
||||
private readonly mapCompositeToCompositeContainer = new Map<string, HTMLElement>();
|
||||
private readonly mapActionsBindingToComposite = new Map<string, () => void>();
|
||||
private activeComposite: Composite | undefined;
|
||||
private lastActiveCompositeId: string;
|
||||
private instantiatedCompositeItems: Map<string, CompositeItem>;
|
||||
private readonly instantiatedCompositeItems = new Map<string, CompositeItem>();
|
||||
private titleLabel: ICompositeTitleLabel | undefined;
|
||||
private progressBar: ProgressBar | undefined;
|
||||
private contentAreaSize: Dimension | undefined;
|
||||
@@ -72,26 +72,25 @@ export abstract class CompositePart<T extends Composite> extends Part {
|
||||
private currentCompositeOpenToken: string | undefined;
|
||||
|
||||
constructor(
|
||||
private notificationService: INotificationService,
|
||||
protected storageService: IStorageService,
|
||||
private telemetryService: ITelemetryService,
|
||||
protected contextMenuService: IContextMenuService,
|
||||
protected layoutService: IWorkbenchLayoutService,
|
||||
protected keybindingService: IKeybindingService,
|
||||
protected instantiationService: IInstantiationService,
|
||||
private readonly notificationService: INotificationService,
|
||||
protected readonly storageService: IStorageService,
|
||||
private readonly telemetryService: ITelemetryService,
|
||||
protected readonly contextMenuService: IContextMenuService,
|
||||
protected readonly layoutService: IWorkbenchLayoutService,
|
||||
protected readonly keybindingService: IKeybindingService,
|
||||
protected readonly instantiationService: IInstantiationService,
|
||||
themeService: IThemeService,
|
||||
protected readonly registry: CompositeRegistry<T>,
|
||||
private activeCompositeSettingsKey: string,
|
||||
private defaultCompositeId: string,
|
||||
private nameForTelemetry: string,
|
||||
private compositeCSSClass: string,
|
||||
private titleForegroundColor: string | undefined,
|
||||
private readonly activeCompositeSettingsKey: string,
|
||||
private readonly defaultCompositeId: string,
|
||||
private readonly nameForTelemetry: string,
|
||||
private readonly compositeCSSClass: string,
|
||||
private readonly titleForegroundColor: string | undefined,
|
||||
id: string,
|
||||
options: IPartOptions
|
||||
) {
|
||||
super(id, options, themeService, storageService, layoutService);
|
||||
|
||||
this.instantiatedCompositeItems = new Map<string, CompositeItem>();
|
||||
this.lastActiveCompositeId = storageService.get(activeCompositeSettingsKey, StorageScope.WORKSPACE, this.defaultCompositeId);
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,6 @@ import { IEditorGroup, GroupDirection, IAddGroupOptions, IMergeGroupOptions, Gro
|
||||
import { IDisposable } from 'vs/base/common/lifecycle';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
import { ISerializableView } from 'vs/base/browser/ui/grid/grid';
|
||||
import { getCodeEditor } from 'vs/editor/browser/editorBrowser';
|
||||
@@ -47,7 +46,7 @@ export function impactsEditorPartOptions(event: IConfigurationChangeEvent): bool
|
||||
}
|
||||
|
||||
export function getEditorPartOptions(config: IWorkbenchEditorConfiguration): IEditorPartOptions {
|
||||
const options: IEditorPartOptions = assign(Object.create(null), DEFAULT_EDITOR_PART_OPTIONS);
|
||||
const options = { ...DEFAULT_EDITOR_PART_OPTIONS };
|
||||
|
||||
if (!config || !config.workbench) {
|
||||
return options;
|
||||
@@ -58,7 +57,7 @@ export function getEditorPartOptions(config: IWorkbenchEditorConfiguration): IEd
|
||||
}
|
||||
|
||||
if (config.workbench.editor) {
|
||||
assign(options, config.workbench.editor);
|
||||
Object.assign(options, config.workbench.editor);
|
||||
}
|
||||
|
||||
return options;
|
||||
|
||||
@@ -19,7 +19,6 @@ import { IEditorGroupsAccessor, IEditorGroupView, getEditorPartOptions, impactsE
|
||||
import { EditorGroupView } from 'vs/workbench/browser/parts/editor/editorGroupView';
|
||||
import { IConfigurationService, IConfigurationChangeEvent } from 'vs/platform/configuration/common/configuration';
|
||||
import { IDisposable, dispose, toDisposable, DisposableStore } from 'vs/base/common/lifecycle';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
|
||||
import { ISerializedEditorGroup, isSerializedEditorGroup } from 'vs/workbench/common/editor/editorGroup';
|
||||
import { EditorDropTarget, EditorDropTargetDelegate } from 'vs/workbench/browser/parts/editor/editorDropTarget';
|
||||
@@ -175,7 +174,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
|
||||
const newPartOptions = getEditorPartOptions(this.configurationService.getValue<IWorkbenchEditorConfiguration>());
|
||||
|
||||
this.enforcedPartOptions.forEach(enforcedPartOptions => {
|
||||
assign(newPartOptions, enforcedPartOptions); // check for overrides
|
||||
Object.assign(newPartOptions, enforcedPartOptions); // check for overrides
|
||||
});
|
||||
|
||||
this._partOptions = newPartOptions;
|
||||
|
||||
@@ -99,7 +99,6 @@ export class NoTabsTitleControl extends TitleControl {
|
||||
}
|
||||
|
||||
private onTitleClick(e: MouseEvent | GestureEvent): void {
|
||||
|
||||
if (e instanceof MouseEvent) {
|
||||
// Close editor on middle mouse click
|
||||
if (e.button === 1 /* Middle Button */) {
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
import { localize } from 'vs/nls';
|
||||
import { URI } from 'vs/base/common/uri';
|
||||
import { distinct, deepClone, assign } from 'vs/base/common/objects';
|
||||
import { distinct, deepClone } from 'vs/base/common/objects';
|
||||
import { Event } from 'vs/base/common/event';
|
||||
import { isObject, assertIsDefined, withNullAsUndefined, isFunction } from 'vs/base/common/types';
|
||||
import { Dimension } from 'vs/base/browser/dom';
|
||||
@@ -93,7 +93,7 @@ export abstract class BaseTextEditor extends BaseEditor implements ITextEditorPa
|
||||
|
||||
// Specific editor options always overwrite user configuration
|
||||
const editorConfiguration: IEditorOptions = isObject(configuration.editor) ? deepClone(configuration.editor) : Object.create(null);
|
||||
assign(editorConfiguration, this.getConfigurationOverrides());
|
||||
Object.assign(editorConfiguration, this.getConfigurationOverrides());
|
||||
|
||||
// ARIA label
|
||||
editorConfiguration.ariaLabel = this.computeAriaLabel();
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
*--------------------------------------------------------------------------------------------*/
|
||||
|
||||
import 'vs/css!./media/notificationsList';
|
||||
import { localize } from 'vs/nls';
|
||||
import { addClass, isAncestor, trackFocus } from 'vs/base/browser/dom';
|
||||
import { WorkbenchList } from 'vs/platform/list/browser/listService';
|
||||
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
|
||||
@@ -87,6 +88,15 @@ export class NotificationsList extends Themable {
|
||||
horizontalScrolling: false,
|
||||
overrideStyles: {
|
||||
listBackground: NOTIFICATIONS_BACKGROUND
|
||||
},
|
||||
accessibilityProvider: {
|
||||
getAriaLabel(element: INotificationViewItem): string {
|
||||
if (!element.source) {
|
||||
return localize('notificationAriaLabel', "{0}, notification", element.message.raw);
|
||||
}
|
||||
|
||||
return localize('notificationWithSourceAriaLabel', "{0}, source: {1}, notification", element.message.raw, element.source);
|
||||
}
|
||||
}
|
||||
}
|
||||
));
|
||||
|
||||
@@ -85,12 +85,12 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
||||
private panelFocusContextKey: IContextKey<boolean>;
|
||||
|
||||
private compositeBar: CompositeBar;
|
||||
private compositeActions: Map<string, { activityAction: PanelActivityAction, pinnedAction: ToggleCompositePinnedAction; }> = new Map();
|
||||
private readonly compositeActions = new Map<string, { activityAction: PanelActivityAction, pinnedAction: ToggleCompositePinnedAction; }>();
|
||||
|
||||
private readonly panelDisposables: Map<string, IDisposable> = new Map<string, IDisposable>();
|
||||
|
||||
private blockOpeningPanel = false;
|
||||
private _contentDimension: Dimension | undefined;
|
||||
private contentDimension: Dimension | undefined;
|
||||
|
||||
private panelRegistry: PanelRegistry;
|
||||
|
||||
@@ -320,7 +320,7 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
||||
const viewContainer = this.getViewContainer(panelDescriptor.id);
|
||||
if (viewContainer?.hideIfEmpty) {
|
||||
const viewDescriptors = this.viewDescriptorService.getViewDescriptors(viewContainer);
|
||||
if (viewDescriptors.activeViewDescriptors.length === 0) {
|
||||
if (viewDescriptors.activeViewDescriptors.length === 0 && this.compositeBar.getPinnedComposites().length > 1) {
|
||||
this.hideComposite(panelDescriptor.id); // Update the composite bar by hiding
|
||||
}
|
||||
}
|
||||
@@ -473,21 +473,21 @@ export class PanelPart extends CompositePart<Panel> implements IPanelService {
|
||||
}
|
||||
|
||||
if (this.layoutService.getPanelPosition() === Position.RIGHT) {
|
||||
this._contentDimension = new Dimension(width - 1, height); // Take into account the 1px border when layouting
|
||||
this.contentDimension = new Dimension(width - 1, height); // Take into account the 1px border when layouting
|
||||
} else {
|
||||
this._contentDimension = new Dimension(width, height);
|
||||
this.contentDimension = new Dimension(width, height);
|
||||
}
|
||||
|
||||
// Layout contents
|
||||
super.layout(this._contentDimension.width, this._contentDimension.height);
|
||||
super.layout(this.contentDimension.width, this.contentDimension.height);
|
||||
|
||||
// Layout composite bar
|
||||
this.layoutCompositeBar();
|
||||
}
|
||||
|
||||
private layoutCompositeBar(): void {
|
||||
if (this._contentDimension && this.dimension) {
|
||||
let availableWidth = this._contentDimension.width - 40; // take padding into account
|
||||
if (this.contentDimension && this.dimension) {
|
||||
let availableWidth = this.contentDimension.width - 40; // take padding into account
|
||||
if (this.toolBar) {
|
||||
availableWidth = Math.max(PanelPart.MIN_COMPOSITE_BAR_WIDTH, availableWidth - this.getToolbarWidth()); // adjust height for global actions showing
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@ import { SIDE_BAR_TITLE_FOREGROUND, SIDE_BAR_BACKGROUND, SIDE_BAR_FOREGROUND, SI
|
||||
import { INotificationService } from 'vs/platform/notification/common/notification';
|
||||
import { EventType, addDisposableListener, trackFocus } from 'vs/base/browser/dom';
|
||||
import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
|
||||
import { AnchorAlignment } from 'vs/base/browser/ui/contextview/contextview';
|
||||
import { IExtensionService } from 'vs/workbench/services/extensions/common/extensions';
|
||||
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
|
||||
@@ -77,9 +77,11 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
|
||||
get onDidViewletOpen(): Event<IViewlet> { return Event.map(this.onDidCompositeOpen.event, compositeEvent => <IViewlet>compositeEvent.composite); }
|
||||
get onDidViewletClose(): Event<IViewlet> { return this.onDidCompositeClose.event as Event<IViewlet>; }
|
||||
|
||||
private viewletRegistry: ViewletRegistry;
|
||||
private sideBarFocusContextKey: IContextKey<boolean>;
|
||||
private activeViewletContextKey: IContextKey<string>;
|
||||
private readonly viewletRegistry = Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets);
|
||||
|
||||
private readonly sideBarFocusContextKey = SidebarFocusContext.bindTo(this.contextKeyService);
|
||||
private readonly activeViewletContextKey = ActiveViewletContext.bindTo(this.contextKeyService);
|
||||
|
||||
private blockOpeningViewlet = false;
|
||||
|
||||
constructor(
|
||||
@@ -91,7 +93,7 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
|
||||
@IKeybindingService keybindingService: IKeybindingService,
|
||||
@IInstantiationService instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IContextKeyService contextKeyService: IContextKeyService,
|
||||
@IContextKeyService private readonly contextKeyService: IContextKeyService,
|
||||
@IExtensionService private readonly extensionService: IExtensionService
|
||||
) {
|
||||
super(
|
||||
@@ -113,11 +115,6 @@ export class SidebarPart extends CompositePart<Viewlet> implements IViewletServi
|
||||
{ hasTitle: true, borderWidth: () => (this.getColor(SIDE_BAR_BORDER) || this.getColor(contrastBorder)) ? 1 : 0 }
|
||||
);
|
||||
|
||||
this.viewletRegistry = Registry.as<ViewletRegistry>(ViewletExtensions.Viewlets);
|
||||
|
||||
this.sideBarFocusContextKey = SidebarFocusContext.bindTo(contextKeyService);
|
||||
this.activeViewletContextKey = ActiveViewletContext.bindTo(contextKeyService);
|
||||
|
||||
this.registerListeners();
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ import { StandardMouseEvent } from 'vs/base/browser/mouseEvent';
|
||||
import { ToggleStatusbarVisibilityAction } from 'vs/workbench/browser/actions/layoutActions';
|
||||
import { Separator } from 'vs/base/browser/ui/actionbar/actionbar';
|
||||
import { assertIsDefined } from 'vs/base/common/types';
|
||||
import { Emitter, Event } from 'vs/base/common/event';
|
||||
import { Emitter } from 'vs/base/common/event';
|
||||
import { Command } from 'vs/editor/common/modes';
|
||||
import { IStorageKeysSyncRegistryService } from 'vs/platform/userDataSync/common/storageKeys';
|
||||
|
||||
@@ -65,7 +65,7 @@ class StatusbarViewModel extends Disposable {
|
||||
private readonly _onDidChangeEntryVisibility = this._register(new Emitter<{ id: string, visible: boolean }>());
|
||||
readonly onDidChangeEntryVisibility = this._onDidChangeEntryVisibility.event;
|
||||
|
||||
constructor(private storageService: IStorageService) {
|
||||
constructor(private readonly storageService: IStorageService) {
|
||||
super();
|
||||
|
||||
this.restoreState();
|
||||
@@ -341,18 +341,18 @@ export class StatusbarPart extends Part implements IStatusbarService {
|
||||
|
||||
private pendingEntries: IPendingStatusbarEntry[] = [];
|
||||
|
||||
private readonly viewModel: StatusbarViewModel;
|
||||
private readonly viewModel = this._register(new StatusbarViewModel(this.storageService));
|
||||
|
||||
readonly onDidChangeEntryVisibility = this.viewModel.onDidChangeEntryVisibility;
|
||||
|
||||
private leftItemsContainer: HTMLElement | undefined;
|
||||
private rightItemsContainer: HTMLElement | undefined;
|
||||
|
||||
readonly onDidChangeEntryVisibility: Event<{ id: string, visible: boolean }>;
|
||||
|
||||
constructor(
|
||||
@IInstantiationService private readonly instantiationService: IInstantiationService,
|
||||
@IThemeService themeService: IThemeService,
|
||||
@IWorkspaceContextService private readonly contextService: IWorkspaceContextService,
|
||||
@IStorageService storageService: IStorageService,
|
||||
@IStorageService private readonly storageService: IStorageService,
|
||||
@IWorkbenchLayoutService layoutService: IWorkbenchLayoutService,
|
||||
@IContextMenuService private contextMenuService: IContextMenuService,
|
||||
@IStorageKeysSyncRegistryService storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
|
||||
@@ -360,8 +360,6 @@ export class StatusbarPart extends Part implements IStatusbarService {
|
||||
super(Parts.STATUSBAR_PART, { hasTitle: false }, themeService, storageService, layoutService);
|
||||
|
||||
storageKeysSyncRegistryService.registerStorageKey({ key: StatusbarViewModel.HIDDEN_ENTRIES_KEY, version: 1 });
|
||||
this.viewModel = this._register(new StatusbarViewModel(storageService));
|
||||
this.onDidChangeEntryVisibility = this.viewModel.onDidChangeEntryVisibility;
|
||||
|
||||
this.registerListeners();
|
||||
}
|
||||
@@ -639,6 +637,7 @@ export class StatusbarPart extends Part implements IStatusbarService {
|
||||
}
|
||||
|
||||
class StatusbarEntryItem extends Disposable {
|
||||
|
||||
private entry!: IStatusbarEntry;
|
||||
|
||||
private labelContainer!: HTMLElement;
|
||||
|
||||
@@ -29,7 +29,6 @@ import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/
|
||||
import { MenuBar, IMenuBarOptions } from 'vs/base/browser/ui/menu/menubar';
|
||||
import { SubmenuAction, Direction } from 'vs/base/browser/ui/menu/menu';
|
||||
import { attachMenuStyler } from 'vs/platform/theme/common/styler';
|
||||
import { assign } from 'vs/base/common/objects';
|
||||
import { mnemonicMenuLabel, unmnemonicLabel } from 'vs/base/common/labels';
|
||||
import { IAccessibilityService } from 'vs/platform/accessibility/common/accessibility';
|
||||
import { IWorkbenchLayoutService } from 'vs/workbench/services/layout/browser/layoutService';
|
||||
@@ -232,7 +231,7 @@ export abstract class MenubarControl extends Disposable {
|
||||
});
|
||||
});
|
||||
|
||||
return assign(ret, { uri: uri });
|
||||
return Object.assign(ret, { uri });
|
||||
}
|
||||
|
||||
private notifyUserOfCustomMenubarAccessibility(): void {
|
||||
|
||||
@@ -47,7 +47,6 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||
private static readonly NLS_USER_IS_ADMIN = isWindows ? nls.localize('userIsAdmin', "[Administrator]") : nls.localize('userIsSudo', "[Superuser]");
|
||||
private static readonly NLS_EXTENSION_HOST = nls.localize('devExtensionWindowTitlePrefix', "[Extension Development Host]");
|
||||
private static readonly TITLE_DIRTY = '\u25cf ';
|
||||
private static readonly TITLE_SEPARATOR = isMacintosh ? ' — ' : ' - '; // macOS uses special - separator
|
||||
|
||||
//#region IView
|
||||
|
||||
@@ -126,7 +125,7 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||
}
|
||||
|
||||
protected onConfigurationChanged(event: IConfigurationChangeEvent): void {
|
||||
if (event.affectsConfiguration('window.title')) {
|
||||
if (event.affectsConfiguration('window.title') || event.affectsConfiguration('window.titleSeparator')) {
|
||||
this.titleUpdater.schedule();
|
||||
}
|
||||
|
||||
@@ -204,6 +203,9 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||
title = `${TitlebarPart.NLS_EXTENSION_HOST} - ${title || this.productService.nameLong}`;
|
||||
}
|
||||
|
||||
// Replace non-space whitespace
|
||||
title = title.replace(/[^\S ]/g, ' ');
|
||||
|
||||
return title;
|
||||
}
|
||||
|
||||
@@ -283,7 +285,7 @@ export class TitlebarPart extends Part implements ITitleService {
|
||||
const dirty = editor?.isDirty() && !editor.isSaving() ? TitlebarPart.TITLE_DIRTY : '';
|
||||
const appName = this.productService.nameLong;
|
||||
const remoteName = this.labelService.getHostLabel(REMOTE_HOST_SCHEME, this.environmentService.configuration.remoteAuthority);
|
||||
const separator = TitlebarPart.TITLE_SEPARATOR;
|
||||
const separator = this.configurationService.getValue<string>('window.titleSeparator');
|
||||
const titleTemplate = this.configurationService.getValue<string>('window.title');
|
||||
|
||||
return template(titleTemplate, {
|
||||
|
||||
@@ -74,8 +74,11 @@
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.monaco-workbench .pane > .pane-body .welcome-view-content > *:last-child {
|
||||
margin-bottom: 1em;
|
||||
.monaco-workbench .pane > .pane-body .welcome-view-content > * {
|
||||
margin-block-start: 1em;
|
||||
margin-block-end: 1em;
|
||||
margin-inline-start: 0px;
|
||||
margin-inline-end: 0px;
|
||||
}
|
||||
|
||||
.customview-tree .monaco-list-row .monaco-tl-contents.align-icon-with-twisty::before {
|
||||
|
||||
@@ -1264,7 +1264,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
return;
|
||||
}
|
||||
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.options.orientation ?? Orientation.VERTICAL, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, this.themeService);
|
||||
}
|
||||
|
||||
if (dropData.type === 'composite' && dropData.id !== this.viewContainer.id) {
|
||||
@@ -1274,7 +1274,7 @@ export class ViewPaneContainer extends Component implements IViewPaneContainer {
|
||||
const viewsToMove = this.viewDescriptorService.getViewDescriptors(container).allViewDescriptors;
|
||||
|
||||
if (viewsToMove.length === 1 && viewsToMove[0].canMoveView) {
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.options.orientation ?? Orientation.VERTICAL, this.themeService);
|
||||
overlay = new ViewPaneDropOverlay(pane.dropTargetElement, this.orientation ?? Orientation.VERTICAL, this.themeService);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ class BrowserMain extends Disposable {
|
||||
serviceCollection.set(IRemoteAuthorityResolverService, remoteAuthorityResolverService);
|
||||
|
||||
// Signing
|
||||
const signService = new SignService(environmentService.configuration.connectionToken);
|
||||
const signService = new SignService(environmentService.options.connectionToken || this.getCookieValue('vscode-tkn'));
|
||||
serviceCollection.set(ISignService, signService);
|
||||
|
||||
// Remote Agent
|
||||
@@ -327,6 +327,12 @@ class BrowserMain extends Disposable {
|
||||
|
||||
return undefined;
|
||||
}
|
||||
|
||||
private getCookieValue(name: string): string | undefined {
|
||||
const match = document.cookie.match('(^|[^;]+)\\s*' + name + '\\s*=\\s*([^;]+)'); // See https://stackoverflow.com/a/25490531
|
||||
|
||||
return match ? match.pop() : undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export function main(domElement: HTMLElement, options: IWorkbenchConstructionOptions): Promise<void> {
|
||||
|
||||
@@ -98,7 +98,7 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
|
||||
},
|
||||
'workbench.editor.showIcons': {
|
||||
'type': 'boolean',
|
||||
'description': nls.localize('showIcons', "Controls whether opened editors should show with an icon or not. This requires an icon theme to be enabled as well."),
|
||||
'description': nls.localize('showIcons', "Controls whether opened editors should show with an icon or not. This requires an file icon theme to be enabled as well."),
|
||||
'default': true
|
||||
},
|
||||
'workbench.editor.enablePreview': {
|
||||
@@ -301,6 +301,11 @@ import { workbenchConfigurationNodeBase } from 'vs/workbench/common/configuratio
|
||||
})(),
|
||||
'markdownDescription': windowTitleDescription
|
||||
},
|
||||
'window.titleSeparator': {
|
||||
'type': 'string',
|
||||
'default': isMacintosh ? ' — ' : ' - ',
|
||||
'markdownDescription': nls.localize("window.titleSeparator", "Separator used by `window.title`.")
|
||||
},
|
||||
'window.menuBarVisibility': {
|
||||
'type': 'string',
|
||||
'enum': ['default', 'visible', 'toggle', 'hidden', 'compact'],
|
||||
|
||||
Reference in New Issue
Block a user