structurizr / dsl

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

Incorrect displaying of multiple urls within a container #130

Closed TheLazzziest closed 2 years ago

TheLazzziest commented 2 years ago

Hello again!

I faced with an issue regarding grouping. I tried to collect components under a set of groups and attach links to each of them. However, once I did this, I found that only the last one was rendered in the container's block. Also, I couldn't click on a group's link when I was on component level inside the container.

Here is the snippet:

test = container "Test" "A container with multiple groups and links attached to each of them" "DSL" {
    group "Main" {
        url https://github.com
        a = component "Counterpart A" "A component for A"
        b = component "Component B" "A component for B"
    }

    group "Another" {
        url https://google.com
        c = component "Component C" "A different component for C"
    }
   ...
}

Expected behaviour

Be able to see multiple links within the container's block. Be able to click on links

Actual behaviour

Only the last link is shown and it's clickable.

simonbrowndotje commented 2 years ago

What's happening here is that the url property of the container is being set twice. There's no support for URLs on groups, so I've added some code that will cause the parser to fail on the above snippet.