Skip to content

Dynamically turn off transfer checkboxes.#653

Merged
JoeZiminski merged 8 commits into
mainfrom
deselect_transfer_checkboxes_dynamically
Feb 6, 2026
Merged

Dynamically turn off transfer checkboxes.#653
JoeZiminski merged 8 commits into
mainfrom
deselect_transfer_checkboxes_dynamically

Conversation

@JoeZiminski
Copy link
Copy Markdown
Member

@JoeZiminski JoeZiminski commented Dec 18, 2025

This PR properly fixes #537 as it is an issue that has come up a few times. The problem was that you could click mutually exclusive options for the custom transfer window datatype selection checkboxes. for example, you could click 'all' and 'behav' and it would then throw an errror on transfer. Now, the check boxes properly respond such that if you click one of a mutually exclusive set of options, all other options will be deselected.

Tests have been added, no additional documentation required.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds functionality to dynamically turn off mutually exclusive transfer checkboxes in the TUI. When certain checkboxes (like "all" or "all_datatype") are selected, other incompatible checkboxes are automatically deselected to maintain logical consistency.

Key changes:

  • Introduced TransferDatatypeCheckboxes subclass that extends the base checkbox class with mutual exclusion logic
  • Refactored parameter naming from create_or_transfer to tab_name for clarity
  • Added comprehensive test coverage for the new dynamic on/off behavior

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
datashuttle/tui/screens/datatypes.py Adds TransferDatatypeCheckboxes subclass with logic to automatically turn off mutually exclusive checkboxes; renames parameter from create_or_transfer to tab_name; adds helper function get_datatype_from_checkbox_name
datashuttle/tui/tabs/transfer.py Switches from DatatypeCheckboxes to TransferDatatypeCheckboxes for transfer tab checkboxes
datashuttle/tui/tabs/create_folders.py Updates DatatypeCheckboxes instantiation to use renamed tab_name parameter
tests/tests_tui/test_tui_widgets_and_defaults.py Removes "all" and "all_datatype" from existing test loop; adds new test test_transfer_checkboxes_dynamic_on_off to verify mutual exclusion behavior

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread datashuttle/tui/screens/datatypes.py Outdated
Comment thread datashuttle/tui/tabs/transfer.py Outdated
Comment thread tests/tests_tui/test_tui_widgets_and_defaults.py Outdated
Comment thread tests/tests_tui/test_tui_widgets_and_defaults.py Outdated
Comment thread datashuttle/tui/screens/datatypes.py
@JoeZiminski JoeZiminski linked an issue Dec 20, 2025 that may be closed by this pull request
@JoeZiminski JoeZiminski modified the milestones: v0.8.0, v0.9.0 Dec 20, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread datashuttle/tui/screens/datatypes.py Outdated
Comment thread datashuttle/tui/screens/datatypes.py Outdated
Comment thread datashuttle/tui/screens/datatypes.py Outdated
Comment thread datashuttle/tui/screens/datatypes.py Outdated
Comment thread datashuttle/tui/screens/datatypes.py Outdated
@JoeZiminski
Copy link
Copy Markdown
Member Author

@copilot can you give feedback on the inheritance structure on datatypes.py e.g. tab_name variable

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 3, 2026

@JoeZiminski I've opened a new pull request, #678, to work on those changes. Once the pull request is ready, I'll request review from you.

Copy link
Copy Markdown
Member

@alessandrofelder alessandrofelder left a comment

Choose a reason for hiding this comment

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

As the original author of #537 I did some user-testing and confirm I am happy :)
Code changes are legible and understandable to me, so all good, I think.

@JoeZiminski
Copy link
Copy Markdown
Member Author

Cheers @alessandrofelder!

@JoeZiminski JoeZiminski merged commit 071471e into main Feb 6, 2026
18 checks passed
@JoeZiminski JoeZiminski deleted the deselect_transfer_checkboxes_dynamically branch February 6, 2026 10:23
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.

Can tick contradicting tickboxes, and error message is unclear

4 participants