@@ -636,7 +636,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
636
636
this . stateModel = new LayoutStateModel ( this . storageService , this . configurationService , this . contextService , coreExperimentationService ) ;
637
637
this . stateModel . load ( {
638
638
mainContainerDimension : this . _mainContainerDimension ,
639
- auxiliaryBarOpensMaximized : ( ) => this . auxiliaryBarOpensMaximized ( ) , // deferred as function because this depends on state
640
639
resetLayout : Boolean ( this . layoutOptions ?. resetLayout )
641
640
} ) ;
642
641
@@ -2126,13 +2125,6 @@ export abstract class Layout extends Disposable implements IWorkbenchLayoutServi
2126
2125
return true ;
2127
2126
}
2128
2127
2129
- private auxiliaryBarOpensMaximized ( ) : boolean {
2130
- const auxiliaryBarOpensMaximized = partOpensMaximizedFromString ( this . configurationService . getValue < string > ( WorkbenchLayoutSettings . AUXILIARY_BAR_OPENS_MAXIMIZED ) ) ;
2131
- const auxiliaryBarLastIsMaximized = this . stateModel . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_WAS_LAST_MAXIMIZED ) ;
2132
-
2133
- return auxiliaryBarOpensMaximized === PartOpensMaximizedOptions . ALWAYS || ( auxiliaryBarOpensMaximized === PartOpensMaximizedOptions . REMEMBER_LAST && auxiliaryBarLastIsMaximized ) ;
2134
- }
2135
-
2136
2128
isPanelMaximized ( ) : boolean {
2137
2129
return (
2138
2130
this . getPanelAlignment ( ) === 'center' || // the workbench grid currently prevents us from supporting panel
@@ -2785,7 +2777,6 @@ enum WorkbenchLayoutSettings {
2785
2777
ACTIVITY_BAR_VISIBLE = 'workbench.activityBar.visible' ,
2786
2778
PANEL_POSITION = 'workbench.panel.defaultLocation' ,
2787
2779
PANEL_OPENS_MAXIMIZED = 'workbench.panel.opensMaximized' ,
2788
- AUXILIARY_BAR_OPENS_MAXIMIZED = 'workbench.secondarySideBar.opensMaximized' ,
2789
2780
ZEN_MODE_CONFIG = 'zenMode' ,
2790
2781
EDITOR_CENTERED_LAYOUT_AUTO_RESIZE = 'workbench.editor.centeredLayoutAutoResize' ,
2791
2782
}
@@ -2797,7 +2788,6 @@ enum LegacyWorkbenchLayoutSettings {
2797
2788
2798
2789
interface ILayoutStateLoadConfiguration {
2799
2790
readonly mainContainerDimension : IDimension ;
2800
- readonly auxiliaryBarOpensMaximized : ( ) => boolean ;
2801
2791
readonly resetLayout : boolean ;
2802
2792
}
2803
2793
@@ -2942,7 +2932,20 @@ class LayoutStateModel extends Disposable {
2942
2932
)
2943
2933
) {
2944
2934
if ( experiment . value . experimentGroup === StartupExperimentGroup . MaximizedChat ) {
2945
- this . applyAuxiliaryBarMaximizedOverride ( ) ;
2935
+ this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_VISIBILITY , {
2936
+ sideBarVisible : ! this . getRuntimeValue ( LayoutStateKeys . SIDEBAR_HIDDEN ) ,
2937
+ panelVisible : ! this . getRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN ) ,
2938
+ editorVisible : ! this . getRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN ) ,
2939
+ auxiliaryBarVisible : ! this . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN )
2940
+ } ) ;
2941
+
2942
+ this . setRuntimeValue ( LayoutStateKeys . SIDEBAR_HIDDEN , true ) ;
2943
+ this . setRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN , true ) ;
2944
+ this . setRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN , true ) ;
2945
+ this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN , false ) ;
2946
+
2947
+ this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_SIZE , this . getInitializationValue ( LayoutStateKeys . AUXILIARYBAR_SIZE ) ) ;
2948
+ this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_WAS_LAST_MAXIMIZED , true ) ;
2946
2949
} else if (
2947
2950
experiment . value . experimentGroup === StartupExperimentGroup . SplitEmptyEditorChat ||
2948
2951
experiment . value . experimentGroup === StartupExperimentGroup . SplitWelcomeChat
@@ -2953,27 +2956,6 @@ class LayoutStateModel extends Disposable {
2953
2956
}
2954
2957
}
2955
2958
2956
- // Without experimental treatment
2957
- else {
2958
-
2959
- // Override runtime values for auxiliary bar maximized state
2960
- const wasAuxiliaryBarMaximized = this . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_WAS_LAST_MAXIMIZED ) ;
2961
- const auxiliaryBarOpensMaximized = configuration . auxiliaryBarOpensMaximized ( ) ;
2962
- const state = this . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_VISIBILITY ) ;
2963
- if ( wasAuxiliaryBarMaximized && ! auxiliaryBarOpensMaximized ) {
2964
- this . setRuntimeValue ( LayoutStateKeys . SIDEBAR_HIDDEN , ! state . sideBarVisible ) ;
2965
- this . setRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN , ! state . panelVisible ) ;
2966
- this . setRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN , ! state . editorVisible ) ;
2967
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN , ! state . auxiliaryBarVisible ) ;
2968
-
2969
- this . setInitializationValue ( LayoutStateKeys . AUXILIARYBAR_SIZE , this . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_SIZE ) ) ;
2970
-
2971
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_WAS_LAST_MAXIMIZED , false ) ;
2972
- } else if ( ! wasAuxiliaryBarMaximized && auxiliaryBarOpensMaximized ) {
2973
- this . applyAuxiliaryBarMaximizedOverride ( ) ;
2974
- }
2975
- }
2976
-
2977
2959
// Both editor and panel should not be hidden on startup unless auxiliary bar is maximized
2978
2960
if (
2979
2961
this . getRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN ) &&
@@ -2984,23 +2966,6 @@ class LayoutStateModel extends Disposable {
2984
2966
}
2985
2967
}
2986
2968
2987
- private applyAuxiliaryBarMaximizedOverride ( ) : void {
2988
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_VISIBILITY , {
2989
- sideBarVisible : ! this . getRuntimeValue ( LayoutStateKeys . SIDEBAR_HIDDEN ) ,
2990
- panelVisible : ! this . getRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN ) ,
2991
- editorVisible : ! this . getRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN ) ,
2992
- auxiliaryBarVisible : ! this . getRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN )
2993
- } ) ;
2994
-
2995
- this . setRuntimeValue ( LayoutStateKeys . SIDEBAR_HIDDEN , true ) ;
2996
- this . setRuntimeValue ( LayoutStateKeys . PANEL_HIDDEN , true ) ;
2997
- this . setRuntimeValue ( LayoutStateKeys . EDITOR_HIDDEN , true ) ;
2998
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_HIDDEN , false ) ;
2999
-
3000
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_LAST_NON_MAXIMIZED_SIZE , this . getInitializationValue ( LayoutStateKeys . AUXILIARYBAR_SIZE ) ) ;
3001
- this . setRuntimeValue ( LayoutStateKeys . AUXILIARYBAR_WAS_LAST_MAXIMIZED , true ) ;
3002
- }
3003
-
3004
2969
save ( workspace : boolean , global : boolean ) : void {
3005
2970
let key : keyof typeof LayoutStateKeys ;
3006
2971
0 commit comments