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: Filter current branch list #166

Closed
jwu910 opened this issue Jun 8, 2018 · 10 comments
Closed

Feature: Filter current branch list #166

jwu910 opened this issue Jun 8, 2018 · 10 comments
Labels
discuss Discussion enhancement New feature or request

Comments

@jwu910
Copy link
Owner

jwu910 commented Jun 8, 2018

Consider adding a feature to filter results from each remote.

I was originally against the idea of needing to type in this tool. If users find a need for a filter results feature this can be considered.

When viewing the rendered list of branches/refs, bind key / to initiate a filter feature that lets the user type to filter by refs matching the characters in the query.

  • list should update as user types
  • first index of list should remain highlighted unless user navigates
  • Should navigating left/right among remotes reset the filter, or should filter persist?
@jwu910 jwu910 added enhancement New feature or request question Further information is requested labels Jun 8, 2018
@jwu910 jwu910 added discuss Discussion and removed question Further information is requested labels Jul 27, 2018
@drewbrokke
Copy link
Collaborator

bump. This would be super useful. I can live with just the arrow keys for navigation

@jwu910
Copy link
Owner Author

jwu910 commented Sep 20, 2018

Will look into this! I have actually hit a few cases where it would have been really nice to have

@jwu910 jwu910 added the pinned Pinned issue label Sep 20, 2018
@drewbrokke
Copy link
Collaborator

I would like to propose distinguishing between filtering and searching. If we followed the pattern set by less, the behavior would be as follows:

  • When the user presses /, they are prompted for a search term. On submitting search, matches are highlighted, and they can jump from one result to the next by pressing n and N.
  • When the user presses &, they are prompted for a filter term. On submitting the term, output is reduced to only show lines that match the filter term. Pressing & again and submitting a blank search returns output to normal.

This would be familiar to any users who are accustomed to the behavior of less (which is arguably the most commonly used pager afiak).

@jwu910
Copy link
Owner Author

jwu910 commented Aug 30, 2019

This is really great feedback.

To clarify, would the workflow be something like / -> Type Ticket Number* -> Submit* -> n/N to navigate?

And from this search results view, the user can also press & to additionally filter the results by another text criteria?

@drewbrokke
Copy link
Collaborator

With how I imagine it, we wouldn't change views for search/filter, just adjust the current output (highlight terms, remove lines, etc.). Searching and filtering could happen independently of one another.

@drewbrokke
Copy link
Collaborator

But your workflow sounds right. Basically, n/N would always be bound to jump to the next/previous match, but if there is no search term then there are no matches, so they would be a no-op.

@jwu910
Copy link
Owner Author

jwu910 commented Aug 30, 2019

would / and & open up all keyboard keys for typing prior to the submission of the query?

@drewbrokke
Copy link
Collaborator

Correct, it should focus an input which will grab all keyboard input, so you can type "q" and such :)

@drewbrokke
Copy link
Collaborator

Basically I'd want to be able to search and filter in a way similar to how I could if I just called git branch on the terminal.

@jwu910
Copy link
Owner Author

jwu910 commented Aug 30, 2019

Right on, I had the same thing in mind then. Similar to the search/find in Vim I guess.

drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
provides a function to create a temporary input that accepts text and passes the input's value to a
provided callback function when the 'enter' key is pressed

jwu910#166
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
drewbrokke added a commit to drewbrokke/check-it-out that referenced this issue Sep 12, 2019
@jwu910 jwu910 added the pending-release Reviewed and merged into development label Oct 10, 2019
@jwu910 jwu910 closed this as completed Oct 13, 2019
@jwu910 jwu910 removed pending-release Reviewed and merged into development pinned Pinned issue labels Oct 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss Discussion enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants