terminal: Fix drag-and-drop in vertical terminal panels#49825
terminal: Fix drag-and-drop in vertical terminal panels#49825SomeoneToIgnore merged 15 commits intozed-industries:mainfrom
Conversation
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Seems that we do not swap items when drag and drop on their tab:
swap.mov
IIRC that tab swapping code is in the pane.rs and the terminal tab as to skip the drop processing.
It would be good to get all such things tested beforehand, as definitely saves time on iterating.
Overall works, nice, we need a few more tweaks to make it good and merge.
|
Went through feedback and did the following -
Also went and made the documentation for handle_drop a little more clear. zed.mov |
26b30fe to
4463b82
Compare
There was a problem hiding this comment.
Great, I see things start to work for the terminal and its tabs!
I have not checked the debugger code changes well enough yet, but let's deal with the general architecture first and then I can come back there — have posted a question below.
One remaining "bug" to consider is the fact that we can drag a tab/file around the terminal tab and it will show different dimming, as if that thing could split the terminal — yet all that happens is that the terminal gets that tab/file's path pasted.
What feels more appropriate is either do a split, or avoid drawing that "split possibility" entirely, now it's quite odd:
odd.mov
Before, we did not have such a mixture of types in the same pane, but now all the edge cases jump at us at once and we'd better cover them all.
Regarding this - I think keeping the regular terminal pane's splitting behaviour (only split for other terminal items under certain circumstances) is favourable - but this runs into the same issue originally causing the dropping inconsistencies where panes created by splits don't have the same characteristics (in this case, the And again, it seems like the |
I guess I might miss something, but from the bird's view, this adjustment seems odd: it's the pane/pane overlay that knows whether we drop on the whole item or on its part? If I'm mistaken somehow, I wonder whether we can consider adding a parameter like "dropping into full item/dropping into part of the item" that will be handled differently by each drop handler. |
allows discerning whether something was dropped onto the pane itself or the tab containing it
if my understanding is correct - the value itself does not matter for the actual test execution, but i want to keep it semantically correct.
14b3e19 to
488f27d
Compare
|
not sure what the deal is with the git history there, oops.. I wrote a test for |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Thanks a lot for all this work!
|
Thanks for all of your advice! |
Closes #49800
Adds
handle_dropto Item & ItemHandle, which allows an active item in a pane to consume drop events before the pane does.Release Notes: