Midnighter / structurizr-python

A Python 3 port of Simon Brown's Structurizr diagrams-as-code architecture description tool.
https://structurizr.com/
Apache License 2.0
65 stars 16 forks source link

Support adding animations to static views #80

Open yt-ms opened 3 years ago

yt-ms commented 3 years ago

Checklist

Is your feature related to a problem? Please describe it.

Following PR #77, the last remaining part of the API needed to complete the big_bank.py example is being able to add animations to static views.

Describe the solution you would like.

Mirroring the Java implementation,, we should add an add_animation() method to StaticView which accepts a variable number of elements, and copy the logic from Java. The serialisation and deserialisation of animation data has already been done, so it's just about being able to add animations programmatically.

    system_landscape_view.add_animation(internet_banking_system, customer, mainframe_banking_system, emailSystem)
    system_landscape_view.add_animation(atm)
    system_landscape_view.add_animation(customerServiceStaff, back_office_staff)
yt-ms commented 3 years ago

Given animations also are supported in the (currently experimental) CustomView in Java which doesn't extend StaticView, then perhaps this should be implemented in Python as a mixin (both View and IO) which can be used by both.