microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
162.96k stars 28.77k forks source link

Allow hiding the buttons in the tab bar line and in the panel title bar #46403

Closed costincaraivan closed 1 year ago

costincaraivan commented 6 years ago

A small change related to the buttons in the tab bar line:

and to the buttons in the panel title bar:

For users who have already memorized the keyboard shortcuts for these commands (and considering the existence of Ctrl-p and Ctrl-Shift-p), the buttons are kind of redundant. It would be nice to have an option to hide them as almost everything in the UI already can be hidden. I know about Zen mode, but Zen mode also centers the text in the editor, hides the panel/terminals, makes Visual Studio Code full screen and all sort of other things which might not be desirable.

As a note related to this, Vim and Emacs users generally tend to hide the UI. Funnily enough, even the beast that is IntelliJ IDEA allows it 😆

ewohlken commented 6 years ago

Any update on this? Love vscode but its UI is way too busy for my taste

kirkstrobeck commented 6 years ago

This is referring to these buttons, right? What is this area called?

screen shot 2018-08-08 at 09 27 17
AshGrowem commented 6 years ago

*Updated for v1.32.1 Release

@kirkstrobeck According to it's aria-label It's called Editor actions, and each child has a class of action-item

screen shot 2018-08-13 at 7 09 10 pm

Alternative Solution

Using Custom CSS and JS Loader

Hide the whole thing

.editor-actions {
  display: none !important;
}

Hide action-items by title

Possible titles

costincaraivan commented 6 years ago

Yup, @kirkstrobeck I was referring to that area. I guess I could make an extension for it? I'd need to read up how to make an extension, though.

Edit: Ah, damn, it's not really doable. There is an extension for custom CSS but it gets reset after each update. So this really needs to be in the core VS Code.

jmcannon commented 5 years ago

Please let users remove these. It takes up significant real estate that I'd rather use for my open tabs.

kube commented 5 years ago

This would be cool for screenshots where you want to focus on content.

usernamehw commented 5 years ago

@kube https://marketplace.visualstudio.com/items?itemName=pnp.polacode

kube commented 5 years ago

@usernamehw Thanks, it seems a really nice extension and .

But in my current case, I want to record a GIF, show completions, and error linting:

2018-12-03 14 55 10

edporteous commented 5 years ago

Various extensions add buttons to this toolbar making it take up more real-estate. It would be great to be able to hide it.

jabacchetta commented 5 years ago

This feature request becomes even more appealing when taking into account:

The Custom CSS and JS Loader extension (as mentioned above) does work in removing the icons, but it's a hack that requires maintaining a css file and also requires permanently silencing the "corrupt installation" message.

jonathan-holm commented 5 years ago

Bump! All actions from these icons are available to perform elsewhere. They are needless clutter.

ronjouch commented 5 years ago

