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

Add filter\search bar for branches #25233

Closed
sgabenov opened this issue Jun 13, 2023 · 3 comments · Fixed by #27055
Closed

Add filter\search bar for branches #25233

sgabenov opened this issue Jun 13, 2023 · 3 comments · Fixed by #27055
Labels
proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Milestone

Comments

@sgabenov
Copy link

Feature Description

I want to have additional search\filter bar on the "brances" page. So when you enter text, the filter will only show branches that contains such text in branch name.

the problem: i have 100+ branches in my repo. I did a PR long time ago and want to delete this PR and corresponding branch for it. If i go to PR page, i can see a linked branch for this PR and have a button to delete current PR. But on the branch page, that is opened from PR, i do not have a "delete" button, so i have to go to the "branches" page whare i can find and delete the corresponding branch after PR is deleted. But i need to click on multiple pages of existing branches to find the branch i want to delete. Feels like a lot of manual work to do.

Screenshots

search bar
@sgabenov sgabenov added type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first. labels Jun 13, 2023
@sgabenov sgabenov changed the title Add filer\serch bar for branches Add filter\search bar for branches Jun 13, 2023
@silverwind
Copy link
Member

Agree, we need a search box there.

@silverwind silverwind added the proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. label Jun 13, 2023
@lunny
Copy link
Member

lunny commented Jun 14, 2023

I think this depends on #22743. Except keywords, we also could have other filters or sorts.

lunny added a commit that referenced this issue Jun 29, 2023
Related #14180
Related #25233 
Related #22639
Close #19786
Related #12763 

This PR will change all the branches retrieve method from reading git
data to read database to reduce git read operations.

- [x] Sync git branches information into database when push git data
- [x] Create a new table `Branch`, merge some columns of `DeletedBranch`
into `Branch` table and drop the table `DeletedBranch`.
- [x] Read `Branch` table when visit `code` -> `branch` page
- [x] Read `Branch` table when list branch names in `code` page dropdown
- [x] Read `Branch` table when list git ref compare page
- [x] Provide a button in admin page to manually sync all branches.
- [x] Sync branches if repository is not empty but database branches are
empty when visiting pages with branches list
- [x] Use `commit_time desc` as the default FindBranch order by to keep
consistent as before and deleted branches will be always at the end.

---------

Co-authored-by: Jason Song <i@wolfogre.com>
@ruess
Copy link

ruess commented Sep 1, 2023

Just realized there at least is a branch search by going to the general <>Code tab and then clicking the branch change dropdown. This will at least get me by until this feature is added, as I also have way to many branches right now :)

Screenshot 2023-09-01 at 12 05 30 PM

@lunny lunny added this to the 1.21.0 milestone Sep 13, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
proposal/accepted We have reviewed the proposal and agree that it should be implemented like that/at all. type/feature Completely new functionality. Can only be merged if feature freeze is not active. type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants