Vscode: Centered layout should be stored globally not per workspace

Created on 28 Mar 2019  路  10Comments  路  Source: microsoft/vscode

I tend to switch a lot between workspaces (File: Open Recent). I also tend to switch a lot between monitors: the small laptop screen, and a separate ultrawide one. In the ultrawide monitor it feels much more comfortable to work in centered layout, while in the laptop monitor it's the contrary.

If I toggle the centered layout (View: Toggle Centered Layout) in a workspace, then that setting becomes attached to the workspace, meaning that:

  • Switching to another workspace may have that setting disabled.
  • Switching back to this workspace will have it enabled, no matter if I switched it otherwise in another workspace.

I cannot be all the time thinking about this setting when I switch the workspace, so I end up not using the feature at all, which is a shame because the neck ends up hurting in the ultrawide monitor.

IMHO this situation doesn't make sense. :roll_eyes: The centered layout is a view setting, which one can change depending on the physical environment. It's like the theme: in the day, I use the light theme; in the night I use the dark one; but it doesn't make sense to have a different theme per workspace!

So, what I'm asking for is that the setting persists until I toggle it back again.

Thanks!

*out-of-scope feature-request layout

Most helpful comment

Please make this a setting in the user's json file rather than hidden session state. If it's a setting then it can be either global or per-workspace based on the users preference. This solves the concerns I've seen in this thread.

All 10 comments

Bascially you want it to be stored globally.
However some people want that it is stored per workspace as it is now. Their resoning being one workspace they open at work on a large montior, and other workspaces they open at home on small montiros.

I understand both view points, however I will not change this now and am keeping this open as a feature request so we see if more people agree with you.

I definitely prefer centered layout regardless of the monitor size I am on. If I have centered on both large/small monitor I'm always looking at the middle of my screen so it's consistent. I don't quite understand wanting it stored per workspace since centered layout on small screens seems desirable. That said I would be happy if global was simply something I could opt into.

However some people want that it is stored per workspace as it is now. Their resoning being one workspace they open at work on a large montior, and other workspaces they open at home on small montiros.

For these people, the only problem would be to hit a key combination when getting home or getting work. It's something that belongs to the workflow of switching monitor: leave laptop here, close it, plug cable, hit keys.

For people like me who work in the same projects across different monitors, it means hitting the key combination once per project/monitor change combination. I work with 2 monitors across more than 100 projects. You can imagine how annoying this becomes. I just want it centered always, or not centered always. I know that in programming a good rule of thumb is to be explicit instead of implicit, and thus it's usually a good practice to specify your project's dependencies explicitly; however, it seems like all of my projects end up relying relies on a healthy neck and a monitor, but these are decoupled dependencies, so having to hardcode them on every project seems like too much.

I think that a good solution would be to change the implementation of what "centered layout" means. Right now, it means: "there should be X% of margin between the end of the file tree and the start of the code view, and the same X% of margin between the end of the code view and the end of the window". This approach is wrong. Look at this effect, when I want to have 2 vscode one next to the other:
Peek 13-05-2019 15-28

So, yes, both of the editors have a centered layout, as stated in its project, but it's an illogical thing.

The right approach would be: "if the code view area is bigger than X pixels, the code view should be X pixels wide, centered in the window".

This way, if the window gets smaller (no matter if you switched monitor, or you just resized the window), that's no problem: it will just use the 100% of its size.

The fact that it's not properly centered in the window (the side of the left tree view moves the viewport slightly) is another problem, but might be fixed "by the way".

Oh, and of course: it shouldn't be related to the project. It is interesting that, i.e., the theme, file tree or schema viewer sizes are also unrelated to the project:
Peek 13-05-2019 15-43

If we happen to start moving view-related settings to projects, then storing these would make sense also, because after all:

  • some projects have files with longer names, so you would like to have a wide file tree
  • some projects have bigger schemas than others
  • the chosen theme is also not saved per project, but some people work on some projects more by the day and on some other projects more by the night, so it would make sense too

... as you noticed it's nonsense. View settings are attached to the physical aspects more than project-specific ones.

So, please, really, fix this. :pray: My neck will hurt less :cry:

Thanks for the feedback. However currently we are not planning to change the centered editor layout.
There might be a bigger rewrite of the workbench layout coming in the future.

Don't worry, I found a workaround! This is how it looks now in my wide screen:

Captura de pantalla de 2019-05-15 09-42-30

:tada: Centered layout persistent across projects for free! :smile_cat:

This issue is being closed to keep the number of issues in our inbox on a manageable level, we are closing issues that are not going to be addressed in the foreseeable future: We look at the number of votes the issue has received and the number of duplicate issues filed. More details here. 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!

Hi dear @vscodebot, I understand why you are doing this.

Yes, I consider this a crucial issue. As you saw in my last comment, I found a workaround to save my neck. However, that doesn't mean the situation is good.

The centered layout feature is awesome, and with this bug it is mostly useless. In fact, my workaround is _not_ using it.

Given the scope of the issue affects users' health, I think it is important. But OK, it's up to you. After 5 months using the workaround I'm used to it and it's already in my routine: change monitor, resize sidebar, keep working, repeat. :robot:

The bot was just following my commands, so I am to blame, not the bot.
Since you seem to be passionate about this issue, I can reopen this one. Even though we do not have immediate plans to tackle this. Thanks

Please make this a setting in the user's json file rather than hidden session state. If it's a setting then it can be either global or per-workspace based on the users preference. This solves the concerns I've seen in this thread.

We closed this issue because we don't plan to address it in the foreseeable future. You can find more detailed information about our decision-making process here. 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!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lukehoban picture lukehoban  路  3Comments

vsccarl picture vsccarl  路  3Comments

NikosEfthias picture NikosEfthias  路  3Comments

omidgolparvar picture omidgolparvar  路  3Comments

VitorLuizC picture VitorLuizC  路  3Comments