-
Notifications
You must be signed in to change notification settings - Fork 36k
chat - track and apply defaultVisibilityMarker
#276252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -3050,7 +3050,18 @@ class LayoutStateModel extends Disposable { | |||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| private loadKeyFromStorage<T extends StorageKeyType>(key: WorkbenchLayoutStateKey<T>): T | undefined { | ||||||||||||||||||||||||||||||
| const value = this.storageService.get(`${LayoutStateModel.STORAGE_PREFIX}${key.name}`, key.scope); | ||||||||||||||||||||||||||||||
| let value = this.storageService.get(`${LayoutStateModel.STORAGE_PREFIX}${key.name}`, key.scope); | ||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||
| // TODO@bpasero remove this code in 1y when "pre-AI" workspaces have migrated | ||||||||||||||||||||||||||||||
| // Refs: https://github.com/microsoft/vscode-internalbacklog/issues/6168 | ||||||||||||||||||||||||||||||
| if ( | ||||||||||||||||||||||||||||||
| key.scope === StorageScope.WORKSPACE && | ||||||||||||||||||||||||||||||
| key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name && | ||||||||||||||||||||||||||||||
| typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' && | ||||||||||||||||||||||||||||||
| this.storageService.get(this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker'), StorageScope.WORKSPACE) === undefined | ||||||||||||||||||||||||||||||
| ) { | ||||||||||||||||||||||||||||||
| value = undefined; | ||||||||||||||||||||||||||||||
|
Comment on lines
+3059
to
+3063
|
||||||||||||||||||||||||||||||
| key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name && | |
| typeof this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker') === 'string' && | |
| this.storageService.get(this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker'), StorageScope.WORKSPACE) === undefined | |
| ) { | |
| value = undefined; | |
| key.name === LayoutStateKeys.AUXILIARYBAR_HIDDEN.name | |
| ) { | |
| const defaultVisibilityMarker = this.configurationService.getValue('workbench.secondarySideBar.defaultVisibilityMarker'); | |
| if ( | |
| typeof defaultVisibilityMarker === 'string' && | |
| this.storageService.get(defaultVisibilityMarker, StorageScope.WORKSPACE) === undefined | |
| ) { | |
| value = undefined; | |
| } |
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -568,6 +568,14 @@ const registry = Registry.as<IConfigurationRegistry>(ConfigurationExtensions.Con | |||||
| localize('workbench.secondarySideBar.defaultVisibility.maximized', "The secondary side bar is visible and maximized by default.") | ||||||
| ] | ||||||
| }, | ||||||
| 'workbench.secondarySideBar.defaultVisibilityMarker': { | ||||||
| type: 'string', | ||||||
|
||||||
| type: 'string', | |
| 'type': 'string', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The magic string
'workbench.secondarySideBar.defaultVisibilityMarker'should be extracted as a constant. Consider adding it to theWorkbenchLayoutSettingsenum (lines 2755-2762) for consistency with other configuration keys used in this class.