-
Notifications
You must be signed in to change notification settings - Fork 36
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
Support for image Views. #338
Conversation
Image Views associated with Software Systems will show on the Containers View page.
@dirkgroot @jp7677 This PR might take me a while to complete. Please don't delay a new release waiting for it to be completed. |
…ew page. Image Views associated with Components will show on a new 'Code Views' page Code page is hardcoded to be set to Visible for the moment.
.sortedBy { it.key } | ||
} | ||
|
||
fun getImagesForContainer(generatorContext: GeneratorContext, softwareSystem: SoftwareSystem): List<ImageView> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jp7677 Is there a better way to write this in Kotlin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From a short glimpse, Kotlin's flatMap
should be your friend here https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.collections/flat-map.html
Thanks a lot for the PR, I haven't yet looked at the code since I want to complete #356 first. That said I have checked out this branch and looked at the result. Looks good and fits nicely. A few remarks:
|
Hi @qtzar do you have plans to continue this PR? |
@jp7677 I do. I've just been up to my eyes with work but I should get it finished off. |
Cool and no worries about timelines, I was just curious if you are still interested to continue. |
# Conflicts: # src/main/kotlin/nl/avisi/structurizr/site/generatr/site/C4PlantUmlExporterWithElementLinks.kt # src/main/kotlin/nl/avisi/structurizr/site/generatr/site/DiagramGenerator.kt # src/test/kotlin/nl/avisi/structurizr/site/generatr/site/C4PlantUmlExporterWithElementLinksTest.kt
I've updated this branch to work with the latest release but I still need to address some of the comments from @jp7677 |
I've opened #413 which takes most from this PR, but with slightly different styling and more tests. Thanks a lot for the base work here! |
This PR introduces support for Image Views.
An image view represents an image that has been rendered outside of Structurizr, for inclusion in a Structurizr workspace. Image views can be created from an arbitrary PNG/SVG file, or a PlantUML/Mermaid/Kroki diagram. An example use case for an image view is to provide a “level 4” zoom-in for a component on a component diagram.
From experimentation you can associate an image view with a SoftwareSystem, Container or Component and you can have multiple images views associated against a single element.