Skip to content
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

feat: quick mount #1664

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open

feat: quick mount #1664

wants to merge 6 commits into from

Conversation

diivi
Copy link
Contributor

@diivi diivi commented Mar 19, 2023

Description

Adds a Quick Mount feature to vorta so a user can browse their backups quickly. Improves UX as it will no longer be required to create a folder separately, open it in vorta, and then mount.
I'll add tests too once the code gets reviewed.

Related Issue

Closes #1435

Motivation and Context

UX Improvement and an old feature request.

How Has This Been Tested?

Tested with repos for now. The old functionality is "Mount to Folder" and the new one is "Quick Mount". This option opens the created folder and deletes it when the user unmounts the repository.

Screenshots (if appropriate):

Quick Mount

What's Left:

  • Quick mount for archives
  • Updating/Adding Tests

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.

src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
@diivi diivi marked this pull request as ready for review March 20, 2023 22:37
@diivi diivi marked this pull request as draft March 21, 2023 00:07
Copy link
Collaborator

@real-yfprojects real-yfprojects left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All actions that open another dialog e.g. a file dialog must end with an ellisis

src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
src/vorta/views/archive_tab.py Outdated Show resolved Hide resolved
@diivi diivi marked this pull request as ready for review March 21, 2023 16:05
Comment on lines +601 to +603
self.bMountArchive.clicked.connect(self.bmountarchive_clicked)
except TypeError:
self.bMountArchive.clicked.connect(self.bmountarchive_clicked)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are there two calls to connect?

@@ -544,11 +595,22 @@ def bmountarchive_refresh(self, icon_only=False):
if not icon_only:
self.bMountArchive.setText(self.tr("Unmount"))
self.bMountArchive.setToolTip(self.tr('Unmount the selected archive from the file system'))
self.bMountArchive.setMenu(None)
try:
self.bMountArchive.clicked.disconnect(self.bmountarchive_clicked) # avoid race condition
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would bmountarchive_clicked be connected to the signal multiple times?
This also doesn't disconnect the slot lambda: self.bmountarchive_clicked(quick=True) afaik.

@@ -366,6 +379,7 @@ def on_selection_change(self, selected=None, deselected=None):

# special treatment for dynamic mount/unmount button.
self.bmountarchive_refresh()
self.bmountrepo_refresh()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is that needed? I guess it doesn't hurt either.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To support changing the repository from the dropdown in theRepository tab. Without this, the Unmount option is visible for all repositories when I restart Vorta and not just the one I mounted.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this would make more sense in _toggle_all_buttons

@diivi diivi mentioned this pull request Jun 1, 2023
14 tasks
@m3nu
Copy link
Contributor

m3nu commented Jun 23, 2023

Already has pending feedback.

@real-yfprojects
Copy link
Collaborator

What does assigning me mean @m3nu ?

@m3nu
Copy link
Contributor

m3nu commented Jun 23, 2023

It means that I'll try to make sure those get merged and don't stay in limbo.

@m3nu
Copy link
Contributor

m3nu commented Jun 24, 2023

What does assigning me mean @m3nu ?

I misread, @real-yfprojects . Since you already commented a good bit here, I assigned you to push this over the finishing line. So it doesn't stay in limbo, as before.

@real-yfprojects real-yfprojects added the help wanted This issue is available, comment if you want to fix it label Apr 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted This issue is available, comment if you want to fix it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

FR: Quick Mount
4 participants