gitextensions
gitextensions copied to clipboard
Left panel ('branches') - multiple selection for deletion
Feature description
Hello!
I follow up on this issue with another idea: allow multiple selection in the branch list, in order to be able to 'delete' multiple branches.
Thank you and best regards! Andrei
Environment
- Git Extensions 3.00.00.4433
- Build fca7cf228b481ee8c1b779cf7b882ccdfbdcd1bc
- Git 2.20.1.windows.1
- Microsoft Windows NT 10.0.17134.0
- .NET Framework 4.7.3260.0
- DPI 96dpi (no scaling)
Yes, I want this feature myself. Currently, though, this is non-trivial due to how context actions are implemented in the left panel. I have some ideas for how to refactor that code to make it easier to manage multiple selection actions.
@amaiorano I have some work in progress for this. Please if you like have a look at my branch https://github.com/seshonaar/gitextensions/tree/feature/local_branch_context_menu thanks!
It would make the reviewing and discussions easier if you open a PR. Just add "WIP" to the subject.
On Sat, Feb 2, 2019, 7:40 PM seshonaar <[email protected] wrote:
@amaiorano https://github.com/amaiorano I have some work in progress for this. Please if you like have a look at my branch
https://github.com/seshonaar/gitextensions/tree/feature/local_branch_context_menu thanks!
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/gitextensions/gitextensions/issues/6180#issuecomment-459947437, or mute the thread https://github.com/notifications/unsubscribe-auth/AEMyXpHkalUJi7IDC6SC3cWoVjSCm-3_ks5vJU7ugaJpZM4aV4s2 .
Just to be clear, #6209 doesn't address this issue, right? It addresses #6179. Is this correct?
@amaiorano True. I have that on my radar as well, but I'll see to the menu items generation first.
@amaiorano True. I have that on my radar as well, but I'll see to the menu items generation first.
👍 Btw, great work so far. We're all looking forward to your changes :)
I would like to multiple select branches on the left, right click, and push all of them (or make those the branches the only branches selected in the multiple push dialog). That would be awesome!
@seshonaar Can you tell me what is the current status of your implementation? How does the context menu look like now with multiple branches? Do you have the time to continue implementing this?
I'm also interested in making left panel multi-selectable, to enable viewing multiple branches (like hiding/soloing in GitKraken). Would like to continue from your effort if you don't have the time.
For "solo" you can use Show this branch only Delete and compare is the cases I have seen
For "solo" you can use Show this branch only
I mean multiple solos.
Delete and compare is the cases I have seen
Can you elaborate on this? Do you mean what you've seen implemented by @seshonaar?
I mean multiple solos.
Of course
Can you elaborate on this? Do you mean what you've seen implemented by @seshonaar?
I have not seen any implementation, it is my wish when using (and talking to other users). This discussion was probably before Merge/Rebase etc was added to the left panel, commits is about that?
For comparing, an addition to multiselect would be to Select first branch to compare, then Compare this branch to ...
Good to have this discussion prior to the implementation.
For comparing, an addition to multiselect would be to Select first branch to compare, then Compare this branch to ...
I think "Select first branch" & "Compare this branch to" is not related to multi-selection. We can add that even with single select as well. So that would be a separate feature.
Just want to update on this. I created a simple multi-select TreeView for use in RepoObjectsTree, however, I found out that's not enough. I still have to handle the followings, IMO:
- Common behavior for multi-select
- [ ] Nodes in different root groups are not selectable (Branches, Remotes, Tags, Submodules)
- [ ] Investigate possibility of using
TreeView.CheckBoxes
(does it make sense to use checkbox instead of multi-select?) - [ ] Remote root nodes and Remote Branche nodes should not be selected together
- Context menu for Tag node group:
- [ ] Delete
- [ ] Show/Hide
- Context menu for Submodules node group
- [ ] Update
- [ ] Delete
- Context menu for (Local) Branches node group
- [ ] Pull
- [ ] Push
- [ ] Delete (when active branch is selected, should disable Delete, or must show error message instead)
- [ ] Show/Hide
- Context menu for Remotes nodes
- [ ] Deactivate
- [ ] Fetch
- [ ] Fetch and Prune
- Context menu for Remote branch nodes
- [ ] Fetch
- [ ] Delete
- [ ] Show/Hide
I'd like to discuss what behaviors and options should be allowed in your opinions, before jumping into implementation.
My 2ct:
Investigate possibility of using
TreeView.CheckBoxes
(does it make sense to use checkbox instead of multi-select?)
Left click without modifier keys should always single-select the clicked branch, regardless whether with or without checkboxes. Though I think, this is not how checkboxes should be used.
Sometimes multi-select will be very useful, although I guess, single-select will stay the primary use case for me.
- Context menu for (Local) Branches node group
+
Fetch (if the local branch has a tracked remote branch)
Delete (when active branch is selected, should disable Delete, or must show error message instead)
I'd disable the menu item. (Optionally, its text could be switched to "cannot delete current branch".)
I think "Select first branch" & "Compare this branch to" is not related to multi-selection. We can add that even with single select as well. So that would be a separate feature.
Anyway I'd expect, if the multi-selection consists of exactly two branches, the diff of them should be displayed in the Diff
tab.
Show/Hide branch
Just curious: Shall Hide
filter out the branch from the revision grid including from the graph?
I believe that selecting in the left panel should be similar to selecting in the revision grid. I make sense to select a local branch, a remote branch and a tag to compare them. (GE supports multi selection already - if that should be limited is a slightly separated question.)
The context menu may be empty when selecting different types though. There may still be options like "Select base" (that should be added to the standard revision grid menu)..
Disable items that cannot be executed, like checked out branch is selected, Delete is not active (Maybe disable e.g. push if no tracked remote branch)
If it is hard to implement this, then limit as suggested.
Investigate possibility of using TreeView.CheckBoxes (does it make sense to use checkbox instead of multi-select?)
I do not think so
Context menu for Tag node group: Delete Show/Hide
Yes
Context menu for Submodules node group Update
yes
Delete
Only for consistency, can be omitted
Context menu for (Local) Branches node group Pull
Only if tracked and is checked out
Fetch if any have a tracked remote
Push
Only if tracked remote?
Delete (when active branch is selected, should disable Delete, or must show error message instead)
Hide if checked out selected
Show/Hide
Context menu for Remotes nodes
Deactivate Fetch
Fetch and Prune
Yes
Similar for inactive remotes Manage
Context menu for Remote branch nodes
Fetch Delete
Show/Hide
yes
@hieuxlu I'm struggling with so much text (sorry). Is it possible to visualise the proposal?
@seshonaar, your initial issue "delete multiple branches" can already be done using the "Delete branch" dialog ("Command" menu).