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

Add support for custom Tags and Styles #86

Open
SlavaVedernikov opened this issue Jun 9, 2024 · 0 comments
Open

Add support for custom Tags and Styles #86

SlavaVedernikov opened this issue Jun 9, 2024 · 0 comments
Labels

Comments

@SlavaVedernikov
Copy link
Owner

SlavaVedernikov commented Jun 9, 2024

Context

At the moment all C4 and C4 Static diagrams are rendered with support for a set of built-in Element and Relationship Tags and Styles.

AddElementTag("c4interflow:lifecycle:new", $bgColor=green, $fontColor=#ffffff, $borderColor=green, $shadowing="False")
AddElementTag("c4interflow:lifecycle:changed", $bgColor=orange, $fontColor=#ffffff, $borderColor=orange, $shadowing="False")
AddElementTag("c4interflow:lifecycle:removed", $bgColor=red, $fontColor=#ffffff, $borderColor=red, $shadowing="False")

AddRelTag("c4interflow:lifecycle:new", $textColor=green, $lineColor=green)
AddRelTag("c4interflow:lifecycle:changed", $textColor=orange, $lineColor=orange)
AddRelTag("c4interflow:lifecycle:removed", $textColor=red, $lineColor=red)

Requirements

Add support for custom Tags and Styles, so that any Structures can be tagged with custom Tags and then styled accordingly when the diagrams are generated.

Custom Tags should be added under Tags object in AaC. For example the built-in C4InterFlow Tags would be defined in YAML AaC as follows:

Tags:
  C4InterFlow:
    Lifecycle:
      New:
        ElementStyle:
          BackgroundColor: green
          FontColor: #ffffff
          BorderColor: green
          Shadowing: false
        RelationshipStyle:
          TextColor: green
          LineColor: green
      Changed:
        ElementStyle:
          BackgroundColor: orange
          FontColor: #ffffff
          BorderColor: orange
          Shadowing: false
        RelationshipStyle:
          TextColor: orange
          LineColor: orange
      Removed:
        ElementStyle:
          BackgroundColor: red
          FontColor: #ffffff
          BorderColor: red
          Shadowing: false
        RelationshipStyle:
          TextColor: red
          LineColor: red

The Structures would be tagged in AaC as follows:

Tags:
  - "C4InterFlow.Lifecycle.New"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant