terrastruct / d2

D2 is a modern diagram scripting language that turns text to diagrams.
https://d2lang.com
Mozilla Public License 2.0
16.54k stars 414 forks source link

everything disappears in sequence_diagram. #2103

Open bo-ku-ra opened 2 days ago

bo-ku-ra commented 2 days ago

OK https://play.d2lang.com/?script=HMohDsJQEAZh_59ish4OsAKHhTTFk11YWgQ8aIMivTspYpIRX985ZnwF8xivcuZ6f-p5qfP1HsMUDwlCkOuk_ykcjqe9Y7fWMiYTLFqkvtsmmx1jG2pNvwAAAP__&

SQ: "" {
  shape: sequence_diagram

  a
  b

  b: {
    NOTE:"foobar"
  }
}

SQ.b -> hogehoge

NG https://play.d2lang.com/?script=HIoxCsJQEAX7d4rh9-YAW9jZKiH2sqtrYqFfE6wkd5efYmBgZuiNUvgJlsnfaSz5-ebrmpfbw8fZnxK4IJqEbSscT-eDUe61hs9FsGqVhr6LriV2e6Y6ZkP_AAAA__8%3D&

SQ: "" {
  shape: sequence_diagram

  a
  b

  b: {
    NOTE:"foobar"
  }
}

SQ.b.NOTE -> hogehoge
bo-ku-ra commented 2 days ago

i believe this is due to the way SPAN is described c.f. https://github.com/terrastruct/d2/issues/2095#issuecomment-2351236792

bo-ku-ra commented 2 days ago

OK https://play.d2lang.com/?script=JIoxDsJAEAN7v2J0PXnAFXS0oCj0aBeWhAIOElGh_B0tFJZszwx9pRQ-gmWyZ1SWeL3jcY7T5WbjbHcJTOBZvP5U2B-Ou0q5tuY2F8GaGpst3iXTKg199x95T22MjL4BAAD__w%3D%3D&

SQ: "" {
  shape: sequence_diagram

  a
  b

  b: {
    NOTE: "foobar"
  }
  a -> b.NOTE
}

SQ.b.NOTE -> hogehoge

i think the sequence_diagram is one of SHAPE, but its description is inconsistent (https://github.com/terrastruct/d2/issues/2102#issue-2531078148)

expected image