mirror of https://github.com/microsoft/vscode.git
This commit is contained in:
parent
181bf86a79
commit
28640a7620
|
@ -343,7 +343,7 @@ export class ThemeMainService extends Disposable implements IThemeMainService {
|
|||
} else if (auxiliaryBarVisible === false) {
|
||||
auxiliaryBarWidth = 0;
|
||||
} else {
|
||||
if (auxiliaryBarDefaultVisibility === 'visible' || auxiliaryBarDefaultVisibility === 'visibleInWorkspace' || auxiliaryBarDefaultVisibility === 'visibleInNewWorkspace') {
|
||||
if (auxiliaryBarDefaultVisibility === 'visible' || auxiliaryBarDefaultVisibility === 'visibleInWorkspace') {
|
||||
auxiliaryBarWidth = override.layoutInfo.auxiliaryBarWidth || partSplash.layoutInfo.auxiliaryBarWidth || ThemeMainService.DEFAULT_BAR_WIDTH;
|
||||
} else {
|
||||
auxiliaryBarWidth = 0;
|
||||
|
|
|
@ -633,7 +633,7 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
|
|||
private initLayoutState(lifecycleService: ILifecycleService, fileService: IFileService, coreExperimentationService: ICoreExperimentationService): void {
|
||||
this._mainContainerDimension = getClientArea(this.parent, DEFAULT_WINDOW_DIMENSIONS); // running with fallback to ensure no error is thrown (https://github.com/microsoft/vscode/issues/240242)
|
||||
|
||||
this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService, coreExperimentationService);
|
||||
this.stateModel = new LayoutStateModel(this.storageService, this.configurationService, this.contextService, coreExperimentationService, this.environmentService);
|
||||
this.stateModel.load({
|
||||
mainContainerDimension: this._mainContainerDimension,
|
||||
resetLayout: Boolean(this.layoutOptions?.resetLayout)
|
||||
|
@ -2804,7 +2804,8 @@ class LayoutStateModel extends Disposable {
|
|||
private readonly storageService: IStorageService,
|
||||
private readonly configurationService: IConfigurationService,
|
||||
private readonly contextService: IWorkspaceContextService,
|
||||
private readonly coreExperimentationService: ICoreExperimentationService
|
||||
private readonly coreExperimentationService: ICoreExperimentationService,
|
||||
private readonly environmentService: IBrowserWorkbenchEnvironmentService
|
||||
) {
|
||||
super();
|
||||
|
||||
|
@ -2867,13 +2868,16 @@ class LayoutStateModel extends Disposable {
|
|||
LayoutStateKeys.SIDEBAR_HIDDEN.defaultValue = workbenchState === WorkbenchState.EMPTY;
|
||||
LayoutStateKeys.AUXILIARYBAR_SIZE.defaultValue = Math.min(300, mainContainerDimension.width / 4);
|
||||
LayoutStateKeys.AUXILIARYBAR_HIDDEN.defaultValue = (() => {
|
||||
const configuration = this.configurationService.inspect(WorkbenchLayoutSettings.AUXILIARYBAR_DEFAULT_VISIBILITY);
|
||||
if (configuration.defaultValue !== 'hidden' && isWeb && !this.environmentService.remoteAuthority) {
|
||||
return true; // TODO@bpasero revisit this when Chat is available in serverless web
|
||||
}
|
||||
|
||||
switch (this.configurationService.getValue(WorkbenchLayoutSettings.AUXILIARYBAR_DEFAULT_VISIBILITY)) {
|
||||
case 'visible':
|
||||
return false;
|
||||
case 'visibleInWorkspace':
|
||||
return workbenchState === WorkbenchState.EMPTY;
|
||||
case 'visibleInNewWorkspace':
|
||||
return workbenchState === WorkbenchState.EMPTY || !this.storageService.isNew(StorageScope.WORKSPACE);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -536,14 +536,13 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con
|
|||
},
|
||||
'workbench.secondarySideBar.defaultVisibility': {
|
||||
'type': 'string',
|
||||
'enum': ['hidden', 'visibleInWorkspace', 'visibleInNewWorkspace', 'visible'],
|
||||
'enum': ['hidden', 'visibleInWorkspace', 'visible'],
|
||||
'default': 'hidden',
|
||||
'tags': ['onExp'],
|
||||
'description': localize('secondarySideBarDefaultVisibility', "Controls the default visibility of the secondary side bar in workspaces or empty windows opened for the first time."),
|
||||
'enumDescriptions': [
|
||||
localize('workbench.secondarySideBar.defaultVisibility.hidden', "The secondary side bar is hidden by default."),
|
||||
localize('workbench.secondarySideBar.defaultVisibility.visibleInWorkspace', "The secondary side bar is visible by default if a workspace is opened."),
|
||||
localize('workbench.secondarySideBar.defaultVisibility.visibleInNewWorkspace', "The secondary side bar is visible by default if a new workspace is opened."),
|
||||
localize('workbench.secondarySideBar.defaultVisibility.visible', "The secondary side bar is visible by default.")
|
||||
]
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue