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

Feature Request: Customisable Buttons #10709

Closed
MeirionHughes opened this issue Aug 19, 2016 · 8 comments
Closed

Feature Request: Customisable Buttons #10709

MeirionHughes opened this issue Aug 19, 2016 · 8 comments
Assignees

Comments

@MeirionHughes
Copy link

Support adding custom buttons that execute a terminal command.
Support custom button context options (states that need to be true to be enabled).
Support downloading icons for said custom button from Noun Project.

@Tyriar
Copy link
Member

Tyriar commented Aug 23, 2016

The team is very sensitive to adding new Chrome to the UI. Currently you can't add buttons anywhere within VS Code and I believe that is an intentional design decision.

Coming soon to the terminal however is the ability to send text to a terminal, which will enable extensions to create custom commands, see https://github.com/Tyriar/vscode-terminal-api-example.

I am interested in the specific things you would like the buttons to do however.

@Tyriar Tyriar closed this as completed Aug 23, 2016
@MeirionHughes
Copy link
Author

MeirionHughes commented Aug 23, 2016

Not the chrome/electron menu; the left-side:

buttons

That space is begging to be filled with user-buttons. config for which could be as simple as:

settings.json

// Place your settings in this file to overwrite default and user settings.
{
    "buttons":[{
        "name" : "Publish",
        "type: : "Terminal",
        "command" : "npm publish",     
        "icon" : "https://d30y9cdsu7xlg0.cloudfront.net/png/28647-200.png"   
    }]
}

I really do not want to have to type terminal commands I regularly use and almost every other UI out there allows at least some customization.

For instance: I could have a button that releases my project; or another one that pushes documentation, via gulp cli calls... but what I want doesn't matter. What matters is empowering users to customize their UI experience in a space that is effectively unused.

I think this has been closed prematurely if I'm honest.

@Tyriar
Copy link
Member

Tyriar commented Aug 23, 2016

@MeirionHughes this is the issue for allowing extensions to add buttons to that section of the UI (the activity bar) #8511

We prefer to defer functionality like this to extensions and #8511 combined with the terminal API (#9957). In the meantime I would recommend playing with tasks as a way to quickly launch custom tasks from the command palette (F1), you can also build custom commands in an extension and then attach it to a keybinding.

@MeirionHughes
Copy link
Author

MeirionHughes commented Aug 23, 2016

Why limit this to extensions though?

I would think the above config example would make this easy for users to add their own without the need to jump through hoops such as building extensions. The config approach is also applicable for both user and workplace setting files so you can have per-project button setups.

  • Its not hard to implement;
    • icons from a icon-font might be easier?
  • It doesn't affect the UI layout,
  • It doesn't affect the default UI of normal users who choose not to use it,
  • It allows users to (easily) customize their UI experience
    • how they want to use it, not how you want them to us it.

I love vs-code, but right from the get-go I've wondered why there hasn't been an option to add user-configured buttons on that activity-bar; seems like a no brainier, if I'm perfectly honest. Hopefully in the future you'll change your mind.

@Tyriar
Copy link
Member

Tyriar commented Aug 23, 2016

Why is the activity bar locked down?

  • To keep the editor feeling "light-weight"
    • We don't want to clutter the UI
    • Opening the flood gates could have performance implications
  • Keep the complexity of code down
  • Extensions can't make much meaningful UI that would warrant allowing access to the buttons, it has been designed as a place to launch viewlets, not arbitrary commands

Why would this be extensions only if ever did allow it

  • Configuring this via settings is not particularly discoverable
  • Extensions allow devs to put together polished experiences
  • Only extensions would be able to launch the sort of UI that the buttons are designed for
  • Keep the complexity of code down

Also the sort of user interaction you're after is typically done within vscode currently via commands, keybindings and tasks which you can do already. Having said all this, I don't own this area but I believe I'm echoing the team's feelings fairly accurately.

I highly recommend looking into tasks as they allow you to do exactly what you want, just using a keybinding or the command pallete and not a physical button. The command palette (F1) is one of the most powerful features of vscode as you can pretty much call into everything the editor can do.

@MeirionHughes
Copy link
Author

To be fair when #8511 is done I can make an extension to do exactly what I propose (read a config from .vscode and add activity buttons) anyway.

@alanwalk
Copy link

I want to add a svn extension just like git, activityBar is better than terminal or command.

@marosca
Copy link

marosca commented Jun 19, 2017

I want button in the activity bar!

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants