It's been a while since I showed it here, so to recap, this is how my programming environment has looked for most of 2023. It's an infinite surface where you can move each top-level definition independently of the others.
Using it revealed one problem: sometimes definitions would overlap. If the move bar is occluded, I need to move other nodes to find it.
I mulled it over while resisting the urge to build a window manager.
On Dec 10, after some experiments using Lua Carousel I gave my definitions some minimal physics to nudge other definitions away. Lines of code required: 70.
Using this revealed a new problem: it was hard to move one definition around another. More broadly, my UI -- where things mostly stay fixed unless you move them -- now seemed a lot less calm.
Yesterday I made 2 tweaks, and now things seem pretty decent again. This took 30LoC:
- Resolve collisions only at the end of a drag. Now moving seems to lift the definition above the surface and set it down at its destination.
During the drag I show a shadow where any other definitions would get nudged out.
- Dropping near the original place resolves no collisions. This lets me change my mind after starting a move. A shadow at the original location helps me give up.
Ooh, the process of writing this up gave me an idea to improve things further. Now I only show the shadow if I would actually move anything aside.
Lines of code: 3
Best #DecemberAdventure yet.
This post is part of my Freewheeling Apps Devlog.
Comments gratefully appreciated. Please send them to me by any method of your choice and I'll include them here.