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

support link on connections #1827

Closed
alixander opened this issue Feb 4, 2024 · 2 comments
Closed

support link on connections #1827

alixander opened this issue Feb 4, 2024 · 2 comments
Labels
good first issue Good for newcomers

Comments

@alixander
Copy link
Collaborator

alixander commented Feb 4, 2024

the text points to whatever the link is

@cyborg-ts cyborg-ts added this to D2 Feb 4, 2024
@alixander alixander changed the title when entire text of a connection is a URL, make it clickable support link on connections Feb 4, 2024
@alixander alixander added the good first issue Good for newcomers label Feb 4, 2024
@alixander
Copy link
Collaborator Author

In the compiler, the Link keyword is applied here. Just need to do that for Edges too.
https://github.com/terrastruct/d2/blob/master/d2graph/d2graph.go#L131

And then the exporter needs to take that value from the compiler and read it, like Shape does:
https://github.com/terrastruct/d2/blob/master/d2exporter/export.go#L198

And then rendered in the SVG with an tag:
https://github.com/terrastruct/d2/blob/master/d2renderers/d2svg/d2svg.go#L909

@huyz
Copy link

huyz commented Sep 5, 2024

Dup of #1497

@github-project-automation github-project-automation bot moved this to Done in D2 Dec 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
Status: Done
Development

No branches or pull requests

2 participants