Would love feedback on this new approach to autola...
# share-your-work
s
Would love feedback on this new approach to autolayout that I’m going with for knotend. The basic idea is that a new node can push nodes out of the way, and then I try to iteratively clean up any edges that got rotated by recursively pushing more nodes. Curious if anyone has any ideas on how other folks do this auto-layout inside of a grid, or similar case where you have discrete coordinates, things that can’t overlap.
m
Maintaining the cardinal direction relations across layout updates is a neat idea! I have a subjective piece of feedback re arrows: the arc-like arrows seem to clash a bit with the grid-based notes. It feels to me like PCB-like routing could work better in a grid-like environment (maybe the connections could utilize grid lines between the cells or sth?)
➕ 1
g
Here some user test on myself, explaining what happens (not only the question you asked though).
a
Managing wires is a really interesting thing to ponder (this little gem from elsewhere on this channel made me start thinking about them again — we’d set it aside as a solved thing on our own node-wire programming surface because we’re happy with beziers) We’ve tried, in the early years, multiple approaches including the circuitboard metaphor — realising what’s most important is instant understanding of spatial relationality, and beziers nails all the cognitive checkboxes while doing no worse on the ubiquitous issues (crossed wires, backwards pointing wires, spaghetti) The thing about a bezier is that the eye-brain immediately understands the spatial factors in consideration even when the meaningful ends are off the screen — shallow curve but off at 45 deg? the thing is pretty far away, I need to pan off in *that direction — looking at any part of the curve holds enough clues to know which way to look, how fast to pan, or if you need to zoom out, on the map
👏 1
s
@Marek Rogalski Thanks, I haven’t thought too hard about alternative arrow types as the bezier has been working (I use perfect-arrows plus the algo I described to find a good route). I could probably be smarter about using the known empty space — nodes are always some fixed distance away from one another. As @Arvind Thyagarajan posted, I have seen these really cool alternatives like merging lines, cable ties, etc and it is a certain kind of nerd-snip to want to implement it. However, part of the spirit of this tool is speed and not having to fiddle around with lots of little minute adjustments so I’m first leaning on auto-layout. Do you have any specific examples of tools that you really love that do this?
a
Not off the top of my head, but some animation is a must for eye tracking. A snap re-layout can be disorienting on a graph you have familiarity with
➕ 1
s
@Geert Roumen thanks for the super detailed video! Shortcuts: I should have mentioned in the video the basic shortcuts — Tab adds a child, Shift-Tab adds a parent. I started with the “insert child” that you found (option-shift-arrow) because it shows the autolayout features I wanted to discuss here. If you click Help you’ll see more shortcuts. Flow: Yes its geared towards left-to-right. I’m still debating how user friendly this is to not really support vertical flows as a first class thing. Again since this is a speed oriented tool, I like the constraint of having a single main axis. But maybe I need to support both, potentially as a global setting for the whole graph like “switch to vertical mode” in which case Tab would add a child downwards instead of rightwards, etc. Enter/text-editing: You mentioned being able to use the graph edit shortcuts while you are editing a node. I’ve thought about this and even prototyped it. I’m just not convinced its worth the complexity. For example some shortcuts such as option-shift-arrow (insert child) are also text editing shortcuts (select to next word) so I’d have to decide how to handle those conflicts. You also mentioned that you have to hit Enter in order to start editing a node instead of just typing characters to enter the text. Similarly, this does seem cool but it also means I can’t have shortcuts that are just letters (eg maybe I want in the future to have “c” be a shortcut that switches node colors, or “d” switches to a tool you can use to cut through arrows, etc). Open to the idea, but not sure yet!
👍 1
@Arvind Thyagarajan
shallow curve but off at 45 deg? the thing is pretty far away,
I appreciate the design theory here! I never really conceptualized that but it intuitively makes a lot of sense. I’m always trying to tweak how the bezier should look for very subjective reasons like prettiness, but maybe its just fine the way it is. It communicates the info about relative position.
I’ll work on animation at some point, but part of me worries it will slow down the experience and immediate feedback. I’ve seen some interesting approaches to animation which don’t block the action from happening (eg a node moving 3 columns over). Like in some windowing systems if you maximize a window (say its sitting in your dock) the window will immediately appear at its new location with its final size, but then a ghost rectangle will animate position/location from the dock to the final window size, giving the effect of some movement w/o the user having to wait for the window to show up.
🍰 1