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

Add mermaidjs 10.2.3 #1957

Merged
merged 12 commits into from
Jun 13, 2023
Merged

Add mermaidjs 10.2.3 #1957

merged 12 commits into from
Jun 13, 2023

Conversation

bollwyvl
Copy link
Contributor

@bollwyvl bollwyvl commented Mar 3, 2023

Adds mermaidjs diagram support, which is the most commonly-available, open source ascii-based diagram tool, supporting a large number of broadly-useful diagrams.

The motivation is that this syntax ```mermaid is supported natively by a large number of existing platforms under a consistent syntax, most notably GitHub, which theoretically we track.

References

Changes

  • adds a CDN URL for mermaidjs
  • adds via the recommended <script type="module"
  • only load/start mermaid assets when mermaid actually found

User-facing changes

  • example output with rich display and markdown cells
  • this would not yet be supported in
    • notebook classic
    • bespoke renderers of notebooks, such as the GitLab notebook viewer
    • other jupyter clients (beyond any linked PRs above)

@bollwyvl bollwyvl changed the title add mermaidjs 10.0.2 add mermaidjs 10.2.3 Jun 12, 2023
@bollwyvl
Copy link
Contributor Author

Will look into the failing tests.

@maartenbreddels
Copy link
Collaborator

Nice to see this happen, we also have support for mermaid in solara, so we will keep an eye on this and see if we can track the same version number.

Copy link
Contributor

@blink1073 blink1073 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@blink1073 blink1073 enabled auto-merge (squash) June 13, 2023 10:06
@blink1073 blink1073 disabled auto-merge June 13, 2023 10:11
@blink1073 blink1073 merged commit 3dd3a67 into jupyter:main Jun 13, 2023
@blink1073 blink1073 changed the title add mermaidjs 10.2.3 Add mermaidjs 10.2.3 Jun 13, 2023
@bollwyvl
Copy link
Contributor Author

Cool. Over on the Lab PR I'll be working on bringing across more of the accessibility features, and will update here as appropriate.

Perhaps we'll be able to eventually reuse some of the code/style which are already highly shared, and provide a clean, offline files-on-disk install/deployment with e.g. etc/share/jupyter/static/mermaid or something, making it easier for multiple packages to have consistent versions and be more respectful of privacy concerns.

@franzhaas
Copy link
Contributor

thanks for the mermaid suport. It did not work for me out of the box wit reveal, but after changing from "plain" mermaid to mermaid js plugin it does work for me.

please review my changes here.:
#2120

Is this a sensible improvement? Or did i make a stupid mistake and the original solution would work if i made a slight change...

Best regards,
Franz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants