Change:
Steps to Reproduce: the Activity Bar Position as Hidden Command: View: Focus Activity Bar Then: ! Activity Bar still takes up screen space, but doesn't display the icons Version: 1.84.0 Commit: Date: 2023-11-01T11:29:04.398Z Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Code/1.84.0 Chrome/114.0.5735.289 Electron/25.9.2 Safari/537.36
Probably depends on
Probably
Not related to
!

Discussion:
container.style.borderColor = borderColor ? borderColor : ''; } <del> show(): void { </del> <ins> show(focus?: boolean): void { </ins> if (!this.content) { return; } <del> if (this.compositeBar.value) { return; } </del> <ins> if (!this.compositeBar.value) { this.compositeBar.value = this.createCompositeBar(); this.compositeBar.value.create(this.content); </ins> <del> this.compositeBar.value = this.createCompositeBar(); this.compositeBar.value.create(this.content); </del> <ins> if (this.dimension) { this.layout(this.dimension.width, this.dimension.height); } } </ins> <del> if (this.dimension) { this.layout(this.dimension.width, this.dimension.height); </del> <ins> if (focus) { this.focus(); </ins> } }

import 'vs/workbench/browser/parts/sidebar/sidebarActions'; import { ActivityBarPosition, IWorkbenchLayoutService, LayoutSettings, Parts, Position as SideBarPosition } from 'vs/workbench/services/layout/browser/layoutService'; import { SidebarFocusContext, ActiveViewletContext } from 'vs/workbench/common/contextkeys'; <del> import { IStorageService } from 'vs/platform/storage/common/storage'; </del> <ins> import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage'; </ins> import { IContextMenuService } from 'vs/platform/contextview/browser/contextView'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';

); this.acitivityBarPart = this._register(instantiationService.createInstance(ActivitybarPart, this)); <ins> this.rememberActivityBarVisiblePosition(); </ins> this._register(configurationService.onDidChangeConfiguration(e => { if (e.affectsConfiguration(LayoutSettings.ACTIVITY_BAR_LOCATION)) { <del> this.updateTitleArea(); const id = this.getActiveComposite()?.getId(); if (id) { this.onTitleAreaUpdate(id!); } this.updateActivityBarVisiblity(); </del> <ins> this.onDidChangeActivityBarLocation(); </ins> } }));

}); } <ins> private onDidChangeActivityBarLocation(): void { this.updateTitleArea(); const id = this.getActiveComposite()?.getId(); if (id) { this.onTitleAreaUpdate(id!); } this.updateActivityBarVisiblity(); this.rememberActivityBarVisiblePosition(); } </ins> override updateStyles(): void { super.updateStyles();

return this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION) !== ActivityBarPosition.HIDDEN; } <ins> private rememberActivityBarVisiblePosition(): void { const activityBarPosition = this.configurationService.getValue<string>(LayoutSettings.ACTIVITY_BAR_LOCATION); if (activityBarPosition !== ActivityBarPosition.HIDDEN) { this.storageService.store(LayoutSettings.ACTIVITY_BAR_LOCATION, activityBarPosition, StorageScope.PROFILE, StorageTarget.USER); } } private getRememberedActivityBarVisiblePosition(): ActivityBarPosition { const activityBarPosition = this.storageService.get(LayoutSettings.ACTIVITY_BAR_LOCATION, StorageScope.PROFILE); switch (activityBarPosition) { case ActivityBarPosition.SIDE: return ActivityBarPosition.SIDE; default: return ActivityBarPosition.TOP; } } </ins> private updateActivityBarVisiblity(): void { if (this.shouldShowActivityBar()) { this.acitivityBarPart.show();

return this.shouldShowCompositeBar() ? super.getVisiblePaneCompositeIds() : this.acitivityBarPart.getVisiblePaneCompositeIds(); } <del> focusActivityBar(): void { </del> <ins> async focusActivityBar(): Promise<void> { if (this.configurationService.getValue(LayoutSettings.ACTIVITY_BAR_LOCATION) === ActivityBarPosition.HIDDEN) { await this.configurationService.updateValue(LayoutSettings.ACTIVITY_BAR_LOCATION, this.getRememberedActivityBarVisiblePosition()); this.onDidChangeActivityBarLocation(); } </ins> if (this.shouldShowCompositeBar()) { this.focusComositeBar(); } else { if (!this.layoutService.isVisible(Parts.ACTIVITYBAR_PART)) { this.layoutService.setPartHidden(false, Parts.ACTIVITYBAR_PART); } <del> this.acitivityBarPart.focus(); </del> <ins> this.acitivityBarPart.show(true); </ins> } }