Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Status: Add ability to filter files #339
I like where you're going with this. I have a few suggestions.
We only allow filtering a single path. In the DAG tool the input field does auto-complete on both refs and paths. I think there should be a widget that handles auto-complete for paths only (or there should be a way to reuse that code). Take a look at
When getting the value from the text field, we probably want to
When passing around the path, change the signatures to be
In order to get multiple paths from a single text field, call
What do you think?
BTW, when I tried this on Mac OS X I kept getting segfaults.. my guess is that maybe it's the QString vs. unicode string thing, so let's try that first.
Once we've made these changes, I can help tweaking the GUI a little bit to make the filter widget less invasive. The suggestions below can come after we've adjusted the above notes.
Let me know if you'd like help with these:
Thanks for taking this on! This is a pretty slick feature.
I implemented the multiple path criteria. I think that is a good idea. Let me know whether you still get the segfaults.
In regards to autocompletion, the current code in DAG tools listed all files and folder in repositories. This has a plus and minus on itself. Let's say I made a change in
The reason I added the button was I didn't want to filter on every keydown as that might be expensive. Since now it is using autocompletion, the filtering can be done on completion event like you said. My only concern is, using the current approach I can filter using wildcard (i.e
on an unrelated-topic, are you interested on a feature to show file history on DAG? I was thinking of having context menu in file difference widget, on selection, it will filter the dag to list all change involving those files. I will probably create a separate wishlist issue later.
added a commit
this pull request
Aug 18, 2014
Thanks! Check out the little tweaks I made to it, it's pretty slick.
@mmargoliono yes, file history on the DAG would be useful. Right now you can get it by typing e.g. "Makefile" into the input text and it'll filter the history to those paths, so it might already be supported. Let me know what you have in mind.