codepod icon indicating copy to clipboard operation
codepod copied to clipboard

Call-graph based inner-scope auto-layout

Open lihebi opened this issue 2 years ago • 3 comments

Features

  • analyze code snippets to understand:
    • the function name
    • the call graph
  • According to the call graph, auto-layout all pods in the selected scope and add arrows.

Something like this:

Screenshot 2022-11-10 at 7 46 51 PM

lihebi avatar Nov 13 '22 02:11 lihebi

I think this's a default option, but more importantly, Codepod should honer user's manual layout, and not to reset it. My personal opinion is "auto alignment" instead of "auto layout".

senwang86 avatar Jul 20 '23 22:07 senwang86

The issue is what if the manual layout has to be broken? Say you want to add a new pod between two pods. Should the two pods be shoveled out to make space for the new pod? This is where we need a good algorithm instead of simply using force which pushes things out of alignment. Can we add some regularization terms on the force?

forrestbao avatar Jul 21 '23 03:07 forrestbao

The issue is what if the manual layout has to be broken? Say you want to add a new pod between two pods. Should the two pods be shoveled out to make space for the new pod? This is where we need a good algorithm instead of simply using force which pushes things out of alignment. Can we add some regularization terms on the force?

It's perhaps a result of my personal habits, I am OK with the way that Mac manages desktop icons (see 00:48 of this YouTube video), and Mac even permits icons to overlap. The phrase "clean up" is what I prefer to use instead of finding a creative way to move the two pods.

senwang86 avatar Jul 21 '23 06:07 senwang86