Describe the bugtechn fails to display for Components and Containers, descr fails to display for Relationships.
element
techn
descr
Component
:x:
:white_check_mark:
Container
:x:
:white_check_mark:
Relationship
:white_check_mark:
:x:
To Reproduce
Go to code sample section below and follow the link.
OR
Load up and paste the following in:
C4Container
title Diagram to illustrate bug with `techn` usage
Container(con, "label", $techn="techn", $descr="descr")
Component(com, "label", $techn="techn", $descr="descr")
Rel(con, com, "label", $techn="techn", $descr="descr")
Expected behavior
I expect to see the techn text display in the element. See here, and notice that on Single Page App there is a text section [Container: JavaScript and Angular].
Note that the mermaid documentation lists techn as implemented for Component, Container and Relationship. In addition, the tutorial/example section for Containers shows techn being used but the resulting diagrams fail to display the text (i.e. it also shows the bugged behaviour).
Investigation
Playing with the online editor link below, I noticed that the resulting image is different between the following two:
Container(con, "label", "techn", "descr")
and
Container(con, "label", "", "descr")
The latter code produces a smaller box. So the mermaid engine is reacting to a non-empty string in the techn position but it doesn't show anything.
Using inspect element on the live editor, I get the following HTML:
So the difference is just in sizing of the outer element and positioning of elements drawn below where techn should go, as opposed to any extra HTML code being added. I suspect that we are successfully arriving at this line which is updating the total Y and hence the rectHeight.
After updating the rectHeight, the next action is to draw the elements. I suspect that there is a typo here of thchn instead of techn which means the actual text doesn't get drawn.
The drawing of the rels doesn't even consider descr, only techn.
Describe the bug
techn
fails to display for Components and Containers,descr
fails to display for Relationships.techn
descr
To Reproduce
Expected behavior I expect to see the
techn
text display in the element. See here, and notice that onSingle Page App
there is a text section[Container: JavaScript and Angular]
.Note that the mermaid documentation lists
techn
as implemented for Component, Container and Relationship. In addition, the tutorial/example section for Containers showstechn
being used but the resulting diagrams fail to display the text (i.e. it also shows the bugged behaviour).Investigation Playing with the online editor link below, I noticed that the resulting image is different between the following two:
and
The latter code produces a smaller box. So the mermaid engine is reacting to a non-empty string in the
techn
position but it doesn't show anything.Using inspect element on the live editor, I get the following HTML:
Container(con, "label", "techn", "descr")
Container(con, "label", "", "descr")
Here is a screen show of the diff between the 2:
So the difference is just in sizing of the outer element and positioning of elements drawn below where
techn
should go, as opposed to any extra HTML code being added. I suspect that we are successfully arriving at this line which is updating the totalY
and hence the rectHeight.After updating the rectHeight, the next action is to draw the elements. I suspect that there is a typo here of
thchn
instead oftechn
which means the actual text doesn't get drawn.The drawing of the rels doesn't even consider
descr
, onlytechn
.Code Sample Example on live editor.
Desktop (please complete the following information):
The behaviour is consistent across the 2 setups above.
Additional context nil