Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Drag and drop functionality #3088

Open
frankhuurman opened this issue Jan 11, 2025 · 3 comments
Open

Drag and drop functionality #3088

frankhuurman opened this issue Jan 11, 2025 · 3 comments
Labels
enhancement New features, or improvements to existing features. not quite right The idea or PR has been reviewed, but more work is needed.

Comments

@frankhuurman
Copy link

What is the problem or limitation you are having?

I've built a Streamlit webapp for my girlfriend's business about 3 years ago and would love to rebuild it with native UI components that Toga provides so that she doesn't have to launch a powershell script that launches the Python webapp in the browser.

But for this I do need a way to drag files into the application and be able to do something with the filenames/paths & contents.

Does Toga already support this in some way and if not, I would love to request this as a feature.

Describe the solution you'd like

Drag and drop functionality within a Toga application

Describe alternatives you've considered

Other frameworks, or using Tkinter as a fallback which doesn't look great.

Additional context

No response

@frankhuurman frankhuurman added the enhancement New features, or improvements to existing features. label Jan 11, 2025
@freakboy3742
Copy link
Member

Completely agreed that DnD is a feature that Toga should support. That means there's 2 questions:

1. What does that API look like?

This needs someone to do research on how DnD is implemented on various platforms (most notably desktop). What feature set is plausible cross platform? What does the API for implementing that feature set look like?

My immediate guess is that there will be some sort of of on_drag_start and on_drop_complete handlers added to widgets that accept drag and drop events, with the existence of the handlers enabling that support. The drag handlers would providing some sort of generic representation of the content being dragged. However, I have no idea what that content format looks like, how DnD targeting is enabled on a per-widget/window/app basis, or how that manifests in a cross-platform way.

2. Who is going to implement it?

Right now, this isn't a high priority for me personally. We publish a roadmap every quarter indicating the areas where we're intending to focus. DnD isn't on our 2025 Q1 roadmap; if I had to guess right now based, it won't be on any 2025 roadmap, either.

That means either someone else needs to step up and volunteer to do the work for (1), or someone needs to bring money to pay someone to do the work required by (1). If someone has the financial resources, that could alter the official BeeWare roadmap - but we're also happy to review work from other contractors.

@freakboy3742 freakboy3742 added the not quite right The idea or PR has been reviewed, but more work is needed. label Jan 12, 2025
@dkarvan8
Copy link

dkarvan8 commented Feb 1, 2025

Hi, I want to work on this issue. Can you assign it to me?

@mhsmith
Copy link
Member

mhsmith commented Feb 1, 2025

We don't use the GitHub assignment feature – posting a comment is enough.

You've posted this comment on 5 issues today, but I recommend you only work on one at a time until you're more familiar with the project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New features, or improvements to existing features. not quite right The idea or PR has been reviewed, but more work is needed.
Projects
None yet
Development

No branches or pull requests

4 participants