structurizr / ui

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

Support explicit view title in left-hand sidebar? #5

Closed jplane closed 1 year ago

jplane commented 1 year ago

Given the following DSL:

workspace {

    model {
        u = person "User"
        s = softwareSystem "Software System"

        u -> s "Uses"
    }

    views {
        systemContext s {
            include *
            autoLayout lr
            title "Foobar"
        }
    }   
}

The explicitly defined view title 'Foobar' is honored in the view rendering but not in the LHS view list:

image

Is it possible to support both?

jplane commented 1 year ago

To be clear, I mean is it possible to use 'Foobar' as the title in the LHS view list (in the above example)?

simonbrowndotje commented 1 year ago

This is actually on my todo list ... when I was open sourcing the UI last month, I found that the codebase used a mix of both approaches in different places of the UI, so I decided to initially make them all consistent and use the [Type] Name version. Once I've open sourced the DSL editor (which is the last place that view names/titles are used), I'm going to revisit this and make them all consistently used the title if defined. The cloud service actually does this already, albeit not consistently because it's not on the open source UI yet. 😀

Screenshot 2023-02-08 at 17 21 59
jplane commented 1 year ago

Look forward to seeing this when its ready! :)

jplane commented 1 year ago

Confirmed that this is working in the latest build... terrific! And thank you :-)