terrastruct / d2

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

d2sequence: slightly increase padding between long labels and end of messages #2095

Closed alixander closed 1 month ago

alixander commented 1 month ago

this looks a little squished

Screenshot 2024-09-14 at 5 39 56 PM
bo-ku-ra commented 1 month ago

this is off topic.

i find it difficult to write the big d2 sequence diagrams. why do i have to define the span names in the sequence diagram? the span names don't appear in svg files. (mermaid is automatically uses + and -)

alixander commented 1 month ago

@bo-ku-ra I think it contributes logically.

Spans mean something logically, even if the labels don't appear. E.g. some process.

bo-ku-ra commented 1 month ago

i am annoyed by the many tasks of giving appropriate names that are not displayed.

alixander commented 1 month ago

I think Mermaid's is much less readable. I understand the annoyance at having to come up with names, but I will defer to our decision decisions: https://d2lang.com/tour/design/#readability--prototyping-speed

bo-ku-ra commented 1 month ago

@alixander thank you for your explanation.

i understand readable is a must. but i feel the difficulty of writeable(easy to write). the cause is span name is not displayed. (the span name will be collision with another names.) if d2 has span name display option, i am not annoyed. (e.g. tip help?)

gitGraph TB:

    commit id:"tip help"
    commit id:" "
bo-ku-ra commented 1 month ago

could you note the 'd'. it is difficult to understand what happened to the colliding 'd'. (much less readable)

https://play.d2lang.com/?script=Ks5ILEi1UihOLSxNzUtOjU_JTEwvSszlSuRK4krm4krUS1HQtVNI4gIEAAD__w%3D%3D&

https://play.d2lang.com/?script=Ks5ILEi1UihOLSxNzUtOjU_JTEwvSszlSuRK4krm4kpU0LVTSOLi4kqxUqjmUlBIAvGTuWq5uAABAAD__w%3D%3D&

https://play.d2lang.com/?script=Ks5ILEi1UihOLSxNzUtOjU_JTEwvSszlSuRK4krm4krUS1HQtVNI4uJKsVKo5lJQSAJxk7lquQABAAD__w%3D%3D&

alixander commented 1 month ago

If the span name is displayed by default, it forces people to give them readable labels, which is different from readable variable names. You can make a separate issue to have spans give some tooltip or label, but that's a separate issue

bo-ku-ra commented 1 month ago

ok, never mind...