termgraph icon indicating copy to clipboard operation
termgraph copied to clipboard

Support for single-line / multi-line data associated with each node

Open epage opened this issue 3 years ago • 6 comments

Including all of the data inside of the node would be cumbersome but if it supported information to be to the side, like with git log --graph, it'd be a big help

epage avatar May 17 '22 14:05 epage

Im currently having a bit of a hard time figuring out how exactly that should look, could you maybe create a simple example on how you want that to look with just a quick mock up. Especially if you have multiple Nodes on one horizontal line/level

Lol3rrr avatar May 17 '22 16:05 Lol3rrr

Im currently having a bit of a hard time figuring out how exactly that should look, could you maybe create a simple example on how you want that to look with just a quick mock up.

$ git log --graph --oneline
*   6d6dd9d9b (HEAD -> master, upstream/master) Auto merge of #10665 - cuviper:patch-1, r=ehuss
|\
| * 51106c940 Correct the release dates for 1.61 and 1.62
|/
*   3f052d8ee Auto merge of #10659 - Muscraft:prestabilization-inheritance-docs, r=epage
|\
| * 6892cc302 pre-stabilization documentation for workspace inheritance
* |   fbe2e689a Auto merge of #10658 - epage:fix, r=ehuss
|\ \
| * | dde4a1c38 test: Make curr_dir work in/out of workspace
| |/
* |   526f7473f Auto merge of #10660 - ehuss:fix-no_cross_doctests-race, r=weihanglo
|\ \
| * | e95207094 Fix no_cross_doctests race condition.
| |/
* |   cf09f37d2 Auto merge of #10657 - hi-rustin:rustin-patch-docs-typo, r=weihanglo
|\ \
| |/
|/|
| * f6d4039c2 Fix typo
|/
*   23ae8a0a0 Auto merge of #10650 - epage:install, r=ehuss

Especially if you have multiple Nodes on one horizontal line/level

They would need to be staggered

epage avatar May 17 '22 16:05 epage

Im not quite sure how easy it would be to add the staggered layers, but what about something like this

(1)     1: Some more information
 |
 +---+
 |   |
(2) (3)  2: Some information about 2
         3: Some information about 3

Lol3rrr avatar May 17 '22 17:05 Lol3rrr

  • I worry that will be harder to follow
  • I already want glyphs that communicate state in the graph that are non-unique (#2) which won't work with identifier which annotation they go with

epage avatar May 17 '22 17:05 epage

Okay I think Im going to tackle #2 first and then will see how this could fit into it

Lol3rrr avatar May 17 '22 17:05 Lol3rrr

This extra formatting could be added as an "optional" function in the NodeFormatter trait added for #2. This would return an Option and have a default implementation that just returns None to indicate that no extra information is needed.

Lol3rrr avatar May 17 '22 20:05 Lol3rrr