vscode
vscode copied to clipboard
Preserve workspace UI state when duplicating workspace
Does this issue occur when all extensions are disabled?: Yes/No
- VS Code Version: 1.61.0
- OS Version: windows 7
Steps to Reproduce:
- create a worksapce
- enable or disable some extensions for this workspace
- save workspace as or duplicate workspace to a new workspace
- open the new workspace
- extensions enabled state and disabled state is not synchronized
We have code to migrate over workspace settings when entering a workspace and the current workspace is a folder:
https://github.com/microsoft/vscode/blob/4ed0329e9c5e12e2c7c59697facc96020b0768ab/src/vs/workbench/services/workspaces/browser/abstractWorkspaceEditingService.ts#L332-L335
We also have code to migrate workspace storage:
https://github.com/microsoft/vscode/blob/4ed0329e9c5e12e2c7c59697facc96020b0768ab/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts#L167
Not sure why this would not work then, @sandy081 please chime in.
Hm, I see, we probably do not trigger this when you are in a workspace and you save it or duplicate it. Since the workspace file contains the settings, they are properly duplicated. But the UI state is not. Maybe we can migrate those over too...
Actually I cannot reproduce the issue at least when using "File > Save Workspace As..." and we do migrate settings and state in that case:
https://github.com/microsoft/vscode/blob/4ed0329e9c5e12e2c7c59697facc96020b0768ab/src/vs/workbench/services/workspaces/electron-sandbox/workspaceEditingService.ts#L167
@featherfly can you provide exact steps for the scenario where you save a workspace as?
my vscode version is update to 1.62.0 i try it again save workspace as it work ok duplicate workspace the ui state is not sync (click duplicate workspace , extensions panel in the auto opend vscode is not sync the ui state)
Ok thanks, yeah that is expected the way it is implemented.
@bpasero Can I take a look at this? I've been searching for opportunities to collaborate in Open Source
Please see https://github.com/microsoft/vscode/wiki/How-to-Contribute. Specifically this item is not open for help as I think the implementation would be a bit more complex then I am willing to review.
We closed this issue because we don't plan to address it in the foreseeable future. If you disagree and feel that this issue is crucial: we are happy to listen and to reconsider.
If you wonder what we are up to, please see our roadmap and issue reporting guidelines.
Thanks for your understanding, and happy coding!