-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
sequenceDiagram Links #1279
Comments
A quick look at https://github.com/mermaid-js/mermaid/blob/develop/src/diagrams/sequence/parser/sequenceDiagram.jison and also at https://github.com/mermaid-js/mermaid/blob/develop/src/diagrams/gantt/parser/gantt.jison seems to indicate that the latter has it implemented but not the former. I think that answers my first question. What would be the "level of effort" required for somebody who does not have experience with this parsing syntax to implement something like this? |
I would love to link from parts of a sequence diagram to source code:
This way I could add links to file/line number in source code for particular interactions. Taking it further, hidden notes:
The current Note support is very limited in the visual space it is allowed to take up, at least for sequence diagrams. |
Hi, is there any idea if this would be implemented? |
+1 on adding links to notes and messages |
+1 -- this would be really useful |
+1 this would be useful and consistent with other types of diagrams. class A,B internal-link; |
If possible the syntax should be the same as it is in other diagrams. I will look into this over the weekend |
I would also love this. |
This would be super useful. I don't know about everyone else, but I use sequence diagrams for describing what happened for failure analysis, and would like to be able to link to supporting evidence. Things like logs, run books, source code, etc. If not on the messages, then maybe the activations. |
this could also be useful to separate and hide complexity in diagrams something like
and then clicking it would show anchor to the corresponding complexOperation diagram. |
I would love this as well. But mostly so I can link from one diagram to another. Basically having a larger overarching diagram that links to a smaller diagram. Especially if that smaller diagram is used in many places. |
Add a small pop-up of the link. Could be linked to a requirement page. |
+1 for adding links to sequence diagrams. If y'all have any spare cycles, this is a lot of bang for the buck. Takes sequence diagrams to the next level |
+1! |
+1! truly needed. I plan to link messages to data model elements. Imagine that you can click message and see diagram of linked data structure. That would make sequence diagram part of system design rather than standalone set of pictures. |
Found a way to use hyperlink in the sequence diagram. SD - Get Users (Cloud).html
|
Is this feature being worked on? I am looking forward to it. |
While @THONGJI 's solution works I end up with diagrams that are much too wide, because the width of the lines/rects are calculated with the length of the original content and are then fixed. I tried to dig through https://github.com/mermaid-js/mermaid/blob/develop/packages/mermaid/src/diagrams/sequence/ to find where the html elements get escaped, but could not find it. I'm thinking of creating a custom SequenceDiagram type that allows html/svg Elements (mostly interested in honestly) in the messageText. Does anyone know where the html gets escaped/purified? |
Our company goes the markdown way when it comes to documentation, including mermaid diagrams. This feature would greatly help with thinning out procedure descriptions by being able to link directly from the diagram instead of having to add the links below the diagram additionally. This could greatly reduce possible misunderstandings / increase intuitiveness. While technically @THONGJI's workaround may work, it is nothing that could be used as a widespread alternative that I can suggest to other teams that face the same challenge. Maintaining/updating this way poses an additional challenge. This is simply beyond the intended markdown editing scope for many. Is there any update on the progress or at least a timeframe when this issue will be tackled? Any help is greatly appreciated. Thanks and regards |
I've taken a stab at a solution in PR #6158, which add's markdown-style linking capability to arrow message and note text. One known limitation is that the code is not rendering I also may have not done this in the appropriate spots, but I tried to make it reusable in case there's desire to render links in other types of diagrams or parts of sequence diagrams. |
sequenceDiagram Links
In searching through the docs and trying this out it seems that many of the diagrams support both anchor and JS "links." However, I can't find how to add a link to sequenceDiagram. Basically I want a sequenceDiagram to have one or more clickable links to static pages.
Are links already implemented for sequenceDiagram? If so what are the basics and I'll do a PR to add this to the docs?
If links are not part of sequenceDiagrams do you expect this to be difficult to add and if I wanted to PR this in which file would I first poke around to make this change?
Thanks.
The text was updated successfully, but these errors were encountered: