Add file dialog to exclude patterns#2252
Conversation
|
First option seems better since we have enough space and it's more explicit. |
|
By keeping the
Now for the button text other options I can think of is
Making that I'm starting on the implementation since the layout design has already been fixed (only the button label mentioned above can change, if needed). |
|
Looks good to me. |
|
I have added the last few changes, works fine during testing, both files and folders given are being excluded as expected. |
d4d237e to
45ca9a5
Compare
|
(rebased) |
|
I would test for blank strings as well |
|
Also fixes #2260 |
There was a problem hiding this comment.
Pull Request Overview
This PR adds a file dialog feature to the exclude patterns functionality, allowing users to select files and folders directly through a file dialog rather than manually typing exclusion patterns. The changes introduce a new button in the Custom exclusion tab that opens a file dialog for selecting items to exclude.
- Added a new "Exclude Files/Folders" button that opens a file dialog for selecting exclusion patterns
- Implemented pattern generation logic that converts selected file/folder paths into exclusion patterns
- Fixed a bug in the exclude-if-present pattern editing functionality
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/vorta/views/exclude_dialog.py | Added file dialog integration, pattern generation logic, and bug fixes for text editing |
| src/vorta/assets/UI/exclude_dialog.ui | Added the new "Exclude Files/Folders" button to the UI |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Here a minimal reproducible example of the issue: Given this source folder And this excluded folder line which was selected in the UI as ~/Downloads I have these folders and files: Unfortunately after testing the feature I can confirm that both folders are excluded, which isn't the user's intention and very unexpected. |







Description
This PR intends to add an option to use the file dialog to add the patterns directly into the "Custom" tab of exclusion dialog instead of adding then one click at a time.
Related Issue
Resolves #2144
Fixes #2260 (Unrelated bug fix)
Motivation and Context
This option makes it easy for users to add the patterns by directly selecting files/folders from the file dialog and a pattern to exclude the same will be auto generated and added to the Custom list, which you can edit later on if needed.
How Has This Been Tested?
Hasn't been tested yet, still a WIP.
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.