From cdc860205125f97705087cd47848df1ffcd5db7e Mon Sep 17 00:00:00 2001 From: KIRCHSTH Date: Sun, 14 Mar 2021 16:26:35 +0100 Subject: [PATCH] #126: C4 relationships support description, sprite/openIconic and tags (6 - fix PR findings: remove obsolete code, update comments and use https urls) --- C4.puml | 18 +++++++++--------- README.md | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/C4.puml b/C4.puml index 6c55aa5..e84f622 100644 --- a/C4.puml +++ b/C4.puml @@ -213,17 +213,10 @@ $elementSkin !function $tagRelLegendEntry($tagStereo, $textColor, $lineColor) !$tagEntry = "|" - !$bg = $LEGEND_UNDEFINED_BG_COLOR - ' named colors have to start with # too - !if (%substr($bg, 0, 1) != "#") - !$bg = "#" + $bg - !endif -' !$tagEntry = $tagEntry + "<" + $bg +">" ' ..white line !if ($lineColor!="") !$tagEntry = $tagEntry + " " !else -' !$tagEntry = $tagEntry + " " !$tagEntry = $tagEntry + " " !endif !if ($textColor!="") @@ -244,7 +237,9 @@ $elementSkin !endfunction !unquoted procedure $addTagToLegend($tagStereo, $bgColor="", $fontColor="", $borderColor="", $shadowing="") -'' ignore workaround tags with & +'' if a combined element tag is defined (e.g. "v1.0&v1.1") then it is typically a merged color, +'' like a new $fontColor="#fdae61" therefore it should be added to the legend +'' and the & combined tags will be not removed ' !if (%strpos($tagStereo, "&")<0) !$tagEntry = $tagLegendEntry($tagStereo, $bgColor, $fontColor, $borderColor, $shadowing) %set_variable_value("$" + $tagStereo + "LegendEntry", $tagEntry) @@ -253,7 +248,12 @@ $elementSkin !endprocedure !unquoted procedure $addRelTagToLegend($tagStereo, $textColor="", $lineColor="") -'' ignore workaround tags with & +'' Arrows have a bug with stereotype/skinparams and cannot combine text colors of one stereotype +'' and the line color of another stereotype. Therefore the text color of one tag and the line color +'' of another tag have to be combined via a "workaround" tag ("v1.0&v1.1"). +'' This workaround tag could be theoretically removed in the legend but after that there would +'' be an inconsistency between the element tags and the rel tags and therefore +'' & combined workaround tags are not removed too (and in unlikely cases the color itself could be changed) ' !if (%strpos($tagStereo, "&")<0) !$tagEntry = $tagRelLegendEntry($tagStereo, $textColor, $lineColor) %set_variable_value("$" + $tagStereo + "_LineLegendEntry", $tagEntry) diff --git a/README.md b/README.md index a4692cd..e4909d0 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ If you want to use the always up-to-date version in this repo, use the following Now let's create a C4 Container diagram: -\(If you don't want run PlantUML locally you can use e.g. the [PlantUML Web Server](http://www.plantuml.com/plantuml/uml/ZOxDIWGn48JlUOeufn5qSjcJfvNHsugBFsV99iqcsEc4T0VTjpSCE2AYUAeAgVwgjYosIakevytBBK824bPdaHms3pg85BuofjgtwHWbj4DZg2wJzDpaSZAliRh04ioykToZ9Nc-snbux_yUlEdGkOTj9AXJwJLAxQ5ofh4iSetHyeKUTlO0E7HpNoHcigXlW5sDosiuLojaT9_kn-aJk40Py_7q1-Znn09fv4N-swuU0ByFNbVyZlYQqmbR8DyIVW00) too.) +\(If you don't want run PlantUML locally you can use e.g. the [PlantUML Web Server](https://www.plantuml.com/plantuml/uml/ZOxDIWGn48JlUOeufn5qSjcJfvNHsugBFsV99iqcsEc4T0VTjpSCE2AYUAeAgVwgjYosIakevytBBK824bPdaHms3pg85BuofjgtwHWbj4DZg2wJzDpaSZAliRh04ioykToZ9Nc-snbux_yUlEdGkOTj9AXJwJLAxQ5ofh4iSetHyeKUTlO0E7HpNoHcigXlW5sDosiuLojaT9_kn-aJk40Py_7q1-Znn09fv4N-swuU0ByFNbVyZlYQqmbR8DyIVW00) too.) After you have included `C4_Container.puml` you can use the defined macro definitions for the C4 elements: `Person`, `Person_Ext`, `System`, `System_Ext`, `Container`, `Relationship`, `Boundary`, and `System_Boundary` @@ -488,7 +488,7 @@ Images can be generated in PNG, in SVG or in LaTeX format. PlantUML was created to allow the drawing of UML diagrams, using a simple and human readable text description. Because it does not prevent you from drawing inconsistent diagrams, it is a drawing tool and not a modeling tool. -It is the most used text-based diagram drawing tool with [extensive support into wikis and forums, text editors and IDEs, use by different programming languages and documentation generators](https://en.plantuml.com/running). +It is the most used text-based diagram drawing tool with [extensive support into wikis and forums, text editors and IDEs, use by different programming languages and documentation generators](https://plantuml.com/running). The [C4 model](https://c4model.com/) for software architecture is an "abstraction-first" approach to diagramming, based upon abstractions that reflect how software architects and developers think about and build software. The small set of abstractions and diagram types makes the C4 model easy to learn and use.