google / zoekt

Fast trigram based code search
1.7k stars 113 forks source link

Add sidebar with GUI filters to the search results page #103

Open axispx opened 5 years ago

axispx commented 5 years ago

This PR adds interactive filters in the sidebar to filter between repositories and languages.

filters

googlebot commented 5 years ago

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

:memo: Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

axispx commented 5 years ago

@googlebot I signed it!

googlebot commented 5 years ago

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

hanwen commented 5 years ago

nice!

I usually do the reviews from Gerrit though - see CONTRIBUTING. Would you mind sending me a change there instead?

axispx commented 5 years ago

There's an error adding my GitHub email address so I'm unable to push the changes to Gerrit.

hanwen commented 4 years ago

I had a quick look at this last week. I have two complaints:

I think this feature would make more sense as a dropdown menu.

axispx commented 4 years ago

@hanwen noted. I'll put in some changes soon.

hanwen commented 4 years ago

ping?

axispx commented 4 years ago

Hi, I got busy with work and completely forgot about this. I'll work on this tonight. Thanks for the reminder.

hanwen commented 4 years ago

sorry for the delay, i have been busy with other things

(sending through Gerrit as described in CONTRIBUTING usually yields faster feedback).

hanwen commented 4 years ago

implementation issue: you look at substrings ("lang:XXX") in the backend to populate the checkboxes.

This is incorrect if those bits appear as substrings eg.

clang:c

In the server, you can have access to the parsed query, so you should instead find the toplevel query.And and then look at its children to find all query.Repo/query.Language atoms.

hanwen commented 4 years ago

it also needs some work so the repo list view doesn't get messed up.

The drop down shouldn't be there for the repolist.

--- FAIL: TestBasic (0.00s) e2e_test.go:230: query "/search?q=r:": result did not have "1234\">master": template: navbar:33:37: executing "navbar" at <.FileMatches>: can't evaluate field FileMatches in type web.RepoListInput e2e_test.go:230: query "/search?q=r:": result did not have "Found 1 repositories": template: navbar:33:37: executing "navbar" at <.FileMatches>: can't evaluate field FileMatches in type web.RepoListInput e2e_test.go:230: query "/search?q=r:": result did not have "Feb 25, 2020 09:29": template: navbar:33:37: executing "navbar" at <.FileMatches>: can't evaluate field FileMatches in type web.RepoListInput e2e_test.go:230: query "/search?q=r:": result did not have "repo-url\">name": template: navbar:33:37: executing "navbar" at <.FileMatches>: can't evaluate field FileMatches in type web.RepoListInput e2e_test.go:230: query "/search?q=r:": result did not have "1 files (36)": template: navbar:33:37: executing "navbar" at <.FileMatches>: can't evaluate field FileMatches in type *web.RepoListInput