microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.58k stars 29.03k forks source link

Option to save panel layouts globally instead of per-workspace. #156160

Open ghost opened 2 years ago

ghost commented 2 years ago

I would like the option to just save the VS Code panel layouts once and never have to re-arrange them again.

I'm getting sick of having to re-arrange the panels every time I open VS Code to a new folder. Machines are meant to perform boring manual tasks, not to give us more of them to do.

There are other issues that asked for this such as #138263, but they're closed due to "lack of interest", which is a bunch of baloney because it's based on a garbage measurement of user interest since you can't even easily find these issues without arcane knowledge of exactly what to search for.

sbatten commented 2 years ago

Can you clarify what you mean by having to move panels for each new folder? What state should be included in this saved state that is not today?

ghost commented 2 years ago

This is how I organize my bottom panel in every workspace:

image

However, whenever i open a VS Code to a new folder, the bottom panel areas are all out of whack with the huge source control (left), tiny search (middle) and collapsed outline (right):

image

So, it's just a little dance that I have to do every time I open a new folder and it just annoyed me for the nth time... but anyway, thanks for the really great free software and your attention! and sorry for complaining :)

vscodenpa commented 2 years ago

Hey @sbatten, this issue might need further attention.

@waynebloss, you can help us out by closing this issue if the problem no longer exists, or adding more information.

sbatten commented 2 years ago

Thanks for the explanation @waynebloss

https://github.com/microsoft/vscode/blob/f55ddeb7dab0df9cca72f45873ab618b6e7470aa/src/vs/workbench/services/views/common/viewContainerModel.ts#L81-L101

@sandy081 I was looking at this and notice we keep some properties in both global and workspace state, but not all. And our behavior is that we tend to allow updates to the workspace state and global state but don't apply across windows until reload. This manifests itself sometimes as a bug where moving a full view container can result in different orders of views in multiple windows. I wonder if we should move more to global. Visibility and resizing shouldn't automatically apply across windows, but I think reordering or should force the view containers to sync up. Also, we should store the most recently used workspace state into the global state so that we have sane default state for new workspaces. Lmk your thoughts

sandy081 commented 2 years ago

We store in workspace state only for those views which are defined to be workspace scoped.

https://github.com/microsoft/vscode/blob/c6fa8b7e03da3071f0b90ca2a1c07844c9eab470/src/vs/workbench/common/views.ts#L290

I am having a debt item to remove workspace specific views - https://github.com/microsoft/vscode/issues/153513 so that we will not store visibility and order in workspace state at all. I think we are currently not updating the order of the views across windows when they are changed in one window. I do not remember if it is intentional or we missed it. IMO we shall not have any workspace specific views and visibility and order shall be updated across windows.

sbatten commented 2 years ago

@sandy081 let me know if you want/need any assistance in picking up the debt work

sandy081 commented 2 years ago

It would be great, if you can pick it up.

Regarding removing workspace specific views, I have to consult with Alex Ross for remote container views - the only ones having this flag.

texastoland commented 1 year ago

This issue is the bane of my existence because I jump in and out of projects often. Is there anyway I can help clean up?

alfiedotwtf commented 6 months ago

Just wondering if there has been any progress on this one. It's one of those little annoyances than breaks peoples' workflows.

robcruz commented 3 months ago

Has this been rolled out?