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

Searching for filtering available files on the load dialog seems broken #32

Open
SusanBrown opened this issue Aug 9, 2019 · 11 comments
Assignees

Comments

@SusanBrown
Copy link

Search seems totally to be broken

Expected Behaviour

If I enter the name of a file in part I expect the list to be filtered to show only the available files that have strings matching my search string.

Current Behaviour

There are no matches when there should be:

image

image

@ilovan
Copy link
Contributor

ilovan commented Aug 9, 2019

Great catch, @SusanBrown .
@ajmacdonald , dev-cwr-writer is returning an even weirder result:
image

@ajmacdonald
Copy link
Contributor

@SusanBrown the search is performed on the text of the files within the repos not the names of the repos themselves

@SusanBrown
Copy link
Author

SusanBrown commented Aug 9, 2019 via email

@ajmacdonald
Copy link
Contributor

@ilovan I've fixed the issue on dev

@ajmacdonald
Copy link
Contributor

@SusanBrown yes that's possible but not straightforward since those are two different calls

@ajmacdonald ajmacdonald self-assigned this Aug 12, 2019
@ajmacdonald
Copy link
Contributor

Searching file names within repos will be tricky. Whereas there's a method in the GitHub API for searching within file contents, there is no equivalent for file names.

You can see this reflected in the interface on GitHub itself.
Searching within a repository does not include file name matches: https://github.com/cwrc/cwrc-git-dialogs/search?q=load&unscoped_q=load
You must instead use a separate page to search by file name: https://github.com/cwrc/cwrc-git-dialogs/find/master

A workaround would require fetching the contents of each repo for a user, then searching within those contents. Depending on the number of repos a user owns, this could be a very expensive operation. A compromise might be to have the user select a repo first, then have the ability to search within that particular repo.

@SusanBrown
Copy link
Author

SusanBrown commented Nov 15, 2019 via email

@ajmacdonald
Copy link
Contributor

Great! @SusanBrown
I think we might then also want to consider switching to a multi-column layout for the load/browse dialog, similar to the Mac OS Finder.
Column 1: repo search
Column 2: repo search results
Column 3: selected repo contents, including an input for searching within the repo

@SusanBrown
Copy link
Author

SusanBrown commented Nov 15, 2019 via email

@ajmacdonald
Copy link
Contributor

e6dd57a

@ilovan
Copy link
Contributor

ilovan commented Jan 17, 2020

working now on dev-cwrc-writer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants