Add support of mindmaps and timelines

AI-generated summary

The discussion is about adding support for mindmaps and timelines in Discourse. j127 reported issues with getting mindmaps and timelines to work, even after updating to Mermaid v9.4.0. They provided examples of code that work in Mermaid’s live editor or a plain HTML page, but not in Discourse. cmdntd shared a similar issue and linked to a related discussion on meta.discourse.org. TheDarkWizard requested assistance from the team to get timeline, mindmaps, and other features working. sam replied that an update is forthcoming, linking to a GitHub pull request. TheDarkWizard expressed gratitude towards sam for the update.

This is great. It doesn’t seem to work with mindmaps and timelines though. I tried forking it and updating to Mermaid v9.4.0, but I’m still getting an error. This code works in their live editor, but not in Discourse, even with Mermaid v9.4.0:

mindmap
Root
    A
      B
      C

also this one, but it doesn’t work in their live editor either, which appears to be running v9.3.0. It does run in a plain HTML page using v9.4.0.

timeline
    title History of Social Media Platform
    2002 : LinkedIn
    2004 : Facebook : Google
    2005 : Youtube
    2006 : Twitter

If I figure it out I’ll post back here.

2 Likes

This needs upgrade to able to use new mermaid js features.
I have the same issue:

2 Likes

@team Any chance we could get Timeline, mindmaps and such working or at-least point in the right direction to get it working?

Update should land shortly:

https://github.com/discourse/discourse-mermaid-theme-component/pull/17

6 Likes

Thank you Sam :)!

1 Like