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

Bring back old Centered Layout behavior #53989

Closed
jrobsonchase opened this issue Jul 10, 2018 · 11 comments
Closed

Bring back old Centered Layout behavior #53989

jrobsonchase opened this issue Jul 10, 2018 · 11 comments
Assignees
Labels
feature-request Request for new features or functionality on-testplan verification-needed Verification of issue is requested verified Verification succeeded workbench-zen Full screen 'Zen' view issues
Milestone

Comments

@jrobsonchase
Copy link

When first introduced, Centered Layout would only be active if there was a single editor (or if there was a horizontal split maybe? I never used that layout, so idk). If, while in the Centered Layout, a "split vertical" command was issued, the centered layout would be disabled until there was only one editor again.

In the most recent release (1.25.0), this behavior was changed such that, rather than disabling the centered layout while there's a vertical split, the editor stays centered with the same dimensions, and the split occurs inside this centered container. There was something in the release notes about how the old behavior was confusing or had unexpected results, but no details on what the actual unexpected behavior was.

I'm having trouble thinking of a situation in which this is ever what you want. For the Centered Layout to be most effective, the width of the editor should be close to the width of the actual text being edited, that way the text is actually centered in your view. When I say "give me another editor next to my current one," I never want two editors that are half the width of the text that I'm editing, but that's how the new centered layout behaves. You'd have to either

  1. Resize the centered container for the new split layout and then resize it again back to the original dimensions once you're done with the split
  2. Manually disable Centered Layout after splitting and manually re-enable it when you're back to one editor or
  3. Keep the width of your centered window large enough to accommodate a split. But then it's not actually centered.

If not a full reversion back to the old behavior, can we at least get a configuration option to re-enable it? Obligatory XKCD

Centered:
2018-07-10-155920_1914x1032_scrot

Split:
2018-07-10-155935_1914x1032_scrot

@vscodebot
Copy link

vscodebot bot commented Jul 10, 2018

@bpasero bpasero added the layout General VS Code workbench layout issues label Jul 11, 2018
@isidorn
Copy link
Contributor

isidorn commented Jul 17, 2018

@jechase thanks for the xkcd, that is one of my favorites.
I would only consider introducing an option if more users ask for this. So for now leaving this open and waiting for feedback.

fyi @joaomoreno

@isidorn isidorn added the feature-request Request for new features or functionality label Jul 17, 2018
@isidorn isidorn added this to the Backlog milestone Jul 17, 2018
@Ky6uk
Copy link

Ky6uk commented Jul 17, 2018

Related to #53694.

I am using only single layout with always enabled and centered zen-mode for a long time. v1.25 just adds some extra gaps around tabs and nothing more for me. Also (according to #53694) the option zenMode.centerLayout has no effect at all, no matter false it or true.

I know Zen-mode isn't in priority for some reasons, but I hope that mode will be changed in near future. And Zen-mode will be really Zen-able, flexible and clean (like in Atom editor, for example).

@FancyBanana
Copy link
Contributor

FancyBanana commented Jul 28, 2018

@isidorn Current centered layout behavior is silly. I have to either resize workspace every time i open a second editor or keep it wide all the time, which defeats the purpose of centered layout.
The core problem is that people (I assume I am not the only one seeing things this way) would like to keep editors' size fixed and expect workspace resize to fit, but current implementation does exactly the opposite.

@zhiayang
Copy link

zhiayang commented Aug 4, 2018

Is there any consideration about this issue? It feels like there's been a major regression and the current response is simply "wontfix" and "by design".

I have enough faith in the team that I honestly don't think such an oversight was by design.

@bpasero bpasero added workbench-zen Full screen 'Zen' view issues and removed layout General VS Code workbench layout issues labels Aug 6, 2018
@isidorn
Copy link
Contributor

isidorn commented Aug 13, 2018

Yes, we will consider bringing back some of the old behavior in the future.
fyi @joaomoreno

@isidorn isidorn modified the milestones: Backlog, On Deck Aug 13, 2018
@uloco
Copy link

uloco commented Sep 19, 2018

IMHO the centered layout option should remember its position respecting open vertical split editors

  • A single window
  • Two splits
  • Tree splits
    etc...

So I would not have to resize my centered layout width every time I change the amount of opened splits.

@isidorn isidorn modified the milestones: On Deck, October 2018 Sep 21, 2018
@isidorn isidorn closed this as completed in eb3582e Oct 4, 2018
@isidorn
Copy link
Contributor

isidorn commented Oct 4, 2018

I have introduced a setting workbench.centeredLayoutAutoResize.
This setting behaves in such a way that when enabled it will automatically resize the centered layout view to max width when more than 1 group is open.
I personally like this behavior and have decided that it is enabled by default to true.
So the behavior suggested in the inital comment will now be the default behaivor and users can opt out of this.

You can check this out in next weeks insider build and provide feedback. Thanks
Feedback on setting name, default value and behavior are very welcome
fyi @bpasero

@isidorn isidorn added the verification-needed Verification of issue is requested label Oct 4, 2018
@Ky6uk
Copy link

Ky6uk commented Oct 4, 2018

@isidorn will it fix the regression as-designed feature (#53694) when tabs bar has a reduced size like an editor pane? 🤔

@bpasero
Copy link
Member

bpasero commented Oct 4, 2018

@isidorn should this rather be workbench.editor.centeredLayoutAutoResize?

@isidorn
Copy link
Contributor

isidorn commented Oct 5, 2018

@Ky6uk no, it will not. Sorry
@bpasero yeah, editor prefix makes change looking at other settings whcich have the editor prefix. Updating it...

@RMacfarlane RMacfarlane added the verified Verification succeeded label Oct 31, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality on-testplan verification-needed Verification of issue is requested verified Verification succeeded workbench-zen Full screen 'Zen' view issues
Projects
None yet
Development

No branches or pull requests

8 participants