Copilot/update file selection drag drop#18
Merged
Conversation
Co-authored-by: tmaier-kettering <109093855+tmaier-kettering@users.noreply.github.com>
Co-authored-by: tmaier-kettering <109093855+tmaier-kettering@users.noreply.github.com>
Co-authored-by: tmaier-kettering <109093855+tmaier-kettering@users.noreply.github.com>
Co-authored-by: tmaier-kettering <109093855+tmaier-kettering@users.noreply.github.com>
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.
This pull request adds drag-and-drop file selection support to the application's file input widgets, improving usability for users working with data files. The implementation uses the
tkinterdnd2library when available, and provides a reusable utility for enabling drag-and-drop on various widgets. The changes are grouped into core functionality, integration across modules, and user interface improvements.Core drag-and-drop functionality:
ui/drag_drop.pythat provides theenable_file_dropfunction for enabling drag-and-drop file selection on tkinter widgets, with support for file type filtering and robust parsing of dropped file paths.Integration with main application and data import:
main.pyto create the root window usingTkinterDnD.Tk()when available, enabling drag-and-drop support throughout the application. [1] [2]file_handling/data_import.pyto support drag-and-drop file selection in the file dialog entry widget, including extension filtering based on allowed file types. [1] [2] [3]Integration with additional modules:
live_processing/sampler.py) and the two-page wizard (ui/two_page_wizard.py), allowing users to drop files directly onto the relevant widgets for immediate loading and preview. [1] [2] [3] [4]User interface improvements:
These changes collectively enhance the user experience by making file selection faster and more intuitive, especially for workflows involving frequent data imports.