C4PlantUMLExporter not following C4-PlantUML best practices with c4plantuml.tags true
cc-stjm opened this issue · 1 comments
Description
As part of plantuml-stdlib/C4-PlantUML#342 there are some suggestions on how to improve the exporter to better match how the C4-PlantUML library expects to be called.
This is based on using the property c4plantuml.tags true
$borderstyle should use lowercase values "solid",... (or I would even prefer the macros SolidLine(),...)
if $borderThickness="1" should not be displayed in the legend then it should not be set otherwise it is assumed it has a special meaning and therefore it is added to the legend
(not relevant for the concrete problem, but maybe it can be changed too)
instead of "top to bottom direction" it should use LAYOUT_TOP_DOWN()
instead of "left to right direction" LAYOUT_LANDSCAPE(), in special LAYOUT_LANDSCAPE() offers a special implementation that the directions of the relations are correct
It's possible that that issue might create further recommendations too - it's about ensuring the legend display doesn't include unexpected text.
(Note: I'd be happy to work up a merge request for this if you agree with the proposed solutions)
Steps to reproduce
Problem is demonstrated using the c4-plantuml renderer on https://structurizr.com/dsl with the following plan. (Only addition is the property c4plantuml.tags true
workspace {
model {
user = person "User" "A user of my software system."
softwareSystem = softwareSystem "Software System" "My software system."
user -> softwareSystem "Uses"
}
views {
systemContext softwareSystem "SystemContext" {
include *
autoLayout
}
properties {
c4plantuml.tags true
}
styles {
element "Software System" {
background #1168bd
color #ffffff
}
element "Person" {
shape person
background #08427b
color #ffffff
}
}
}
}
Screenshot
(Image is from the diagram in "steps to reproduce")
Code sample
workspace {
model {
user = person "User" "A user of my software system."
softwareSystem = softwareSystem "Software System" "My software system."
user -> softwareSystem "Uses"
}
views {
systemContext softwareSystem "SystemContext" {
include *
autoLayout
}
properties {
c4plantuml.tags true
}
styles {
element "Software System" {
background #1168bd
color #ffffff
}
element "Person" {
shape person
background #08427b
color #ffffff
}
}
}
}
Configuration
Demonstrable on https://structurizr.com/dsl v2.1.1
Severity
Minor
Priority
I have no budget and there's no rush, please fix this for free
More information
No response
I've fixed the two issues related to borderStyle
and borderThickness
... the layout related suggestions will require some more thought since they may look different to existing exports.