gitui icon indicating copy to clipboard operation
gitui copied to clipboard

Search branch

Open Wyfy0107 opened this issue 3 years ago • 3 comments

Is your feature request related to a problem? Please describe. When viewing all the branches in gitui, I would like to have the ability to search through these branches

Describe the solution you'd like Perhaps in the branch view, press / to start searching, similar to vim

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.

Wyfy0107 avatar Sep 21 '22 13:09 Wyfy0107

would be nice to reuse the fuzzy search popup we have for this already (see the file tab)

extrawurst avatar Sep 21 '22 14:09 extrawurst

Haven't used rust yet, but can I try to add this feature ?

Wyfy0107 avatar Sep 21 '22 15:09 Wyfy0107

I won't be able to work on this issue. Please feel free to take over

Wyfy0107 avatar Oct 11 '22 07:10 Wyfy0107

I'm trying my hand at this.

ObiWanRohan avatar Dec 22 '22 15:12 ObiWanRohan

@extrawurst I have added a key ("Branch Find Toggle") which would toggle the focus to the find box in the branch list popup. Pressing the key (Currently / by default) would shift the focus to the text input. I didn't go the route of making it similar to the file finder, as there are no other possible inputs in the file finder. Here there are possible inputs like c for create branch, r for rename and so on. Otherwise there would have to be a completely separate finder popup for the branches (this is also an option).

Some feature questions come to mind:

  • What should be the scope of the finder? (Just the open tab or both tabs). The open tab is easier to implement as it needs lesser changes.
  • Should the matches be highlighted or should only the matches be shown?
  • How does the user exit the find mode? (The Escape key or backspacing the whole input)

I'll add more as they come.

ObiWanRohan avatar Dec 22 '22 18:12 ObiWanRohan

@extrawurst Pinging for answers

ObiWanRohan avatar Jan 04 '23 13:01 ObiWanRohan