Skip to content

reorganize dialogs#2428

Open
defnvary wants to merge 7 commits intoborgbase:masterfrom
defnvary:arrange_dialogs
Open

reorganize dialogs#2428
defnvary wants to merge 7 commits intoborgbase:masterfrom
defnvary:arrange_dialogs

Conversation

@defnvary
Copy link

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

  • Reorganizes dialogs and related imports (UI, translation etc)

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.

@m3nu m3nu force-pushed the arrange_dialogs branch from 4266a62 to 7d7c3e6 Compare March 15, 2026 13:42
@m3nu
Copy link
Contributor

m3nu commented Mar 15, 2026

What works well:

  • 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:

  1. Missing __init__.pysrc/vorta/views/dialogs/ has no __init__.py. Works as a namespace package but is inconsistent with views/partials/ which has one.

  2. 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.

  3. 4 dialog modules not movedexport_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).

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