Skip to content
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

Centered layout should be stored globally not per workspace #71361

Closed
yajo opened this issue Mar 28, 2019 · 10 comments
Closed

Centered layout should be stored globally not per workspace #71361

yajo opened this issue Mar 28, 2019 · 10 comments
Assignees
Labels
feature-request Request for new features or functionality layout General VS Code workbench layout issues *out-of-scope Posted issue is not in scope of VS Code
Milestone

Comments

@yajo
Copy link

yajo commented Mar 28, 2019

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. 🙄 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!

@isidorn
Copy link
Contributor

isidorn commented Mar 28, 2019

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.

@isidorn isidorn changed the title Centered layout should not depend on project Centered layout should be stored globally not per workspace Mar 28, 2019
@isidorn isidorn added feature-request Request for new features or functionality layout General VS Code workbench layout issues labels Mar 28, 2019
@isidorn isidorn added this to the Backlog milestone Mar 28, 2019
@caseykulm
Copy link

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.

@yajo
Copy link
Author

yajo commented May 13, 2019

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. 🙏 My neck will hurt less 😢

@isidorn
Copy link
Contributor

isidorn commented May 14, 2019

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.

@yajo
Copy link
Author

yajo commented May 15, 2019

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

🎉 Centered layout persistent across projects for free! 😸

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Oct 8, 2019
@vscodebot
Copy link

vscodebot bot commented Oct 8, 2019

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!

@vscodebot vscodebot bot closed this as completed Oct 8, 2019
@yajo
Copy link
Author

yajo commented Oct 18, 2019

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. 🤖

@isidorn
Copy link
Contributor

isidorn commented Oct 18, 2019

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

@isidorn isidorn reopened this Oct 18, 2019
@isidorn isidorn removed the *out-of-scope Posted issue is not in scope of VS Code label Oct 18, 2019
@akbyrd
Copy link
Contributor

akbyrd commented Apr 10, 2020

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.

@isidorn isidorn added the *out-of-scope Posted issue is not in scope of VS Code label Nov 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality layout General VS Code workbench layout issues *out-of-scope Posted issue is not in scope of VS Code
Projects
None yet
Development

No branches or pull requests

5 participants
@akbyrd @yajo @caseykulm @isidorn and others