You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Introduces initial implementation of phase 3 of issue #2361
Description
This PR moves all *dialog.py files to a dialogs/ subfolder under views/ directory. There is no code change. it just changes the organization making future changes to views layer easier. The same can be done for tabs too.
This is a small part of a major refactor in the views layer of the current vorta application. Current /views is cluttered with tabs, dialogs, pages all in a single directory. There is plan to arrange them in respective folders, tabs under /views/tabs/, dialogs under /views/dialogs/.
How Has This Been Tested?
I am running Debian Linux. Used pytest with uv. Ran the following command in Python 3.14. Got 2 warnings unrelated to this change. All tests passed.
uv run pytest --ignore-glob="*darwin*.py"
Types of changes
Reorganizes dialogs and related imports (UI, translation etc)
Import rewiring is correct for all 6 moved modules
.ts translation location references updated
UI asset files moved to assets/UI/dialogs/
Module alias (import extract as extract_dialog) preserves existing usage in archive_tab
Tests updated
Issues to address:
Missing __init__.py — src/vorta/views/dialogs/ has no __init__.py. Works as a namespace package but is inconsistent with views/partials/ which has one.
exception.py imports get_asset from wrong module — line 11 uses from vorta.views.utils import get_asset, get_colored_icon. get_asset is defined in vorta.utils; it only resolves here because views/utils.py happens to re-import it. Other moved files (exclude.py, ssh.py) correctly import from vorta.utils.
4 dialog modules not moved — export_window.py, import_window.py, repo_change_passphrase.py, and diff_result.py are all modal dialogs but remain in views/. This leaves dialogs split across two directories. Issue Refactor views: Add BaseTab class, ViewModel layer, and reorganize dialogs #2361 lists the first three explicitly; diff_result.py defines DiffResultDialog.
Suggest moving all four into dialogs/ in this same PR so the reorganization is complete. Filenames can stay as-is (note import.py would collide with the keyword, so import_window.py is fine).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces initial implementation of phase 3 of issue #2361
Description
This PR moves all *dialog.py files to a dialogs/ subfolder under views/ directory. There is no code change. it just changes the organization making future changes to views layer easier. The same can be done for tabs too.
Related Issue
#2361
Motivation and Context
This is a small part of a major refactor in the views layer of the current vorta application. Current /views is cluttered with tabs, dialogs, pages all in a single directory. There is plan to arrange them in respective folders, tabs under /views/tabs/, dialogs under /views/dialogs/.
How Has This Been Tested?
I am running Debian Linux. Used pytest with uv. Ran the following command in Python 3.14. Got 2 warnings unrelated to this change. All tests passed.
uv run pytest --ignore-glob="*darwin*.py"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.