-
Notifications
You must be signed in to change notification settings - Fork 29.4k
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
Tab wrap - tab should not fill all spare space when wrap to new line #113801
Comments
@heartacker the reason tabs currently grow is the following pattern that imho is a bit unpleasant otherwise: As you can see each row would have an uneven gap on the right hand side. As a workaround, if you configure |
@bpasero how about making them grow on every line except for the last one? |
@gjsjohnmurray this is a good idea but to my knowledge there is no CSS rule that we could leverage here because the wrapping is entirely done via the @sneakyfish5 and @DynDux fyi for CSS tricks maybe I am missing something here. |
From #106448 (comment) |
Here's an accompanying visual for @DynDux's proposed change: |
great |
Nice, I suggest to continue via a PR. |
@sneakyfish5 @DynDux given we also have #113926 as an issue I wonder if we should revisit the editor actions toolbar altogether when tabs wrap: what if we simply treat the editor actions toolbar as a "tab", always being the last "tab" in the strip. This would:
Thoughts? PS: this solution would probably not work for when wrapping is disabled, so it has to be a custom solution only when wrapping is on. |
@bpasero I commented on PR #113926 but see it's closed. So here again: If the editor actions are just a tab, a clean css-only solution is easy. I created a new fiddle and tried to use the original class names and structure. I also commented the relevant css parts for the layout. Hope it is clear - otherwise please let me know what else you need: |
Yeah thanks, I think the biggest challenge is the actual implementation of the editor actions being a "fake" tab. Unfortunately that is not "just" a CSS change (as far as I can tell), but needs a bit of coding and care because lots of operations assume that the children in the tabs container are all tabs, and not "fake" tabs. |
Any update on this? I like the idea of wrapping tabs but the expanding last row is really throwing me off |
@jjspace Until a fix is merged, you can use the extension "Custom CSS and JS Loader" with the following css snippet as a workaround:
|
Instead of patching our CSS (which we strongly advise against), please see an easy solution via settings in #113801 (comment) |
Sorry - of course you are absolutely right! I didn't want to give bad advises and messing with the app shouldn't be done. If I can help to improve the behavior, please let me know! |
Does using When I add in the |
@clottman yeah that should still work, are you using stable or insiders of VSCode? |
Can you try to reproduce with our nightly insider builds? You can give our preview releases a try from: https://code.visualstudio.com/insiders/ |
Huh, my computer updated this morning from Mac OS 11.1 to mac OS 11.2.1 and it works now, without trying the nightly insider build. Strange. Thanks for your help! |
via 3c62a8f the growing of tabs now only applies to the last tab in a row (except for the last row) and the overall result is a much calmer tab sizing behaviour when tabs wrap: |
The latest row should have consistent behavior with the single row
The text was updated successfully, but these errors were encountered: