Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#97 Context Diagram supports selectable default person sprites #101

Merged
merged 5 commits into from
Feb 18, 2021

Conversation

kirchsth
Copy link
Contributor

@kirchsth kirchsth commented Dec 18, 2020

The macros are implemented based on issue #97:

PERSON_SPRITE_NONE()
PERSON_SPRITE_ACTIVE()  is default
PERSON_SPRITE_C4()
PERSON_SPRITE_3D()

and based on that the user gets with following sccript (typically the user defines the default icon only once and the include is on top of the file)

PERSON_SPRITE_ACTIVE()
Person(a, "user with default sprite")
Person_Ext(a2, "extern user with default sprite")

PERSON_SPRITE_C4()
Person(b, "user with C4 sprite no description")
Person_Ext(b2, "extern user with C4 sprite no description")

PERSON_SPRITE_3D()
Person(c, "user", "default 3D")
Person_Ext(c2, "extern user", "default 3D")

PERSON_SPRITE_NONE()
Person(d, "C user", "default NONE")
Person_Ext(d2, "extern user", "default NONE")

!define osaPuml https://raw.githubusercontent.com/Crashedmind/PlantUML-opensecurityarchitecture2-icons/master
!include osaPuml/Common.puml
!include osaPuml/User/all.puml

Person(cus, "user", "Custom", "osa_user_green_architect")
Person_Ext(cus2, "extern user", "Custom", "osa_user_green_architect")

something like
grafik

@kirchsth
Copy link
Contributor Author

Hi, I updated and finished my PR.

These are my changes:

  • add 2 macros
    HIDE_PERSON_SPRITE()
    SHOW_PERSON_SPRITE(?sprite)

  • add 1 person (to the already existing one)
    person2 ()

@adrianvlupu, @Crashedmind: I didn't add the "3D" person, but I leave person2 (I found no lib which contains a similar sprite, and it has no [explicit] C4 relation anymore)

Best regards

PS.: https://github.com/kirchsth/C4-PlantUML/blob/extended/LayoutOptions.md contains a preview of my changes

@adrianvlupu
Copy link
Member

Thanks for all your pull requests. I hope someone else takes the time to review them so that we can merge them.

I merged your pull request with my local branch and nothing seems to break.

  • HIDE_PERSON_SPRITE() I fully agree with it
  • SHOW_PERSON_SPRITE() I think should be named SET_PERSON_SPRITE() but it's not really a big deal

After merging, the methods should also be added to the C4.code-snippets file but I can do that afterwards, wanted to mention it so I don't forget.

@Potherca Potherca merged commit e53c526 into plantuml-stdlib:master Feb 18, 2021
@kirchsth kirchsth deleted the feature/97 branch July 4, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants