Skip to content

Add a new unified file selector#2237

Merged
m3nu merged 10 commits intoborgbase:masterfrom
VandalByte:dev-file-dialog
Jun 4, 2025
Merged

Add a new unified file selector#2237
m3nu merged 10 commits intoborgbase:masterfrom
VandalByte:dev-file-dialog

Conversation

@VandalByte
Copy link
Collaborator

@VandalByte VandalByte commented May 18, 2025

Description

Currently, in Vorta, we use two separate file selectors for selecting files and folders due to limitations in Qt. This PR introduces a unified file selector made with QTreeView that:

Related Issue

Solves #1869

Motivation and Context

Due to limitations in the Qt, we previously had to rely on separate dialogs for files and folders, which created a confusing and less efficient user experience. This PR improves usability and code maintainability by replacing them with a new single selector.

How Has This Been Tested?

As of now, manual UI testing has been performed to verify the new selector works as expected. Existing test cases may currently fail due to new changes. These will be fixed accordingly. Additional tests will be added to cover the new functionality.

Screenshots (if appropriate):

Screenshot 2025-05-18 182956

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the CONTRIBUTING guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

I provide my contribution under the terms of the license of this repository and I affirm the Developer Certificate of Origin.

@VandalByte
Copy link
Collaborator Author

This is how the final implementation looks like:

  • Multiselection of files and folders
  • Access to hidden files, with a checkbox
  • Navigation bar to access locations other than /home/user, with visual indicator for wrong path.

image

@VandalByte VandalByte marked this pull request as ready for review May 24, 2025 09:00
@m3nu
Copy link
Contributor

m3nu commented May 24, 2025

Looks great! Good job! Will be a useful addition to be used in several places in Vorta.

I would still look into those things:

  • Could we set the title based on where the dialog is used? E.g. "Add files and folders to back up" or "Add files and folders to exclude"
  • For macOS, we usually attach a dialog to it's parent window. There are many examples in the code. Should be something like ssh_add_window.setParent(self, QtCore.Qt.WindowType.Sheet)

@VandalByte
Copy link
Collaborator Author

VandalByte commented May 24, 2025

I've include both changes. Now the window and sub-title can be passed as arguments, also cleaned up the base class a bit.

@m3nu
Copy link
Contributor

m3nu commented Jun 4, 2025

Good job, @VandalByte! More consistent than before.

There is still an issue with hanging macOS tests, which I'll debug later. Likely due to some type of access confirmation.

@m3nu m3nu merged commit 9768ccd into borgbase:master Jun 4, 2025
10 of 14 checks passed
@VandalByte VandalByte deleted the dev-file-dialog branch June 22, 2025 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants