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

Improve branch list status-bar item and modal #489

Merged
merged 4 commits into from
Oct 31, 2016

Conversation

danielbayley
Copy link
Contributor

  • Change current to HEAD branch list indicator
  • Add git-branch to class list of branches modal
  • Allow other packages to use branch status-bar item

Ampersands (`&`) don't show up in the actual menu (at least on macOS/X) so simply replace them with `+`.
Add `git-branch` to class list of the branches modal, to distinguish it from other modals for styling purposes.
Allow other packages to utilise _alt_ <kbd>⌥</kbd> and _shift_ <kbd>⇧</kbd> click events on the current branch _status-bar_ indicator without interfering with the current behavior of this package.
@danielbayley
Copy link
Contributor Author

danielbayley commented Jul 17, 2016

This package doesn’t get activated until one of it’s commands is called (which is obviously good for overall performance), but clicking on the branch list in the status-bar doesn’t currently activate it, when I think it should.

@akonwi Any thoughts on how that could work without removing the list of "activationCommands": from package.json?

@@ -9,6 +9,7 @@ class ListView extends SelectListView

initialize: (@repo, @data) ->
super
@addClass('git-branch')
Copy link
Owner

Choose a reason for hiding this comment

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

Is there styling that uses this class name? This name is being used by atom already so we should be careful of clashing of styles

Copy link
Contributor Author

@danielbayley danielbayley Jul 19, 2016

Choose a reason for hiding this comment

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

Is there styling that uses this class name?

Yeah, a theme I am working on for one, which adds icons to the modals. Packages often don’t bother to add a class to them, with the result being the inability to target them individually for styling.

With this line the class selector becomes .select-list.git-branch or atom-panel .modal .select-list.git-branch to be more specific, so shouldn’t be a problem unless I’m missing something? (Working fine on my local fork…)

Copy link
Owner

Choose a reason for hiding this comment

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

Sounds good. Must be a cool theme! Is it available yet?

@akonwi
Copy link
Owner

akonwi commented Jul 19, 2016

The only other option I can think of at this point is to make a change to atom's status-bar package to try and activate git-plus on click. I'm not sure how receptive they will be to that.

@danielbayley
Copy link
Contributor Author

I'm not sure how receptive they will be to that.

Probably not very… I don’t think core packages should be arbitrarily dealing with other packages like that either.

They already have this related PR also.

Surely there must be a way to do this from this package?

@akonwi
Copy link
Owner

akonwi commented Jul 19, 2016

I don't think we can activate the package from within itself aside from removing the activationCommands like you mentioned

@akonwi akonwi merged commit f592c13 into akonwi:master Oct 31, 2016
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.

None yet

2 participants