Fallback to default arrow style if the style fails

0 votes
asked Feb 4, 2019 in Wanted features by boshka (3,940 points)
edited Feb 4, 2019 by boshka

Long story

Let's assume I have iuml that uses this file as embedded piece:
@startuml

/'

embedded_piece.iuml

'/

      c -[STYLE_DEFINITION]>> d: test

@enduml

Let's assume the parent code has the STYLE_DEFINITION defined. In this case the embedded piece will inherit the definition and will render it ok.

@startuml

   !define STYLE_DEFINITION dashed

   a->b:test

   note right

   {{

      !include embedded_piece.iuml

   }}

   end note

@enduml

However, if I load the embedded_piece.iuml standalone, it will fail since there will be no STYLE_DEFINITION available. This is somewhat OK, but, probably we could do something about it? For example, if the style fails for this reason, you could fallback to the default style and not fail rendering. Probably this can be done globally or, if not safe, then using a new param, for example:

skinparam fallbacktodefaults onStyleFail;onSomethingElseFail

OR whatever you feel would be appropriate. Other values are to be defined further.

This would allow more easy editing such embedded diagrams in standalone mode.


Long story short

I want this piece of code to render without errors even though there is no STYLE_DEFINITION:

@startuml

      skinparam fallbacktodefaults onStyleFail

      c -[STYLE_DEFINITION]>> d: test

@enduml

Could you fix this in the way that you feel would be safe?

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.
...