I have successfully implemented a new diagram type (Usecase Diagram) in my fork/PR (#7530).
The Current State:
- ✅ Parsing/Rendering: The diagram renders correctly when code is typed into the editor (see attached screenshot).
- ❌ UI Discovery: The diagram does not appear in the "Sample Diagrams" selection menu at the bottom left of the Live Editor.
I am looking for guidance on where this menu is located. I need to ensure that once a new diagram is added to the core, it is also discoverable as a sample for users to explore.
It appears that the core Mermaid engine recognizes the usecaseDiagram keyword and invokes the correct renderer. However, the Live Editor's sample selection logic seems to rely on a separate registry or a list of "supported" types that I have not yet updated.
-
Is the Sample Diagrams list generated dynamically from the Mermaid Registry, or is it a hardcoded list within the mermaid-live-editor repository?
-
Are there specific JSON or TS configuration files in the packages/mermaid or the site's docs that govern which diagrams are featured in the "Samples" section?
-
What is the standard procedure for adding a new "Sample" (including the default code snippet) so it appears alongside Flowchart, Sequence, etc.?
I have successfully implemented a new diagram type (Usecase Diagram) in my fork/PR (#7530).
The Current State:
I am looking for guidance on where this menu is located. I need to ensure that once a new diagram is added to the core, it is also discoverable as a sample for users to explore.
It appears that the core Mermaid engine recognizes the
usecaseDiagramkeyword and invokes the correct renderer. However, the Live Editor's sample selection logic seems to rely on a separate registry or a list of "supported" types that I have not yet updated.Is the Sample Diagrams list generated dynamically from the Mermaid Registry, or is it a hardcoded list within the
mermaid-live-editorrepository?Are there specific
JSONorTSconfiguration files in thepackages/mermaidor the site'sdocsthat govern which diagrams are featured in the "Samples" section?What is the standard procedure for adding a new "Sample" (including the default code snippet) so it appears alongside Flowchart, Sequence, etc.?