obsidian-excalidraw-plugin
obsidian-excalidraw-plugin copied to clipboard
BUG: Mermaid to Excalidraw Conversion Inverts The Participants for Sequence Diagrams
Environment
- Obsidian version: v1.6.5
- Installer version: v1.5.12
- Operating System: Windows 11 Home 23H2 (OS Build 22631.3810) (originally misreported as Windows 10)
- Login status: logged in
- Catalyst license: none
- Insider build toggle: off
- Live preview: on
- Base theme: dark
- Community theme: Shiba Inu v1.0.8.1
- Snippets enabled: 0
- Restricted mode: off
- Plugins installed: 19
- Plugins enabled: 15
- Open Gate v1.11.6
- Smart Connections v2.1.77
- Style Settings v1.0.8
- Copilot v2.5.2
- Excalidraw v2.2.7
- Mehrmaid v0.0.2
- Diagrams.net v1.0.4
- Diagrams v1.5.0
- Dataview v0.5.66
- Omnisearch v1.23.1
- Folder notes v1.7.22
- Kanban v2.0.51
- Homepage v3.8.0
- Markdown shortcuts v0.4.0
- Markdown Formatting Assistant v0.4.1
Bug Description
The Mermaid to Excalidraw function in the Excalidraw plugin reverses the order of participants when converting sequence diagrams from Mermaid syntax to Excalidraw format.
This issue does not occur on the Excalidraw.com website, suggesting it's specific to the Obsidian implementation.
Steps to Reproduce
- Open Excalidraw plugin within Obsidian.
- Create a new diagram and select the option "Mermaid to Excalidraw".
- Enter the following Mermaid syntax for a sequence diagram:
sequenceDiagram participant A participant B participant C A->>B: Message from A to B B->>C: Message from B to C C->>A: Response from C to A - Observe the generated diagram in Excalidraw, which incorrectly orders the participants from C to A instead of A to C as specified. Note: You can also just paste the code directly into the Excalidraw file, which converts to Excalidraw automatically. Same issue.
Expected Behavior
The participant order in the converted Excalidraw diagram should match the order specified in the Mermaid syntax, i.e., from A to C. It works on Excalidraw.com, as shown here:
Additional Context
The problem persists even after disabling all other community plugins, indicating that it is likely an issue within the Excalidraw plugin itself. The workaround of using Excalidraw.com for conversion and copying the diagrams into Obsidian is time-consuming and not ideal for workflow efficiency.
this is a known issue. I am not planning to work on this. Once Obsidian moves to the newer Mermaid build I can port the updated mermaid-to-excalidraw package to Obsidian, which will fix this issue.
Sounds good, thank you! 👍
Native Obsidian (1.6.7) mermaid rendering does this correctly: