Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Add Stage All and Unstage All buttons in git panel - #405

Merged
kuychaco merged 5 commits into
masterfrom
ku-stage-unstage-all-buttons
Jan 6, 2017
Merged

kuychaco merged 5 commits into
masterfrom
ku-stage-unstage-all-buttons

Conversation

@kuychaco

@kuychaco kuychaco commented Jan 5, 2017

Copy link
Copy Markdown
Contributor

Fixes #119

stage-unstage-all

/cc @simurai for design 💭

@simurai

simurai commented Jan 5, 2017

Copy link
Copy Markdown
Contributor

Awesome! This will save so many clicks. 🎉

Changed the buttons to be a bit more subtle:

screen shot 2017-01-05 at 9 52 47 pm

Does it need keyboard support? It could be part of the tab cycle or have its own keybinding. Currently you can stage/unstage all with cmd-a + enter, maybe ok.

@simurai
simurai force-pushed the ku-stage-unstage-all-buttons branch from b1d063c to cc62c4e Compare January 5, 2017 14:29
@kuychaco

kuychaco commented Jan 5, 2017

Copy link
Copy Markdown
Contributor Author

Does it need keyboard support? It could be part of the tab cycle or have its own keybinding. Currently you can stage/unstage all with cmd-a + enter, maybe ok.

Yeah I think cmd-a + enter should be good enough to cover keyboard support while the focus is in the git panel, and that way we can keep the tab cycle tight.

On a related note, @smashwilson brought up a good point that having Atom-level commands for stage/unstage all on the workspace could be handy and save the user from having to first focus the git panel. They can do github:stage-all and then github:commit from anywhere in the editor. Question is - does it make sense to bind these to keyboard shortcuts? If so, which keys? /cc @simurai for 💭

Comment thread lib/views/staging-view.js
'github:activate-previous-list': () => this.activatePreviousList(),
}));
this.subscriptions.add(this.props.commandRegistry.add('atom-workspace', {
'github:stage-all': () => this.stageAll(),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awww you didn't go with github:shotgun 😉

@simurai

simurai commented Jan 6, 2017

Copy link
Copy Markdown
Contributor

They can do github:stage-all and then github:commit from anywhere in the editor.

Yessss.. 💯

Looking at #174, ctrl-7?

@kuychaco

kuychaco commented Jan 6, 2017

Copy link
Copy Markdown
Contributor Author

Looking at #174, ctrl-7?

Hmm maybe. But perhaps we'll want to reserve that for other potential panels (like a config panel?). I think for now I'll just merge without keybindings and the user can do the binding themselves if they like. And we can always add a default binding in the future if we decide it's a good idea.

@kuychaco
kuychaco merged commit 0861338 into master Jan 6, 2017
@kuychaco
kuychaco deleted the ku-stage-unstage-all-buttons branch January 6, 2017 02:40
@shelldandy

Copy link
Copy Markdown

@kuychaco how can I add a default binding for stage/unstage all? thanks a lot!

@kuychaco

kuychaco commented Oct 9, 2017

Copy link
Copy Markdown
Contributor Author

@Mike3run here's how you can add a default binding for stage/unstage all:

  1. open your keymap file (via application menu or in command palette type "Open Your Keymap")
  2. add something like the following
'atom-workspace':
  '<some key combo>': 'github:stage-all-changes'
  '<some other key combo>': 'github:unstage-all-changes'

Refer to the following documentation for more details on keymaps in-depth: http://flight-manual.atom.io/behind-atom/sections/keymaps-in-depth/

Hope this helps!

@shelldandy

Copy link
Copy Markdown

Thanks a lot @kuychaco

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants