Skip to content

sequence diagram: spans and notes cannot be used together with icons #2056

@amitlevy21

Description

@amitlevy21

Hi,
I want to use icons in my sequence diagram:
while this works:

My Diagram: {
  shape: sequence_diagram
  svc_1: {
    icon: https://icons.terrastruct.com/dev%2Fdocker.svg
    shape: image
  }

  a: A
  b: B

  svc_1 -> a: do with A
  svc_1 -> b: do with B
}
image

The following does not:

My Diagram: {
  shape: sequence_diagram
  svc_1: {
    icon: https://icons.terrastruct.com/dev%2Fdocker.svg
    shape: image
  }

  a: A
  b: B

  svc_1.t1 -> a: do with A
  svc_1."think about A"
  svc_1.t2 -> b: do with B
}

the error:

err: failed to recompile: /Users/amitlevy/Dev/d2/bug.d2:11:7: image shapes cannot have children.
err: /Users/amitlevy/Dev/d2/bug.d2:12:7: image shapes cannot have children.
err: /Users/amitlevy/Dev/d2/bug.d2:13:7: image shapes cannot have children.

would be great if we can have spans: https://d2lang.com/tour/sequence-diagrams#spans and notes https://d2lang.com/tour/sequence-diagrams#notes working with icons in a sequence diagram

Thanks!

I have tested groups, they work without issues.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions