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

Add fixed sized workbench tabs #40750

Closed
wants to merge 1 commit into from
Closed

Add fixed sized workbench tabs #40750

wants to merge 1 commit into from

Conversation

StefanScherer
Copy link

This is a PoC for #38594 to have fixed tab sizes so that someone can close multiple tabs by pushing close button multiple times at the same mouse position.

Following #39176 I added a fixed setting for workbench.editor.tabSizing

This is how it looks like:

vscode-editor-tabsizing-fixed

I'm not fully happy with this as the tabs could be resized to fit after some seconds of inactivity. This is how browsers do that.

I've also played with width and min-width which shrinks the tabs if many tabs are open:

.monaco-workbench > .part.editor > .content > .one-editor-silo > .container > .title .tabs-container > .tab.sizing-fixed {
	min-width: 60px;
	width: 160px;
	flex-basis: 0; /* all tabs are even */
	flex-grow: 1; /* all tabs grow even */
	max-width: 160px;
}

But this immediatelly increases them when closing one tab. So the user will miss the close button after closing one tab.

So is there a way to add some kind of timer to do that resizing?

@bpasero
Copy link
Member

bpasero commented Dec 23, 2017

@StefanScherer thanks for the contribution but I do not see why this cannot be achieved with the solution we have for the shrink option? I suggest to look at #40290 and see if it can be implemented with the existing options we have.

Chrome for example also has a similar tab sizing behaviour as our shrinking and still manages to have the behaviour of allowing to quickly close tabs without moving the mouse. I think tabs only resize when the mouse leaves the tab stripe.

@bpasero bpasero self-assigned this Dec 23, 2017
@bpasero bpasero added this to the On Deck milestone Dec 23, 2017
@bpasero bpasero added the workbench-tabs VS Code editor tab issues label Dec 23, 2017
@StefanScherer
Copy link
Author

@bpasero Thanks for the link. Yes #40290 indeed looks good. The only thing is that the example shown there uses oldmost same sized tabs (Untitled-1, Untitled-2, ...) even if there are only a few tabs open. The problem I see with shrink is that tabs with short file names are smaller, so in a real situation closing multiple tabs still doesn't work easily:

vscode-shrink-closing-tab-different-width

@bpasero
Copy link
Member

bpasero commented Dec 28, 2017

@StefanScherer yeah but then let's try to get at the tab sizing that e.g. Chrome does where each tab has the same width but when you reduce the size of the parent container, all tabs shrink evenly. With your proposed solution I see a scrollbar showing up when doing so:

before

@bpasero
Copy link
Member

bpasero commented Jan 18, 2018

@StefanScherer are you still planning to work on this?

@StefanScherer
Copy link
Author

@bpasero No, I'm occupied with other things so I can't spend much spare time to implement this. But I can help testing if somebody else comes up with another solution.

@bpasero
Copy link
Member

bpasero commented Jan 18, 2018

Ok thanks, closing then.

@bpasero bpasero closed this Jan 18, 2018
@github-actions github-actions bot locked and limited conversation to collaborators Mar 27, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
workbench-tabs VS Code editor tab issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants