Enhance Graph View with a Tree Layout

Let’s start with something simple.

Multiple parents should not be an issue in tree layout because in family tree, we already have 2 parents to a child object, and we can also have step-parents and adopted parents. As long as a line linking the between the parent and child object in vertical position, parent-child relationship can be illustrated.


As for tree layout

Why should we fixate on the term “tree” with its scope being computing language and its shape?

  • A tree is not defined by its branches, but its seed, trunk and its growing direction. If a tree only grows one branch from its one trunk, it is still a tree; if a tree has many branches, then it is also a tree. If a tree’s branch grows back into the origin, like weeping tree, then it is also a tree.
  • The main characteristic of tree layout is its vertical arrangement. Parent object locates on top and child object locates in a lower position. (Or horizontal arrangements, if we are referring to horizontal tree like Gantt chart)
    – This vertical arrangement occurs from an assigned definition of Y-axis. Family tree respects a generation line; a company map is defined by staff’s position and power. (and Gantt chart respects time.) This definition of Y-axis instructs why any object should and should not take the top position of the tree.
    – In graph, we can create define nodes’ position on Y-axis through any properties involving numbers/time/sequences, and/or inferred hierarchy through relations (Obsidian plugin - Excalibrain’s approach - which I sincerely suggest trying out). In Anytype, we can assign definition on graph, or wherever FR Creation of Relations from scratch is going to take place.
  • Once we set a priority for different governing force of the graph (vertical position as first priority in tree layout), other rules have to set aside for the prior rule. This way loops and their nodes are forced to take a “non-organic” position.
    – For example, if a primary teacher has lots of student, then one of the student is very intelligent and well-educated and become a professor, and later one day the primary teacher took the professor’s course - taking the role of a student to the professor, now we have a “loop”. (Strictly speaking, this is not a loop, instead this is two roles of the same person locating in two different trees).
    – Yet this loop is not definitively relevant. For the primary school tree, only the teacher-student relationship is relevant; for the university tree, only the professor-student relationship is relevant. For a person’s growth, we can assign the individual on top.
    – That’s why graph filter matters. We have to eliminate nodes which are not relevant to the context / Y-axis. Or else we have lot of noises in the graph, making a graph meaningless, hence the nodes cannot take shape and thus there seems to be no tree.
  • Just to clarify, graph is not a widget. Loops, Möbius strips and even wormholes are mathematically and graphically possible to be represented. Since we are not on the loop or strip itself (linear representation), we are forming a 2D or more representation for the loop and we are demonstrating the shape of the loop, recursive nesting / infinitive rendering won’t be happening.

The ultimate goal of feature request is to empower users with non-centre spreading arrangements of nodes. No matter how much we agree or disagree on the definition of tree, this needs still exist because we live in a world with certain degree of order, not just chaos/organic.
– These days organic food also needs to comply to rules and regulations.. even if regulations can be excessively meaningless.


Onto the most furious side of this discussion: whole graph as tree

In nature, we have not just apple tree or weeping tree.. We also have mangrove tree/forest. Mangrove tree’s seedings germinate with its connection to its parent tree. The seed move from a position from above the ground, then into the ground, and then upward into a tree. As mangrove reproduces, a tree becomes a forest.

  • Each mangrove tree lives under its own circumstances.

In graph, as long as we can define what it means by one group of objects, we can establish a “tree” with however shape it organically takes.

  • Collection would indeed be a good definition of a single tree.

If we need to demonstrate multiple positions, we can use other shapes of lines in addition to straight lines. We can use angled line (e.g. the shape of ), or curvature to represent its change of hierarchy and even shows 2+ copies of the same node (e.g. fully coloured nodes and partially coloured nodes) to demonstrate its child and its parent positions in the 2+ respective trees.


Additional information to above posts

Hiding a line/edge is different to hiding an object. With typical plants, we can pick up the seed from Plant A and walk across the whole world and pick a random spot to plant a new Plant B.

  • Plant A is the parent of Plant B
  • However, many times we don’t know need to know this relationship. We only see them as individual Plant, yet the seed and its parent plant is biological and genetically linked.

We cannot use tag filter on object to hide the connection line, because we still need to show both Plant A and Plant B. Unless we are going to give add tag system onto the relation system as well, or we are going to have relation as object, where users can write/edit the properties of relation.