Support for Component constant width

+1 vote
asked Jul 10, 2019 in Wanted features by diagramBob (220 points)

Hi,

I am trying to PlantUML-ize some big diagrams and face the challenge of such diagram:

http://www.plantuml.com/plantuml/png/TOzBQm913CVFpQS8U-b9iFGgOh5B4VeGjxQ5qaDmmsvm9YCpuqEAtxswLPojz1P-lpp-6OH8FYwj0I1ZtDhAHhG227FH1NcogAxam0kywIRGaywFCA61B0yDXV0kPQmn-YKdreecyhRR6fqvkt3A6l4R416lcrqds8pqUld7Qx_VhFtjiQ99osdh3c1sk8E4noBM4YIis6-Dqme123kVjPGbwrVdZmNmF8kabM7CzWVpoVFT8nRvv6qqp8iCJoae86yEQQ_EqRCNYdNM8jFfw3vhqYPmDCOL6IafYjCBMpmL-42HrxIzS6FQsaDH_UDpIsBETWVG_YxzUnyVOC1QBgtv0G00

I noticed that Class width works well. Was proposed here: https://forum.plantuml.net/1296/constant-width-of-class?show=1300#a1300

Proposal: Would be great to use similar approach for Component.  The support for stereotypes would make it super flexible and minimize the impact to existing codebase as well.

My diagram with proposal is below.
Classes look cool with similar size, Would be great to have components laid out same sizes too ! 

@startuml

allowmixing

skinparam nodesep 10

skinparam ranksep 10

skinparam sameClassWidth true

skinparam minClassWidth 300

skinparam component {

    'sameComponentWidth<<EXT>> true

    'minComponentWidth 300

}

class a 

class thisisverylong 

a -[hidden]- thisisverylong

rectangle "EXTERNAL SERVICES" <<EXT>> as ext {

component "Oath"

component "UUID"

    component "IP validation"

    component "SMS Gateway"

    component "Payment gateway"

    component "Email gateway"

}

thisisverylong -[hidden]- ext

@enduml

1 Answer

0 votes
answered Jul 10, 2019 by plantuml (295,000 points)
That's a nice suggestion.

We are currently working on adding styles on PlantUML. This would allow to overcome some actual limitations with skinparams.

See http://wiki.plantuml.net/site/style-evolution

So your need will be taken in this new style feature.
commented Jul 10, 2019 by diagramBob (220 points)

Thanks for fast response! 

I went though the referred style page..  Looks nice addition indeed !

+ one comment about Components Height 
The common feature in Some legacy tools is to provide instructions that 
"Please render some components at same width and height" so they look nice on autolayout as well.

In Deployment diagrams, the components often do not have many details within, especially on High Level Architecture diagrams that specify only significant list of details.

So, something like this would be nice: 

sameComponentWidth true
minComponentWidth 300

sameComponentHeight true
minComponentHeight 300
 

I am happy to create some pretty realistic examples with many details for styling tests.

Several layout features could fit into the styles concept as well, in backward compatible mode.

...