Skip to content

Cannot Create Edges from Parent Groups in Architecture Diagrams #7211

@justinmchase

Description

@justinmchase

Description

If you have a group in a group and want to create an edge for the outter groups there doesn't appear to be a way to do this.

Steps to reproduce

  1. Create the diagram from the below example code

Screenshots

This is a screenshot of the diagram rendering a {group} edge but the group is in a group.

actual rendering (with red markup)

Image

expected result

Image

Code Sample

architecture-beta
    group g1
    group g2 in g1
    group g3
    group g4 in g3

    service a(server)[A] in g2
    service b(server)[B] in g4

    junction j

    b{group}:T -- B:j
    a{group}:B -- T:j

Setup

  • Mermaid version: latest
  • Browser and Version: Chrome

Suggested Solutions

I like that the edge is from the service still so that the line is still effectively in alignment with the service but you need a way to be able to describe which group the line begins from.

I would probably say that the syntax should be {serviceId{group|groupId}} such that the below graph would work:

architecture-beta
    group g1
    group g2 in g1
    group g3
    group g4 in g3

    service a(server)[A] in g2
    service b(server)[B] in g4

    junction j

    b{g3}:T -- B:j
    a{g1}:B -- T:j

Where b{g3} is currently invalid syntax but is supposed to be saying "not just the group b is directly in but g3 specifically"

Otherwise...

  • b{group{group}}
  • b{group[1]}
  • b{group+1}

Another option would just to be able to define edges directly from group to group, I'm not entirely sure how you would align edges maybe you do the opposite...

g3{b}:T -- B:j

Additional Context

In my case the architectural comonents

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: TriageNeeds to be verified, categorized, etcType: Bug / ErrorSomething isn't working or is incorrect

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions