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 #169

Open
mtd0 opened this issue Dec 12, 2021 · 6 comments
Open

Drag and drop #169

mtd0 opened this issue Dec 12, 2021 · 6 comments
Labels
enhancement New feature or request

Comments

@mtd0
Copy link

mtd0 commented Dec 12, 2021

How to enable this feature (drag and drop), seen on the official Bubbletea website.

https://www.charm.sh/libs/

https://stuff.charm.sh/carts/bubbletea.mp4

@mamachanko
Copy link
Contributor

mamachanko commented Dec 26, 2021

I think you can listen to mouse events in your update function to reposition and add components. https://pkg.go.dev/github.com/charmbracelet/bubbletea#MouseEvent

But it would be nice to showcase that in examples/.

@mtd0
Copy link
Author

mtd0 commented Dec 27, 2021

It would be great if there was an example with this function, so far I have not seen a similar function in another TUI package.

@meowgorithm
Copy link
Member

Hi everyone! It’s really nice to see some interest here. This is part of a fairly big feature that’s currently in development and scheduled for release in 2022. We’ll keep this thread updated as we get closer to a release.

@meowgorithm meowgorithm changed the title TUI - drag and drop Drag and drop Jan 10, 2022
@bashbunni bashbunni added the enhancement New feature or request label Apr 3, 2022
lorenzo-milicia pushed a commit to lorenzo-milicia/bubbles that referenced this issue Mar 5, 2023
@DeluxeOwl
Copy link

Hi, any update to this @meowgorithm ?

@meowgorithm
Copy link
Member

meowgorithm commented Oct 2, 2023

Hi! My apologies for this dragging for so long. This definitely is still something we're working towards—albeit slowly as it's also part of a larger initiative.

In the meantime, I'd have a look at charmbracelet/lipgloss#102 as a viable workaround. We've seen users typically break out the functionality shown in the PR to a local function in their projects.

@idearat
Copy link

idearat commented Oct 8, 2023

Nice to see a recent update on this. Any chance this kind of work, along with anything going on to support "z-index" display layouts could be published in the X repo so we'd have a chance to provide feedback, possible PRs, etc? The alternative is to keep banging along with personal attempts that may be completely out of alignment.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants