structurizr / dsl

Structurizr DSL
https://docs.structurizr.com/dsl
Apache License 2.0
1.41k stars 266 forks source link

Creating a view of elements that only have direct/indirect connection with selected element(s) #376

Closed AndreiPashkin closed 8 months ago

AndreiPashkin commented 8 months ago

Question

Let's suppose I have a big complex diagram and I want to present only the part of it that is related to a relevant element of the system. Is it possible to create a view which would include only those elements of the model that have direct or indirect relationships with the element that I select?

I believe it would have been possible if there was a way to somehow filter by "ancestor" in an expression: https://docs.structurizr.com/dsl/expressions

Or maybe it should be possible currently using expressions like element.parent==<identifier> || element.parent.parent==<identifier> || element.parent.parent.parent==<identifier> || element.parent.parent.parent.parent==<identifier> ....