feat: Reimplement drag drop files on sql migration#528
Merged
CyanVoxel merged 3 commits intoTagStudioDev:mainfrom Dec 12, 2024
Merged
feat: Reimplement drag drop files on sql migration#528CyanVoxel merged 3 commits intoTagStudioDev:mainfrom
CyanVoxel merged 3 commits intoTagStudioDev:mainfrom
Conversation
18d57c5 to
0ddd9c7
Compare
df66b2e to
34376ec
Compare
Collaborator
Author
6773328 to
d55186f
Compare
* Ability to drop local files in to TagStudio to add to library * Added renaming option to drop import * Improved readability and switched to pathLib * format * Apply suggestions from code review Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Revert Change * Update tagstudio/src/qt/modals/drop_import.py Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Added support for folders * formatting * Progress bars added * Added Ability to Drag out of window * f * format * Ability to drop local files in to TagStudio to add to library * Added renaming option to drop import * Improved readability and switched to pathLib * format * Apply suggestions from code review Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Revert Change * Update tagstudio/src/qt/modals/drop_import.py Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Added support for folders * formatting * Progress bars added * Added Ability to Drag out of window * f * format * format * formatting and refactor * format again * formatting for mypy * convert lambda to func for clarity * mypy fixes * fixed dragout only worked on selected * Refactor typo, Add license * Reformat QMessageBox * Disable drops when no library is open Co-authored-by: Sean Krueger <skrueger2270@gmail.com> * Rebased onto SQL migration * Updated logic to based on selected grid_idx instead of selected ids * Add newly dragged-in files to SQL database * Fix buttons being inconsistant across platforms * Fix ruff formatting * Rename "override" button to "overwrite" --------- Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> Co-authored-by: Travis Abendshien <lvnvtravis@gmail.com> Co-authored-by: Sean Krueger <skrueger2270@gmail.com>
d55186f to
5d36abc
Compare
Contributor
yedpodtrzitko
left a comment
There was a problem hiding this comment.
lgtm, but as usual - having some tests would be nice.
| item.setEditable(False) | ||
| self.model.appendRow(item) | ||
|
|
||
| self.show() |
Contributor
Collaborator
Author
There was a problem hiding this comment.
Added, but window already raised on my system so unsure if that is fixed for you
* Handle Qt events for main window in ts_qt.py * Replace magic values with enums * Match import duplicate file dialog to delete missing entry dialog * Remove excessive progess widgets * Add docstrings and logging
Extracts the create_progress_bar function from drop_import to the ProgressWidget class. Instead of creating a ProgressWidget, FunctionIterator, and CustomRunnable every time a thread-safe progress widget is needed, the from_iterable function in ProgressWidget now handles all of that.
5d36abc to
803f430
Compare
Collaborator
Author
|
Updated with feedback, still no tests as getting a lot of weird errors trying to work with files and copying in pytest |
CyanVoxel
approved these changes
Dec 11, 2024
Member
CyanVoxel
left a comment
There was a problem hiding this comment.
Thank you so much for your work on this! Tests would probably be nice in the long term, but I'm comfortable pulling this as-is for parity's sake.
DandyDev01
pushed a commit
to DandyDev01/TagStudio
that referenced
this pull request
Dec 13, 2024
…ev#528) * feat: Drag and drop files in and out of TagStudio (TagStudioDev#153) * Ability to drop local files in to TagStudio to add to library * Added renaming option to drop import * Improved readability and switched to pathLib * format * Apply suggestions from code review Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Revert Change * Update tagstudio/src/qt/modals/drop_import.py Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Added support for folders * formatting * Progress bars added * Added Ability to Drag out of window * f * format * Ability to drop local files in to TagStudio to add to library * Added renaming option to drop import * Improved readability and switched to pathLib * format * Apply suggestions from code review Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Revert Change * Update tagstudio/src/qt/modals/drop_import.py Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> * Added support for folders * formatting * Progress bars added * Added Ability to Drag out of window * f * format * format * formatting and refactor * format again * formatting for mypy * convert lambda to func for clarity * mypy fixes * fixed dragout only worked on selected * Refactor typo, Add license * Reformat QMessageBox * Disable drops when no library is open Co-authored-by: Sean Krueger <skrueger2270@gmail.com> * Rebased onto SQL migration * Updated logic to based on selected grid_idx instead of selected ids * Add newly dragged-in files to SQL database * Fix buttons being inconsistant across platforms * Fix ruff formatting * Rename "override" button to "overwrite" --------- Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> Co-authored-by: Travis Abendshien <lvnvtravis@gmail.com> Co-authored-by: Sean Krueger <skrueger2270@gmail.com> * refactor: Update dialog and simplify drop import logic * Handle Qt events for main window in ts_qt.py * Replace magic values with enums * Match import duplicate file dialog to delete missing entry dialog * Remove excessive progess widgets * Add docstrings and logging * refactor: add function for common ProgressWidget use Extracts the create_progress_bar function from drop_import to the ProgressWidget class. Instead of creating a ProgressWidget, FunctionIterator, and CustomRunnable every time a thread-safe progress widget is needed, the from_iterable function in ProgressWidget now handles all of that. --------- Co-authored-by: Creepler13 <denis.schlichting03@gmail.com> Co-authored-by: yed podtrzitko <yedpodtrzitko@users.noreply.github.com> Co-authored-by: Travis Abendshien <lvnvtravis@gmail.com>
3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



commit 4e4bf6b
commit 2f9ae0d
commit 803f430
Commits and commits title/messages are formatted to maintain authorship and split features, don't squash on merge