Comments (4)
This was an interesting PlantUML bug/regression to figure out. Take a look when I render these lines - the third participant is similar to the generated output:
actor User as user
participant OnlyLabel as t1 << APIGateway >>
participant NoLabel as t2 << ($APIGateway, #CC2264) >>
participant Both as t3 << ($APIGateway, #CC2264) APIGateway >>
participant BothZWSP as t4 << ($APIGateway, #CC2264) %chr(8203)APIGateway >>
user -> t4: winner
It appears that when the text label value of the stereotype matches the name of a sprite (even without the leading $
character), it causes neither the sprite nor the <<label>>
to render. The last participant does render because I pre-pended a Zero-width space which makes a different string but looks the same.
To patch this for your current projects, you can redefine AWSParticipant
(from AWSCommon.puml) after your !include
s but before your diagram.
!definelong AWSParticipant(p_alias, p_label, p_techn, p_color, p_sprite, p_stereo)
participant "p_label\n<size:TECHN_FONT_SIZE>[p_techn]</size>" as p_alias << ($p_sprite, p_color) %chr(8203)p_stereo >>
!enddefinelong
!definelong AWSParticipant(p_alias, p_label, p_techn, p_descr, p_color, p_sprite, p_stereo)
participant "p_label\n<size:TECHN_FONT_SIZE>[p_techn]</size>\n\n p_descr" as p_alias << ($p_sprite, p_color) %chr(8203)p_stereo>>
!enddefinelong
from aws-icons-for-plantuml.
When building out a minimal, standalone example, I uncovered the regression relates to behavior changes with skinparam participant<<stereo>>
which is triggered by AWSEntityColoring(APIGateway)
from APIGateway.puml. It appears the sprite and stereotype label are "styled out" of the rendering.
An updated workaround is to add !define AWSEntityColoring(stereo)
after you include AWSCommon.puml
@startuml Bug - Sprites and Stereotypes
' Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved.
' SPDX-License-Identifier: CC-BY-ND-2.0 (For details, see https://github.com/awslabs/aws-icons-for-plantuml/blob/main/LICENSE)
'''AWSEntityColoring usually defined in AWSCommon.puml
!define AWS_BG_COLOR #FFFFFF
!define AWS_BORDER_COLOR #FF9900
!definelong AWSEntityColoring(stereo)
skinparam participant<<stereo>> {
BackgroundColor AWS_BG_COLOR
BorderColor AWS_BORDER_COLOR
}
!enddefinelong
'''
'The bug happens because of the AWSEntityColoring(APIGateway) from APIGateway.puml
'A workaround is to redefine to do nothing - uncomment line below to test
'!define AWSEntityColoring(stereo)
'''$APIGateway and AWSEntityColoring(APIGateway) defined in ApplicationIntegration/APIGateway.puml
sprite $APIGateway [64x64/16z] {
xTC5biCm30JGiIfRqjp_lcMkqWqjUzuBvvlDjTFJ4uqlQJ5QA-1yYWCQOtNkan9IBTOotqoI4X9DvfvCIaZqi4zAIFImVrT2E-lt_bn2oxnpdAV_V2zIgG_7
D5-ASlDm_CZ-_tplDji7IIgSCSjRSP95wCLcUCF16ngzm2Rx4-S6mMC1Ktqv3G4s9r2c-We9ii98Xg1EzJmMKCgPSx9dXJagIKFb34-ddjuvPta6PDdwTP_d
-_ut3yRzOTCye9I7OvhNQcptXtxa-_n1ROmtHURP1ESYXlmPGnhJH1MWg0rvqm98ZOG-5Y6PbmHdyIf8_04xnyMpyNMkdPwU7G
}
AWSEntityColoring(APIGateway)
'''
actor User as user
participant OnlyLabel as p1 << APIGateway >>
participant NoLabel as p2 << ($APIGateway, #CC2264) >>
participant Both as p3 << ($APIGateway, #CC2264) APIGateway >>
participant BothZWSP as p4 << ($APIGateway, #CC2264) %chr(8203)APIGateway >>
user -> p4: renders as expected
@enduml
from aws-icons-for-plantuml.
@FredrikMeyer - the icon release today "fixes" the issue by commenting out the skinparam participant<<stereo>>
in AWSCommon.puml
causing this issue. This means diagrams render, but not with the same styling as before. Additionally, according to the linked PlantUML issue, this is fixed in their latest snapshot. After that release, we can look at reverting this change.
!definelong AWSEntityColoring(stereo)
skinparam rectangle<<stereo>> {
BackgroundColor AWS_BG_COLOR
BorderColor AWS_BORDER_COLOR
}
' https://github.com/plantuml/plantuml/issues/1023
'skinparam participant<<stereo>> {
' BackgroundColor AWS_BG_COLOR
' BorderColor AWS_BORDER_COLOR
'}
!enddefinelong
Would you like to keep this issue open until then, or should we close?
from aws-icons-for-plantuml.
Sorry for the late reply!
We just updated the plantuml version, and now diagrams seem to render correctly. Thanks for the effort!
from aws-icons-for-plantuml.
Related Issues (20)
- SecurityGroup puml doesnot work HOT 1
- Including General/Globe.puml results in a syntax error HOT 2
- Please add AwS Location Service puml/image HOT 6
- Define variable in puml files to reference color HOT 6
- AWSSimplified.puml should also take into account sequence diagrams HOT 5
- Request: Overlapping Groups HOT 2
- Request: List of content HOT 2
- Can we add the GraphQL icon to the overall set? HOT 5
- Question: Is it possible to generate fully scalable (SVG) diagrams? HOT 2
- Question: how can I modify the default label on Groups elements? HOT 2
- Support theming: (Example: Border color is hardcoded to gray) HOT 2
- Update to Release 17-2023.10.23 of AWS Architecture Icons
- VSCODE Reder Errror HOT 11
- Full list of the available icons HOT 1
- It's always dark mode even no dark mode is specified HOT 8
- Syntax error for ApplicationIntegration/{all,EventBridge*}.puml HOT 2
- [Wanted feature][Refactor] Could you optimize all the `all.puml` files
- Update to Release 18-2024.02.06 of AWS Architecture Icons HOT 1
- 404 https://raw.githubusercontent.com/awslabs/aws-icons-for-plantuml/v18.0/dist HOT 2
- 404 not found v18.0/dist
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aws-icons-for-plantuml.