Add new %encode() function

0 votes
asked Jun 17, 2021 in Wanted features by kirchsth (2,900 points)

If I want to add an (dynamic defined) arrow style to the legend then I need a correct encoded url like in

left to right direction
[B]-[dotted]-> [D]

   | ""-[dotted]->"" | <img:> | blah3 |

and "LSsn3i8m30JGFLzXiJFa1r3_0p5SQmCLYOri8twVPAEwwTuDjqJ2yzDRYTUkRpWwnHDitrqVT4SB-LisEA_cBBvPCoSrbJAHJYC8GZtKjHPKEb_PCeLlbmcBA8-_7m00" itself is an encoded plantuml source

skinparam shadowing false
skinparam cardbordercolor none
card " " as a1
card " " as b1
a1 -[dotted]> b1

 The new function %encode("skinparam shadowing false\nskinparam cardbordercolor none\ncard "" "" as a1\n ....")  should calculate the corresponding counterpart of the source "LSsn3i8m30....mcBA8-_7m00".
(I think "@startuml and @enduml" should be obsolete or optional; \n defines a linebreak, " escaped with "" or some other logic term)

And with that the legend could be defined like

   | ""-[dotted]->"" | <img:"........")> | blah3 |

Thank you and best regards

commented Jun 17, 2021 by The-Lu (46,400 points)

Hello K, and PlantUML team,

Another wanted feature will be just to allow sub-diagram ('{{''}}') on table.
Especially to be more generic and also manage vectorial SVG output...
But I do not know with which syntax?

With not another builtin functions: %subdiagram()?

   | ""-[dotted]->"" | %subdiagram("...")> | blah3 |
   | ""-[dotted]->"" | %subdiagram("a1 -[dotted]> b1")> | blah3 |

That is only a proposal... to discuss.


commented Jun 17, 2021 by kirchsth (2,900 points)

Yes, %subdiagram() could be the better solution. But I wouldn’t limit it to tables.
If this is supported then it should reuse "outer definitions". E.g. if variables or skinparams are defined then it should be possible to reuse them in the sub diagrams (e.g. legends) too.

skinparam arrowColor<<backup>> darkgray;text:darkgray;line.dashed

[api] -RIGHT->> [archive] <<backup>> : **Writes**\n//<size:12>[messages]</size>//


| %subdiagram("[from] -RIGHT->> [to] <<backup>>")> | blah3 |


Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.