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

Mermaid sequence diagram not allowing links in participant #4658

Closed
5 tasks done
fidel-ruiz opened this issue Nov 18, 2022 · 1 comment
Closed
5 tasks done

Mermaid sequence diagram not allowing links in participant #4658

fidel-ruiz opened this issue Nov 18, 2022 · 1 comment
Labels
bug Issue reports a bug not fixable Issue concerns an unfixable bug

Comments

@fidel-ruiz
Copy link

Contribution guidelines

I've found a bug and checked that ...

  • ... the problem doesn't occur with the mkdocs or readthedocs themes
  • ... the problem persists when all overrides are removed, i.e. custom_dir, extra_javascript and extra_css
  • ... the documentation does not mention anything about my problem
  • ... there are no open or closed issues that are related to my problem

Description

When clicking the participant test it should open up the actor popup menu. that event is not trigger. I'm using the native support with mermaid with plain mkdocs the rendering was different using html and pre, it was working as expected.

Sharing this simple diagram to showcase the issue

sequenceDiagram
    participant  test
    participant  test2
    link test: github @ https://github.com
    test->>test2: talk to
Loading

Expected behaviour

On click of the actor box should display the menu item.
image

Actual behaviour

Actor Menu are not displayed, they are in the shadowDOM of the svg but the click event is not triggered.

Steps to reproduce

  1. Create a diagram using mkdocs-material with the config explained above

Package versions

  • Python: 3.10.8
  • MkDocs: 1.4.2
  • Material: 8.5.10

Configuration

site_name: IBM Cloud Monitoring Regulated
nav:
  - Home: index.md
theme:
  name: material
  features:
    - navigation.tabs
    - navigation.tabs.sticky
    - navigation.instant

plugins:
  - search

markdown_extensions:
  - attr_list
  - pymdownx.superfences:
      custom_fences:
        - name: mermaid
          class: mermaid
          securityLevel: loose
          logLevel: 1
          format: !!python/name:pymdownx.superfences.fence_code_format

System information

  • Operating system: MAC
  • Browser: Firefox, Chrome
@squidfunk squidfunk added the needs investigation Issue must be investigated by the maintainers label Nov 20, 2022
@squidfunk
Copy link
Owner

Thanks for reporting. When I'm trying to run your example, I'm greeted with an error when opening the browser's console:

Bildschirmfoto 2022-11-20 um 17 45 16

The error manifests when the browser tries to parse and render the SVG markup generated by Mermaid. From the message, I read that Mermaid generated a NaN value, which is invalid for dy. I understand that this might be solely related to Mermaid.js running in Shadow DOM, but since this is a necessary requirements, I need to close this issue as not fixable.

Please report this issue to Mermaid.js.

@squidfunk squidfunk added bug Issue reports a bug not fixable Issue concerns an unfixable bug and removed needs investigation Issue must be investigated by the maintainers labels Nov 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue reports a bug not fixable Issue concerns an unfixable bug
Projects
None yet
Development

No branches or pull requests

2 participants