goat icon indicating copy to clipboard operation
goat copied to clipboard

Link in goat diagram

Open skycluster opened this issue 2 years ago • 9 comments

Is there an easy way to include a link in a goat diagram? what I found so far: all major browsers support [XLinks in SVG]. So it seems doable for goat as it builds an svg. Though not much documentation is available for goat. If there is no native solution could you advise on how to approach the development of such a feature in goat or is it a “dead-end” and such a feature is not approachable by design. Goat defines runes in the source code, should there be one for links?

skycluster avatar Jan 24 '24 06:01 skycluster

I had such a feature working locally at one point, but set it aside while working on bug fixes.

Can you tell us about your use case?

dmullis avatar Feb 03 '24 00:02 dmullis

I'm building a graph of university courses which are interdependent. Meaning some are basic, others could be taken only after the prerequisite. Relations for one could include several "parent" and "child" nodes. I was thinking on using links in it for navigation between courses on a website.

skycluster avatar Feb 03 '24 06:02 skycluster

Does this mean that each of several links out from the Goat graph would point to some document containing details about a particular course?

dmullis avatar Feb 04 '24 04:02 dmullis

Yes, indeed. The links should lead to pages which provide information for each course represented on the diagram with their short names. Like: E101 should point to a basic course and E102 should point to the other (but it could be taken only after the 101), but their relation is meant to be visible by a connection with an arrowed line. E201 may be independent without any prerequisite and start a new tree of connected courses and so on. E202 might be dependent on E101 and E201 at the same time.

skycluster avatar Feb 04 '24 07:02 skycluster

Okay, I have a first cut limping along in my local tree, so after some cleanup I'll push it to my fork. As @blampe seems to have moved on from Goat maintenance, you'll need to get it from there: https://github.com/dmullis/goat

dmullis avatar Feb 07 '24 05:02 dmullis

Great news, thank you!

skycluster avatar Feb 07 '24 14:02 skycluster

I've pushed a (partial) solution to https://github.com/dmullis/goat .

"Partial" because it appears that on sites like github.com, which "sanitizes" uploaded SVG, no outbound links from the diagrams are possible. So, you'll need a more permissive server.

dmullis avatar Feb 17 '24 02:02 dmullis

Very nice! Thank you! I'll try it - the project does not depend on a well-known and popular server.

skycluster avatar Feb 17 '24 06:02 skycluster

Fix mentioned above will be preserved in https://github.com/dmullis/goat/tree/github-test, rather than the main branch of my fork.

dmullis avatar Jun 11 '24 01:06 dmullis