add animated layout preview on tile drag-and-drop - #118
Conversation
|
I'm fairly sure I've managed to fix the edge case with grid layouts. Here's a new video: Screen.Recording.2026-03-13.at.19.53.22.mov |
|
Hi @emilk! Thanks very much for the review, I will clean up these small issues now |
|
I think that should do it. Let me know if you spot anything else :) |
|
I'm trying this out with rerun, but I'm hitting some weird things (tabs disappearing on drag) that makes me hesitant to merge this PR without taking a deep dive into it, which I unfortunately don't have time for today. At the same time, I need to publish a new |
|
@emilk Yep, of course, completely understand. I will try it out in rerun myself early next week and see if I can reproduce. Let me know if you find any other issues when you get around to a proper code review :) |
|
Please enable the flag to allow maintainers to push commits to the PR (I had to do this instead right now: #139) |
|
Thanks for fixing those issues, and apologies for not doing it myself... this slipped off my radar with a combination of uni exams and my internship starting! Excited to see this in It doesn't seem like I can enable maintainer access as the fork I created is under an organisation. I have instead invited you to collaborate on the fork, please let me know if that works :) |
|
I suspect there is a much simpler way to accomplish this effect, by holding two trees (the pre-edit tree, as |
This PR adds an animated layout preview during the drag-and-drop of tiles. All tiles smoothly animate to show where they would end up if dropped at the current position. This replaces the current highlighted drop-zone with a full layout preview.
The new behaviour is optional based on the new
live_drag_preview()in theBehaviourtrait. Each frame, the tree speculatively applies the pending move and calculates the layout before restoring the state.Potentially useful details:
MoveJournaltracks tile ID remappingThis is possibly not the best way to implement this feature, and there are certainly some edge cases I have missed or was unable to fix (see attached video below). I would appreciate some advice/code review from someone who has more experience with
eguiand would be more than happy to fix these edge cases :)Screen.Recording.2026-03-13.at.13.15.49.mov