[Activity][Style] Allow full style on diamond (e.g. internal label and external label)

0 votes
asked Sep 11 in Wanted features by The-Lu (36,240 points)

Hello PlantUML team,

  • Could you allow full style on diamond (e.g. internal label and external label), on Activity Diagram?

Question:

  • What is the stylename (SName) for the external diamond label?

Here are some examples:

1/ With Simple Conditional:

@startuml
<style>
activityDiagram {
  MaximumWidth 100
  diamond {
    FontColor green
  }
}
</style>
if (Long long long long long long long long long condition?) then (Long long long long long long long long long yes)
  :Long long long long long long long long long action yes;
else (Long long long long long long long long long no)
  :Long long long long long long long long long action no;
endif
@enduml

→ `MaximumWidth 100` seems to not take in account for internal diamond label and external diamond label

2/ With switch/cases

@startuml

<style>
activityDiagram {
  MaximumWidth 100
  diamond {
    FontColor green
  }
}
</style>
switch (Long long long long condition? )
case ( Long long long long long long long long long case 1)
   :Long long long long long long long long long  1;
case ( Long long long long long long long long long case 2 )
   :Long long long long long long long long long  2;
endswitch
@enduml


→ `MaximumWidth 100` seems to be ignored  for internal diamond label and external diamond label
And also the color `FontColor green` is not taken in account.

Regards.

related to an answer for: prevent text overlap in activity switch

1 Answer

0 votes
answered Oct 5 by plantuml (262,940 points)
In last release V1.2021.12 we have improved support for style and diamond in activity diagram beta.

However, we are interested if you find other issues concerning this topic.

Thanks for your tests!
commented Oct 5 by The-Lu (36,240 points)

Hello PlantUML,

Thanks for the improvement... Then...

  • Could you add some margin or padding between arrow and label?

See little overlapping:

@startuml
scale 2
<style>
activityDiagram {
  MaximumWidth 100
}
</style>
switch (Long long long long condition?)
case (Long long long long long long long long long case 1)
   :Action  1;
case (Long long long long long long long long long case 2)
   :Action  2;
endswitch
@enduml

Regards,
Th.

commented Oct 6 by The-Lu (36,240 points)

Another remark, with Simple Conditional, we observed always the defect...

@startuml
<style>
activityDiagram {
  MaximumWidth 100
  diamond {
    FontColor red
    MaximumWidth 100
  }
}
</style>
if (Long long long long long long long long long condition?) then (Long long long long long long long long long yes)
  :Action yes;
else (Long long long long long long long long long no)
  :Action no;
endif
footer \nObserved on:   1.2021.12\n(current version: %version())
@enduml

Regards.

commented Oct 12 by The-Lu (36,240 points)

Thanks for your works...
Another remark (sorry cheeky):

  • Could PlantUML manage also 'elseif' Conditional, here is the test...
@startuml
<style>
activityDiagram {
  MaximumWidth 100
  diamond {
    FontColor red
    MaximumWidth 100
  }
}
</style>
start
if (Long long long long long long long long long condition?) then (Long long long long long long long long long yes)
  :Action yes;
elseif (Long long long long long long long long long another condition?)
->Long long long long long long long long long elseif;
  :Action elseif;
else (Long long long long long long long long long no)
  :Action no;
endif
@enduml

Regards.

commented Oct 12 by The-Lu (36,240 points)

Another remarks: 

  • See little overlapping (on red), observed on even switch-case label:
@startuml
scale 1.5
<style>
activityDiagram {
  MaximumWidth 100
  diamond {
    FontColor green
  }
}
</style>
switch (Long long long long condition? )
case (Long long long long long long long long long case 1)
   :Long long long long long long long long long  1;
case (<b><color:red>Long long long\nlong long long long long long case 2)
   :Long long long long long long long long long  2;
case (Long long long long long long long long long case 3)
   :Long long long long long long long long long  3;
case (Long long long long long long long long long case 4)
   :Long long long long long long long long long  4;
endswitch
@enduml

Regards,
Th.

...