Colored return lines in Sequence Diagrams

0 votes
asked Feb 19, 2019 in Wanted features by roxspring (260 points)

In sequence diagrams I've just discovered the auto-activate and return functionality which should make my diagrams cleaner and less repetitive. In the meantime I've been using arrows in each direction and have been in the habit of colouring positive / negative responses to emphasise the result. Is there a syntax for the return statement which would allow the line to be coloured? ("return #color description" seems obvious but doesn't work)

@startuml
skinparam sequencearrowcolor #black

Alice -> Bob: Good Request
Alice <[#green]- Bob: Positive Response
Alice -> Bob: Bad Request
Alice <[#red]- Bob: Negative Response

...

Alice -> Bob ++: Good Request
return Positive Response
Alice -> Bob ++: Bad Request
return Negative Response
@enduml

1 Answer

+1 vote
answered Feb 19, 2019 by plantuml (295,000 points)
selected Feb 19, 2019 by roxspring
 
Best answer

Thanks for the suggestion !

We have implemented it in last beta http://beta.plantuml.net/plantuml.jar so that now you can have:

@startuml
skinparam sequencearrowcolor #black

Alice -> Bob: Good Request
Alice <[#green]- Bob: Positive Response
Alice -> Bob: Bad Request
Alice <[#red]- Bob: Negative Response

...

Alice -> Bob ++: Good Request
return #green Positive Response
Alice -> Bob ++: Bad Request
return #red Negative Response
@enduml

commented Feb 19, 2019 by roxspring (260 points)
What triggers features like this to be promoted from "incubation" to supported features? Anything I can do to help?? Any idea how long I might have to wait??
commented Feb 21, 2019 by plantuml (295,000 points)
This will be promoted in official release beginning of March.
We'll post a message here when this will be done.
commented Nov 3, 2020 by anonymous
Looks like this is working but it has a minor bug in 1.2020.07

Using color only without a label is parsed as markdown.

E.g. return #blue is changed to 1. blue
...