Extension-less workaround that might be good enough for folks who like me start VSCode at most once every few days:

  1. Pop open the Dev Tools. I like to bind them to Ctrl+Shift+i like in a browser: add { "key": "ctrl+shift+i", "command": "workbench.action.toggleDevTools" } to your keybindings.json.
  2. In the console, [...document.querySelectorAll('.editor-actions')].map(a => a.style.display = 'none') (and given the Console's history feature, once you typed it once, you just have to press Up to get it again)
  3. :tada:

EDIT 2019-03-11: followed bpartridge's suggestion to do the removal for all .editor-actions

hesting15 commented 5 years ago

So, what about second part of the question?

and to the buttons in the panel title bar:

  • New Terminal
  • Split Terminal
  • Kill Terminal
  • Maximize Panel Size
  • Move to Bottom
  • Close Panel

vscode1

If I simply do

.monaco-workbench .part.panel .title {
    display: none;
}

The search results panel goes up, it doesn't stretch to the whole area, and I have an empty spot in the bottom:

vscode2

bpartridge commented 5 years ago

Based on @ronjouch's suggestion, if you have multiple panes and want to hide actions for all of them, use this in the dev tools instead:

[...document.querySelectorAll('.editor-actions')].map(a => a.style.display = 'none')

I understand why #459 is locked and why giving extensions deep abilities to execute JS/edit CSS is unhealthy and counter to performance goals, but this is exactly the type of thing that userscripts would be perfect for, caveat emptor. In this case, it would be great to have a simple setting that toggles a single CSS rule to switch this, but that would need to be built into core.

curliq commented 5 years ago

+1

JamesGreenaway commented 5 years ago

+1

curliq commented 5 years ago

For people wanting to particularly hide the Gitlens icons, you can use these settings

"gitlens.menus": {
    "editorGroup": {
        "blame": false,
        "compare": false
    },
},
ronjouch commented 5 years ago

To an eventual implementer for this feature request: Firefox's "Overflow Menu" seems like a UX good inspiration. See how a contextual action lets users choose which addons deserve an icon in the bar (the most commonly used, to the user taste), and which should remain "pinned" in the Overflow Menu (the uncommonly-used ones).

It's usable, obvious, and for minimalists it would limit icon creep to a single "Overflow Menu" icon, which IMHO is reasonable:

firefox-overflow-menu

AbakumovAlexandr commented 5 years ago

VSCode Team, could you provide an ETA for this one, please?

buncis commented 5 years ago

I hope I could modify or move it because its kinda annoying and blocking my tab just like this image

make it hideable like chrome extension buttons or movable like debugger mode buttons are enough I think

output

craigcosmo commented 5 years ago

yep, that sh*t takes to much space. Gotta hide it.

craigcosmo commented 5 years ago
Screen_Shot_2019-07-20_at_12_48_05_PM
jabacchetta commented 5 years ago

For those still looking for a better solution until this feature gets added natively:

  1. Install the Customize UI extension

  2. Add the following configuration to your settings.json file (additional CSS selectors referenced here):

"customizeUI.stylesheet": {
  ".editor-actions": "display: none !important;",
},
xhat commented 5 years ago

@craigcosmo "customizeUI.stylesheet": { ".monaco-toolbar": "display: none !important;", },

taiya commented 4 years ago

yes, many of us moves to vscode to have a super-clean UI. Extensions should not be allowed to pollute it without our permission! +1 to this → and yes, customizeUI is an "ok" temporary fix

AbakumovAlexandr commented 4 years ago

I guess the top reason why commercial devs move to VSCode is not because of its 'super-clean UI', but rather because technologies they have to use at work are targeted VSCode (like Angular, etc.). Also, if you don't like how an extension X pollutes VSCode UI, the most obvious solution seems to be not using that extension X.

felipezarco commented 4 years ago

As already pointed by many, we already have easy access to those functionalities. Especially when using split view, these buttons at the tab take too much space we want for our tabs. Definitely should at least be optional (if not removed all together).

patrickgilmour commented 4 years ago

+1 for a native VS Code option to hide the editor actions

mikelyons commented 4 years ago

piling on here and say that it would be nice if you could move these buttons off the tab bar or disable them natively somehow. It seems obvious to me that the tab bar already gets mega cluttered when you have lots of files open.

EDIT: I did find @jabacchetta's solution worked perfectly: https://github.com/Microsoft/vscode/issues/46403#issuecomment-523286973

bionicles commented 4 years ago

these buttons suck and should die

torchlard commented 4 years ago

I guess the top reason why commercial devs move to VSCode is not because of its 'super-clean UI', but rather because technologies they have to use at work are targeted VSCode (like Angular, etc.). Also, if you don't like how an extension X pollutes VSCode UI, the most obvious solution seems to be not using that extension X.

Disagree. We need those extensions, but we don't need an icon from it placed in title bar. I don't understand why this simple UI change being ignored for long time, it should be very easy to implement, just hide all in 3 dots ...

sytelus commented 4 years ago

This page needs update to show "Editor Actions": https://code.visualstudio.com/docs/getstarted/userinterface

On Ubuntu, this area is over the tabs instead of along the same line as menus.

sethidden commented 4 years ago

While you're at it, you can also go full rice mode and remove the side bar titles obraz to obraz

  "customizeUI.stylesheet": {
    ".title-label": "display: none !important;", 
  },

You can change .title-label to .composite.title to remove the empty space but then you won't be able to right click the top bar to hide accordion items like the outline view etc. Or you could change "display: none" to some height changing class

obraz

sytelus commented 4 years ago

This issue has become very critical given so many extensions now pollute editor actions. On Ubuntu, this renders vscode almost unusable now. Hope it can be fixed very soon!

KentoNishi commented 4 years ago

Any updates on this? A simple checkbox-style action menu toggle (like that of the left shortcuts bar) would be enough.

KarlRamstedt commented 4 years ago

How has this not been fixed yet? It's been over a year and these useless buttons still plague our existence. I'd understand if a more thorough overhaul is being worked on. Something along the lines of what Firefox allows with buttons that can be relocated and hidden at will would be amazing.

KarlRamstedt commented 4 years ago

I should add that I couldn't get @ashrafhadden's solution to work (pretty sure I did everything correctly; VSCode complained about corruption). I did get @jabacchetta's solution to work though. It's also a much less fiddly solution.

gatspy commented 4 years ago

action-items on the tab annoys me!!!

jrend commented 4 years ago

Following the workaround that worked for me -- thanks jabacchetta! -- I just want to share an option that hides things more selectively instead of hiding all the buttons. An example of hiding the GitHub extension buttons:

    "customizeUI.stylesheet": {
        ".editor-actions a[title^=\"Git: View History\"]": "display: none !important;",
        ".editor-actions a[title^=\"Open Changes\"]": "display: none !important;",
        ".editor-actions a[title^=\"Show Revision Details\"]": "display: none !important;",
        ".editor-actions a[title^=\"Toggle File Blame Annotations\"]": "display: none !important;"
    },
ShiftyMcCool commented 4 years ago

Following the workaround that worked for me -- thanks jabacchetta! -- I just want to share an option that hides things more selectively instead of hiding all the buttons. An example of hiding the GitHub extension buttons:

    "customizeUI.stylesheet": {
        ".editor-actions a[title^=\"Git: View History\"]": "display: none !important;",
        ".editor-actions a[title^=\"Open Changes\"]": "display: none !important;",
        ".editor-actions a[title^=\"Show Revision Details\"]": "display: none !important;",
        ".editor-actions a[title^=\"Toggle File Blame Annotations\"]": "display: none !important;"
    },

Obviously a native solution would be preferable, but THIS works just fine until then. Love that it's selective, I still use the buttons in diff view but all the Git buttons while editing was getting to be a bit much. Thanks!

nikitavoloboev commented 4 years ago

Super annoying that you can't hide these icons. Can the devs suggest which area contributors should look into into making this change so one can send a PR?

Thank you.

nolanxyg commented 4 years ago

almost two years, why so hard?

rodrigobravenewcoin commented 4 years ago

I need this right now!

wsh3776 commented 4 years ago

For those still looking for a better solution until this feature gets added natively:

  1. Install the Customize UI extension
  2. Add the following configuration to your settings.json file (additional CSS selectors referenced here):
"customizeUI.stylesheet": {
  ".editor-actions": "display: none !important;",
},

It works for me👍. Thanks for solving my preblem.

nikitavoloboev commented 4 years ago

I don't want to install an extension running in the background just to hide one piece of UI. 😞

sobolevn commented 4 years ago

I have tried CustomizeUI solution but I agree with @nikitavoloboev that it is really strange to setup a monkeypatched version of VSCode just to hide several icons. It should be configurable by default.

Currently, it is the only thing that bothers me in my setup:

Снимок экрана 2020-03-26 в 11 14 10

I would love to see a fix!

jasonbuckboyer commented 4 years ago

I think @ronjouch's suggestion is the best so far to balance minimalism with quick access to common actions.

That suggestion, along with an option to completely hide the menu, would provide the ideal functionality overall.

gehringf commented 4 years ago

+1 for a native VS Code option to hide the editor actions

berfubuyukoz commented 4 years ago

I am relieved to see I am not alone by being annoyed by these buttons. It gets even worse when you have to work on a single PC screen and split the screen into two. I see only one tab at once in that case.

RobinTournemenne commented 4 years ago

This issue entered the backlog list of issue on 23 Oct 2019. It is a list of issue without any due date. It should be in the On Deck list of issues since it reduces a lot VS code usability when having a lot of editors opened.