-
Notifications
You must be signed in to change notification settings - Fork 131
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
Diff and Extract View Filtering Options #1749
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Chirag Aggarwal <[email protected]>
Any suggestions how I can expand parent from |
What do you mean by 'expand' and 'parent'? |
@real-yfprojects When a match is found in an item, I want the parent items of that item to expand to reveal the matched child. I've also spent un-necessarily high time thinking about the search syntax. There are lot of good suggestions in the linked issue. I'm thinking this currently: Search input must start with either a normal string or It will also be easier to create a dialog box using this pattern as suggested in the issue and include regex search. Just wanted to run this by you before I start working on this. |
You could use |
Sounds good! Can you describe the syntax in detail and present examples before implementing it? |
It should give you an idea what I'm thinking Valid: Invalid: I've not look at implementation of size though so I'll have to figure this out when I start implementing this. |
Why is the last one invalid? And isn't
Yes, start with the path-based filters. Then you could proceed with implemeting the same for the extract view. In the process it would be great if you moved the common GUI and code into a superclass implementation to reduce redundancy. Afterwards you can think about implemeting filtering by other fields. |
I was thinking allowing
Was going to use I think we will have to construct the path by going up and getting name from parent and then joining to form a path. I'm trying to find if there's a more effecient way. Do you have any clue? |
I see, so by default only the |
Are you familiar with the concept of user stories? |
No, if something is matched, its parents (
I'm not but I did a quick lookup. |
While finished user stories compose a full description of a (sub)feature from a user perspective, I like to work with their basis that is describing a situation in which our feature might help. This allows us to better understand possible needs for our software and to design our software to better serve those needs. That's why I propose we think now think of some user (need) stories first before we continue thinking about the details of the search syntax. In the mean time you can work on this step (see previous comment):
I will start with a story: Story 1: exact pathAs someone that uses Vorta for accessing private backups I want to extract the old version of a specific file which I just modified erroneously. While I know the exact file path I find expanding each parent item in the path by clicking on it, very tedious. Expanding all items doesn't improve the situation since now there are so many elements that I need a lot of patience for finding the right path. I wish Vorta could help me with that. This user need could be solved in several ways. This new filtering option might not be the best option to address this user story. However we should still describe this story although in the end we might decide that this isn't relevant enough to be addressed or needs a different feature entirely. Let's first write down these stories and think about how to solve them afterwards. Now its your turn! |
…alog Signed-off-by: Chirag Aggarwal <[email protected]>
Pushed commit to move methods I could find similar to base class. A story based on my last experience:I was working on an app sometimes ago where I needed to restore Another story: Size based filtersI have a cronjob which deletes all files from Downloads folder which haven't been modified for more than 14 days. I realised a month later I had some important documents I downloaded but never moved. I now want to recover them from my Vorta backup but there are lot of unnecessary stuff in Downloads folder like large application files which I don't need. They were simple documents and spreadsheet files which I am sure were small, surely under 50MB. I'd want a simple filter in Vorta where I can enter the size range and set path to Some small points
|
There is nothing we can do about that. That's part of the nature of filtering/searching. However Qt does implement some optimizations afaik. Those should include only calculating the filter for expanded items. Story 5: NameAs a user who has recently moved a file between backups. I want to find out where was located in earlier backups. Borg and Vorta do not detect the renaming or moving of a file (afaik). So filtering diff changes to only show the ones with a specific file name would be useful. Story 6: Removed filesAs a normal user I want to get an overview of all the files I deleted from my harddrive (between two backups). However sorting by change type still clutters the list (in tree view) with added or modified files. This is because it is only sorted in the sublist of each parent. Story 7: Search for parentAs a user who wants to extract a document regarding GSoC I deleted previoiusly, I know it is located in a folder somewhere that contains GSoC in its name. Now I want to enter something simple like |
Can you now lay out the current iteration of your syntax and describe in which way it satisfies the needs of each story? Please also think about how conveniently it solved each problem and whether the resulting order ov convenience is justified. |
Here's my final draft of syntax. I chose to use command like syntax as it feels easier to read to me eyes and overall better. But let me know.
I am planning on using argparser for this. I was looking into implementing custom with Matching with the stories 1. exact path
Or
Satisfies the need with a clear syntax 2. A story based on my last experience
Allows wildcards hence I can match relative path. 3. Size based filters
4. Name
5. Removed files
6. Search for parent
Overall I feel this fits every use case, is easier to read and organised. Took some time to write this, let me know what you think. Some other special use specific options "may" add (from grep): |
Signed-off-by: Chirag Aggarwal <[email protected]>
I've pushed some code to match filenames and path to stay on the timeline. It's working well but can be easily modified shall we decide to change syntax. |
Signed-off-by: Chirag Aggarwal <[email protected]>
I will have a look at this tomorrow.
You can implement the search button until we have settled on a syntax. |
Signed-off-by: Chirag Aggarwal <[email protected]>
Can we use an icon for the search button? |
Yes, that works! @m3nu how do we have to handle licensing? |
I like the syntax you proposed since it can be (partly) implemented by using
Why not combine those to a single argument:
Glob support is great for not so technical users but one should also be able to use a regex to match the path.
I don't think we need this if one can use a regex for
Why have to ways of doing the same. If we make
The naming of the pattern types is inspired by borg exclude patterns since the user has to learn less when using the same design patterns as borg. The user would need to write less when using the borg pattern prefixes like For the diff view there also should be an option to filter by balance. For extract view there should be options to filter by health, modification time and size. I feel like when the path with a regex, vorta shouldn't show all children of a matched file even though they don't match as well. And I wondered whether we only want to support joining the filters like |
I actually pondered over this for quite a while but settled on AND because that seems more intuitive and I couldn't find personal use case where I would need to use OR.
I like it but there's a usecase I thought of. If I want to find a file in a given path, I thought we would require to use regex but the wildcard here seems to support nested directories so it should be fine.
What do you think about this? |
Signed-off-by: Chirag Aggarwal <[email protected]>
Thanks for patience. Added tests for both views. We can add a info icon beside search button that directs user to a syntax page on vorta documentation which explain it. Unfortunately argparse issue is still open so we can't add error info yet. |
Yes, that would be good! |
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
I didn't notice macos tests are failing. Couldn't reproduce locally, still looking. |
They time out on github. I think I saw the same behaviour in another PR. |
The timeout could be a new macos popup. I need to connect to the CI instance and take screenshots to debug this. It's pretty annoying. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's almost done!
Hi, thanks for review. I'm having my final exams currently, will update after that. |
Thanks and good luck! |
Signed-off-by: Chirag Aggarwal <[email protected]>
@jetchirag Nice to see you active again. Did the exams go well? |
@real-yfprojects Thanks, yes. They went pretty well! |
@m3nu @real-yfprojects Wanted to see if we can merge this up before new contributor(s) start their project so there's less conflict. |
Can you add some examples as placeholder text in the search bar? I find this feature overly complicated to use considering what it does. This may help a little. |
I noticed two bugs:
|
How would design it to be less complicated? I was thinking about adding a context menu that adds syntax elements by clicking on menu items. Autosuggestion could be implemented as well. |
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
Signed-off-by: Chirag Aggarwal <[email protected]>
I am not sure why I added condition that fnmatch must only work with Any idea on how to make it easier to use? I think the default search works well without any flag which most people can use like searching for file name without having to read docs. I can't decide on simple placeholder text. |
I would focus on filtering by (partial) filename mainly. That's intuitive and doesn't need a separate manual. Maybe maybe the size too. I realize my feedback is late though. 😬 So never mind. I just hope we will be able to maintain this feature in the future. Do add some examples as placeholder, please. Since nobody will read the manual to filter a file list. |
One could add a button opening a context menu that allows inserting the syntax in a user friendly way. |
Description
WIP. Adds filtering option(s) to Vorta diff and extract view.
Related Issue
Fixes #1674
Screenshots (if appropriate):
Types of changes
Checklist:
I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.
Follow ups