Combine successive collapsed groups into one

Wondering if there exists any prior art for what I’d like to implement.

Long story short, I want to make an very large complex process map reducible to an arbitrarily small number of steps (or, in my case, groups). Right now, a step can be collapsed in place, but if the step next to it is also collapsed, my graph shows two collapsed steps (as you’d expect). My thought was to combine multiple successive collapsed nodes into a single visual element, to tell the user “hey there’s more complexity here” without showing the arity of that complexity. I’m struggling to put what I mean into words - here’s a picture:

So, if I collapse both Process B and Process C, I’d like a single visual element to say “hey there’s something hidden here”. This way I could feasibly collapse an arbitrarily large process map down into 5 or 6 “main” steps… but give the users the ability to drill down.

My thinking right now to achieve this behavior is to create a new group any time a step is collapsed, and put said step into a this temporary group. Then if I have a situation where I get two of these new types of group linked together, I just move the contents the group containing “Process C” into the group that was already made to hold “Process B”. If a user goes to expand one the groups, they’d pick a link entering the group, and whatever steps were directly related to that link would be ungrouped and returned to the view model.

Has anyone approached this kind of problem before? Does this make sense?

Sure, that makes sense. But I wouldn’t bother creating a collapsed Group for each collapsed Node – just change its appearance, perhaps just by using a separate node template and setting the Node.category accordingly.

And I would decide what to do before actually collapsing a node – see if either or both of the connected nodes are already collapsed. If they are, create the group as you describe. Note that if both connected nodes they might both be groups already, and you might need to coalesce both groups into one.

Seems like a good approach.

I run into a litany of other, unrelated, problems before I got to implementing your suggestion, though. If I have trouble I’ll come back and ask more questions on this thread.