Repository navigation
Lists: TreeDrag is public, so a drop past the tree's rows names the dragged node - #9
Merged
Raiden-MeixElysia merged 1 commit intoNov 2, 2026
Conversation
…ragged node ELYTerminal's Files drags a node onto its terminal, whose drop listener matches gpui's drag value by type, so the type must be public. The owner stays private: a drop back inside the tree stays the tree's own move.
4 tasks done
Raiden-MeixElysia
added a commit
to ELY-Open-Source/ELYTerminal
that referenced
this pull request
Nov 2, 2026
A file or folder dragged from the Files panel and dropped on the terminal types its absolute path at the cursor, kept literal for the session's shell and followed by a space, as a dropped OS file does. Ely's Tree rows already drag a TreeDrag value, now public in ELY-Open-Source/Ely-GPUI-Components#9; the terminal takes a second on_drop for it, gpui matching each drop by its type, and the workspace resolves the node's key through Files and types the path with the drop's quoting. The Ely dep is pinned by rev to the PR's branch until it merges.
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.
What and why
ELYTerminal wants its Files panel's tree rows to be draggable onto its terminal: dropping a node there types the file's path at the shell. gpui dispatches an in-app drop to the listeners whose type matches the drag value's type exactly, and
Tree's drag valueTreeDragispub(crate), so an embedder's drop target can never receive it.This makes
TreeDragpublic, withkey()andlabel()accessors, exported fromlists. The row still drags exactly as before; a drop back inside the tree stays the tree's own move, sinceownerremains private and the internal handlers keep matching on it.A consumer looks like:
Notes
mainhas since split into crates; the same change wants porting there (the type lives in the tree crate), which I can do in a follow-up if this shape is right.How it was tested
cargo fmt -- --checkpasses.