structurizr / ui

UI code for Structurizr Lite, on-premises, and cloud service.
https://docs.structurizr.com/ui
MIT License
38 stars 22 forks source link

containerInstance and softwareSystemIntance description are not rendered #19

Closed yvesaston closed 1 year ago

yvesaston commented 1 year ago

Description

When a deployment view is rendered, the description of the related container to a containerInstance is shown, meanwhile the containerInstance description is lost - not displayed on the diagram nor in the tool tip. Same applies to softwareSystem/softwareSystemInstance

Expected behavior:

Note that infrastructureNode description is properly rendered. Both being children of deploymentNode, so personally I view as inccoherent not rendering a containerInstance description meanwhile rendering an infrastructureNode description.

Steps to reproduce

  1. create a containerInstance including a description.
  2. include it in a deployment view
  3. render the deployment view. The containerInstance description is not rendered.
  4. activate tooltip display. The containerInstance description is not displayed within the pop-up tip.

Repeat the same for a softwareSystemInstance.

Screenshot

Screenshot 2023-05-04 130425

Code sample

workspace "Deployment description" {
    !identifiers hierarchical

    model {
        systemA = softwareSystem "System A" "Description for System A" {
            container1 = container "Container 1" "Container 1 description"
            container2 = container "Container 2" "Container 2 description"
        }
        systemB = softwareSystem "System B" "System B description"

        deploymentEnvironment qa {
            deploymentNode node1 "Deployment node 1" {
                containerInstance systemA.container1 {
                    description "Container 1 instance description"
                }
                containerInstance systemA.container2
            }
            deploymentNode node2 "Deployment node 2" {
                softwareSystemInstance systemB {
                    description "System B Instance description"
                }
                softwareSystemInstance systemB
            }
            deploymentNode node3 "Deployment node 3" {
                infrastructureNode infraNode "Infrastructure node description"
            }
        }
    }
    views {
        deployment * qa "qa" "deployment view" {
            include *
            autoLayout
        }
    }
}

Configuration

Structurizr Lite

Severity

Minor

Priority

Medium

Resolution

I have no budget, please fix this for free

More information

No response

simonbrowndotje commented 1 year ago

This is by design, and the DSL should really prevent you from setting a description on element instances. I am intrigued though ... why do you want to change those descriptions?

yvesaston commented 1 year ago

Hi Simon, so our systems do allow for different functional deployment models. I am working in telecoms ; I can decide to have a first deployment of my application to handle voice and SMS traffic for example, and a second one for Data traffic... or I can decide to have a single deployment for all of them, or different deployments per operator, etc.

In any given deployment environment, it becomes then crucial to communicate what a particular deployment is for, not only which is the system or container you deploy. Having a description for a containerInstance or softwareSystemInstance allows to make happen that communication, in a very simple and manageable manner (and that's what C4 is about, right ?).

On the back of this, I understand it is certainly not straightforward for you to strike the right balance between the structure Structurizr bring (that is really great), against the myriad of particular situations that are encountered around. Any software a bit old has its own particularities that do not really make sense taken out of context. Having Structurizr keeping the essence of its intent at the same time as enough flexibility to handle those situations nicely looks to me like the sweet spot.

simonbrowndotje commented 1 year ago

I've added some code to make this happen in the browser-based UI, but if you're using any of the PlantUML, Mermaid, etc exporters, you'll need to open new issues to have the same support added to them.

yvesaston commented 1 year ago

Hi Simon, thanks and noted. That is enough for me for now,