-
-
Notifications
You must be signed in to change notification settings - Fork 456
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
Status: Add ability to filter files #339
Conversation
In a big project with a lot of change spread across directory, it is hard to search a specific for a file change. This change will add ability to filter the files status similar to how git status filtering. Reported-by: hrj Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
Do you think it is better to move the filtering widget to a dockable widget. This way we can show/hide it from the UI. |
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. |
The files filtering in status widget was only accepting single path criteria. This is a bit inconvenience when you want to filter on multiple path filter criteria. This change will add ability to filter the files based on multiple criteria separated by a space. Reported-by: hrj Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
To use the filter in status widget, a user need to know the exact path they want to filter. This is a bit user unfriendly as the user might not always remember the exact path they want to filter on. This change will add autocomplete pop-up for filter in status widget. It will autocomplete to both folders path and files path. Reported-by: hrj Signed-off-by: Minarto Margoliono <lie.r.min.g@gmail.com>
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. |
Teach the status widget to filter paths. * status-filtering: status: add a filter toggle button status: remove the "Filter" button fixup! completion: use hinted line edits as the base class status: add hint text to the filter widget completion: use hinted line edits as the base class widgets: use consistent margins across all widgets status: update filter when return is pressed completion: better double-dash handling for DAG-like inputs completion: use value() where appropriate utils: simplify add_parents() by operating on a copy status: add a specialized completion model for status filtering status: make sure we always pass None as the status filter Status: Add autocompletion for the filter Status: Filter multiple path criteria inputs Status: Add ability to filter files Closes #337 Closes #339 Suggested-by: @hrf Thanks-to: Minarto Margoliono <lie.r.min.g@gmail.com> Signed-off-by: David Aguilar <davvid@gmail.com>
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. |
In a big project with a lot of change spread across directory, it is
hard to search a specific for a file change.
This change will add ability to filter the files status similar to how
git status filtering.
Reported-by: hrj
Signed-off-by: Minarto Margoliono lie.r.min.g@gmail.com
Issue Number: #337