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

Mermaid2 diagrams with mkdocs annotations shows half the (+) button and nothing happens when you click it #4865

Closed
elgalu opened this issue Sep 21, 2023 · 3 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@elgalu
Copy link
Contributor

elgalu commented Sep 21, 2023

Description

Originally reported at fralau/mkdocs-mermaid2-plugin#88

The mkdocs.yml -> features: content.code.annotate almost works except that the button is half-visible and more importantly click doesn't trigger the annotation even with securityLevel: loose

Steps to reproduce

Please find a minimal working example with code at:
Demo: https://elgalu.github.io/mermaid2-content.code.annotate/
Code: https://github.com/elgalu/mermaid2-content.code.annotate/

Screenshots

Demo: https://elgalu.github.io/mermaid2-content.code.annotate/

Code Sample

Code: https://github.com/elgalu/mermaid2-content.code.annotate/

Setup

@elgalu elgalu added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Sep 21, 2023
@Yokozuna59
Copy link
Member

@elgalu Hi, the given code isn't a valid mermaid code, you have to escape (1) in the node title using doable quotes:

graph TD
A["Client (1)"] --> B[Server]
graph TD
A["Client (1)"] --> B[Server]
Loading

@elgalu
Copy link
Contributor Author

elgalu commented Sep 22, 2023

Thanks for the feedback @Yokozuna59 , I escaped as suggested elgalu/mermaid2-content.code.annotate@5dcb326 but the described issue with content.code.annotate remains.

@jgreywolf
Copy link
Contributor

Given this:

Annotations are not supported in Mermaid diagrams.
Reason: with Mermaid, you're in SVG space, which has entirely different layout and positioning semantics than HTML. It is probably possible to make it work, but from my research trying to make tooltips work in SVG, it's quite an effort.

I am going to close this issue as wont fix, since annotations are not supported

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

3 participants