Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
amitlevy21 opened this issue Aug 13, 2024 · 0 comments · Fixed by #2061
Closed

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

amitlevy21 opened this issue Aug 13, 2024 · 0 comments · Fixed by #2061

Comments

@amitlevy21
Copy link

amitlevy21 commented Aug 13, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant