Skip to content

Standardize Inner Section Representation Across Diagram Types #34

@mitchspano

Description

@mitchspano

Description

Currently, the InnerNode interface in uml_generator.ts suggests a nested node structure, but in practice, Graphviz and Mermaid diagrams render these as <hr/> delimited sections within the main node. PlantUML's implementation differs from this pattern, leading to inconsistent visualization across diagram tools.

Current Implementation

export interface InnerNode {
  id: string;
  type: string;  // Used as bold text header
  label: string; // Used as underlined text
  content: string[]; // Used as regular text content
}

Proposed Changes

  1. Rename InnerNode to NodeSection to better reflect its actual usage
  2. Refactor the interface to clearly indicate text styling:
export interface NodeSection {
  id: string;
  boldText?: string;      // Currently 'type'
  underlinedText?: string; // Currently 'label'
  contentLines: string[];  // Currently 'content'
}
  1. Update PlantUML renderer to match Graphviz/Mermaid section-based rendering

Affected Files

  • src/main/uml_generator.ts
  • src/main/plantuml_generator.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions