Closed knsv closed 3 months ago
Great initiative! Just curious, Will there be a plan to define sub-diagrams that are of different types? For example, use flowchart and blockdiagram within the main diagram?
@asknet that feature will not be part of this change, but this and the new parser lays part of the foundation that's required to support multiple diagrams.
Latouts
Description
Objective: Streamline and enhance diagram rendering across various diagram types in Mermaid.
Current Challenge: There is noticeable duplication in functionality among different diagram types. Several graph-based diagrams share common features in rendering, but these are implemented separately in each diagram type.
Proposed Solution:
Unified Layout Engine: Implement a singular layout engine for all graph-based diagrams.
Common Renderer: Develop a common renderer for all graph-based diagrams.
Diagram Implementation: The attached Mermaid flowchart illustrates the proposed architecture, showing how different diagram types (e.g., Flowchart, State, Class, ER, Sequence, Block, etc.) will interact with the unified layout engine and renderer.
Expected Outcomes:
Overall, this will make the maintenance of diagrams much more manageable and will decrease the effort of adding new layout algorithms and diagram types.