Allow links and tooltips on connections
Currently, links and tooltips are ignored when placed on a connection:
a -> b: connects {
link: "https://a-b.io/"
}
In my opinion there are a lot of use cases where additional info on a connection can be useful. Rather than adressing the issue by throwing errors (as described in https://github.com/terrastruct/d2/issues/1482) it would be beneficial to see these features being actually implemented.
An example: I use d2 to document systems and their dependencies. A systeme can refere to external system documetation via link. Connections are often a representation of a certain process. I would happily use links on connections to refer to process documentation.
I would appreciate the ability to have links on connections as well.
For a system A -> B
My use case is to show more details about the connection via tooltips and upon clicking the connection, I would like to link to a URL describing the data communicated between A and B.
my solution https://play.d2lang.com/?l=&script=ggeaVRHId1wVCrq6CpkKunYKlVyZVgo1uSlcCgo2iQoZRalptkoZJSUFVvr65eXleun5-ek5qXrJ-blKdo9adr7f0W-jn2jHVcMFCAAA__8%3D&
https://play.d2lang.com/?l=&script=RJAxDsIwDEV3n-IrexsYWKySuwRo2khURlGlgCgbO9eB63ABroDSJrD9b33Z_u8HjRFSPTqjquA9KoMLkfcMpXAlYD5a5x6MFQEFEWNTXALFWBebWS6T_BNjGg4EAE4EmNXOhqycSDETEeD_8caiD63bqn4cT6x1jLHuRLpjW-9lUOZ9f32ej0Zbk9LLhht9AwAA__8%3D&layout=elk&
I would also really value a solution for this. PlantUML can do it as follows, but I want to use d2, not PlantUML:
@startuml
actor User
participant "Web Browser" as Browser
participant "Web Server" as Server
User -> Browser: Open Home Page [[https://example.com|hi]]
Browser -> Server: GET /home [[https://example.com/home|home link]]
Server --> Browser: 200 OK [[https://example.com/response|response link]]
Browser --> User: Display Home Page [[https://example.com/display|display link]]
@enduml
@bo-ku-ra those links seem broken - do you recall your workaround and could you share it in this thread?
@robinovitch61 unfortunately, i don't remember.
for example
a -- url -> b
url: |md
[connects](https://a-b.io/)
|
i expect a solution to ex3.(https://github.com/terrastruct/d2/issues/2030#issuecomment-2257746765 )(dupe: https://github.com/terrastruct/d2/issues/1633)
a -> b: |md
[connects](https://a-b.io/)
|
See current PR: https://github.com/terrastruct/d2/pull/1955