awslabs / aws-icons-for-plantuml

PlantUML sprites, macros, and other includes for Amazon Web Services services and resources
Other
887 stars 149 forks source link

AWSSimplified.puml should also take into account sequence diagrams #55

Closed bschwarz closed 1 year ago

bschwarz commented 1 year ago

AWSSimplied.puml works well for most diagrams, but for sequence diagrams it does not work. I believe the sequence diagrams should have the same effect when using AWSSimplified.puml.

I believe there is just a small change needed in AWSSimplified.puml. The AWSEntityColoring function should include participant skinparams in addition to the others. So, the AWSEntityColoring function should look like this:

!definelong AWSEntityColoring(e_stereo)
skinparam rectangle<<e_stereo>> {
    BackgroundColor AWS_BG_COLOR
    BorderColor transparent
    Shadowing false
}
skinparam ParticipantBackgroundColor<< e_stereo >> AWS_BG_COLOR
skinparam SequenceParticipantBorderThickness<< e_stereo >> 0
!enddefinelong
gadams999 commented 1 year ago

Hi @bschwarz ,

Thanks for the suggestion. We've have discussions around coloring and the last icon set update changed how colors are referenced. We'll review, and depending upon the next release of the AWS Icon set we may incorporate into that sprint.

hakanson commented 1 year ago

@bschwarz - might giving a specific example source and before/after images of what is "not working well"?

bschwarz commented 1 year ago

Sure, sorry about that. Code like this:

@startuml

!include <awslib/AWSCommon>
!include <awslib/AWSSimplified>
!include <awslib/Compute/LambdaLambdaFunction>
!include <awslib/General/User>

' skinparam participantBackgroundColor<< User >> AWS_BG_COLOR
' skinparam SequenceParticipantBorderThickness<< User >> 0

UserParticipant(USER, "ZTMN User", "")
LambdaLambdaFunctionParticipant(GETORGS, "get_org_units", "Python")

USER -> GETORGS
GETORGS --> USER
@enduml

If you uncomment those skinparam statements, then the background and border go away. This is similar behavior from the github page that showed the simplified view for an architecture diagram. See the attached images.

Note: something that I just noticed, if you export to PNG, the border is still there...seems like a bug with plantuml. I never noticed this before because I always use SVG.

junk junk-no-descoration

hakanson commented 1 year ago

I would also add these AWSParticipant overrides to mimic the existing AWSEntity override behavior.

!definelong AWSParticipant(p_alias, p_label, p_techn, p_color, p_sprite, p_stereo)
participant "$AWSImg(p_sprite)\np_label" as p_alias <<p_stereo>>
!enddefinelong

!definelong AWSParticipant(p_alias, p_label, p_techn, p_descr, p_color, p_sprite, p_stereo)
participant "$AWSImg(p_sprite)\np_label" as p_alias <<p_stereo>>
!enddefinelong

Then it only shows labels, similar to the Two Modes - Simple View.puml and and Two Modes - Technical View.puml

image image

bschwarz commented 1 year ago

Yep, that looks good!