goadesign / model

Create your software architecture models and diagrams in Go.
MIT License
332 stars 19 forks source link

`AutoLayout()` should lay out `External()` elements outside the enterprise (group) boundary #648

Open abhakhi opened 3 months ago

abhakhi commented 3 months ago

Looks like AutoLayout() currently shows External() elements within the enterprise (group) boundary in the SystemLandscapeView() by default. Is there any way to show them outside (without manual positioning)? If not, would be nice if it shows such elements outside the boundary instead, if the boundary is visible (EnterpriseBoundaryVisible()).

raphael commented 3 months ago

That makes sense, @dvictor - is that doable?

dvictor commented 3 months ago

@raphael, if I remember correctly, we only do auto-layout on our side in the editor. The AutoLayout() DSL is for STZ only. And we don't have control over their layout.

@abhakhi, how do you use Goa model tool?

dvictor commented 3 months ago

As for our editor Auto Layout button, unrelated to the AutoLayout() DSL, indeed it doesn't consider grouping in neither ContainerView nor in SystemLandscapeView. There's support in Dagre for compound graphs, so we could give it a try.

abhakhi commented 3 months ago

@abhakhi, how do you use Goa model tool?

@raphael, I am calling the AutoLayout() DSL from my model.go and viewing the model in browser with mdl serve. I did not know it is for STZ only. Now I do realize that it never worked at all (for the editor) and I had (got used) to refreshing the browser (editor) and clicking the Auto Layout button every time I updated the design.

dvictor commented 3 months ago

Thanks, @abhakhi , that makes sense. When time permits, I'll look into adding this grouping functionality. Thank you for submitting the bug, @abhakhi!

Victor.

raphael commented 3 months ago

Thank you for looking into it @dvictor !