plantuml-stdlib / C4-PlantUML

C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
MIT License
6.41k stars 1.1k forks source link

Single column properties or header lead to rendering error #355

Closed chriskn closed 6 months ago

chriskn commented 6 months ago

Hi C4-PlantUML Team,

I might recognize an issue with property rendering. Using single values for property headers (e.g SetPropertyHeader("Property")) or values (e.g AddProperty("Property")) lead to a rendering error. Using single column tables might sound odd, but would be handy to display lists.

Error: grafik

Example for header

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml

' error
SetPropertyHeader("Property")
AddProperty("Prop2", "Value2")
Container(nodeAlias, "Label", "Optional Type", "Optional Description (with custom property header)") {

@enduml

Example for properties

@startuml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Deployment.puml

' error
AddProperty("Prop2")
Container(nodeAlias, "Label", "Optional Type", "Optional Description (with custom property header)") {

@enduml

versions tested: 1.2024.1, 1.2024.4

kirchsth commented 6 months ago

Hi @chriskn,

I created the MR #356 and updated my extended branch with the new implementation. Does it match with your expectation?

Thank you Helmut

chriskn commented 6 months ago

Awesome!

Thank you, Helmut

kirchsth commented 6 months ago

PS.: Hi @chriskn,

not direct related to your issue, but did you know that you can combine elements with Json too (details see discussion)? Maybe it is useful for your structurizr-c4puml-extension It has only one disadvantage that it can be only combined with elements (if you want to use it with Rel() then you would have to add a note to the Rel() and this note could again contains Json)

BR Helmut