This is important for switching to parent and grandparent nodes and making sense of where we are.
A good reference would be Notion's implementation.