ls1intum / Apollon

UML Modeling Editor written in React
https://apollon-library.readthedocs.io
MIT License
65 stars 22 forks source link

Support for subsystems in component diagrams #291

Closed GODrums closed 10 months ago

GODrums commented 1 year ago

Checklist

Motivation and Context

As architecture expert in the iPraktikum by the ASE chair, I am using component diagrams to model subsystem decompositions. Unfortunately, Apollon offers no elements other than components making it impossible to create component diagrams following the UML standard. The workaround to reuse components to model subsystems is limited to naming and there has been no way to denote the stereotype ("role") of these elements, e.g. subsystem or component, which would be desired in subsystem decompositions and component diagrams in general.

Description

This change aims to improve the functionality of component diagrams in Apollon. It introduces a new element called "Subsystem", which follows the functionality of a component but has the corresponding stereotype subsystem. Furthermore components now also display their stereotype component above their name, following normal component diagrams guidelines. Text in subsystems is generally top-aligned, while components use center alignment. Although the styling may be subject to customization for edge cases, such styling should be sufficient for all common use cases. This change deliberately also impacts components in deployment diagrams, as these should follow the same UML standard styling.

Steps for Testing

  1. Run the code and open the website
  2. Select "Component Diagram" as the diagram type
  3. Drag a subsystem element in the canvas and fill it with a component element
  4. Both elements should now display their stereotype correctly and a subsystem should be able to contain a component

Screenshots

An example of a component diagram that is impossible to create with Apollon without this change: Screenshot_463 The new sidebar with the changes: Screenshot_464

Source for UML components / component diagrams

IBM - Component Diagrams

matthiaslehnertum commented 11 months ago

@GODrums Nice work and documentation on the PR! Looks good to me!

krusche commented 10 months ago

@AlexanderG2207 @matthiaslehnertum unfortunately, the author did not update this PR recently. Can someone of you take over this PR and finish it after fixing the merge conflict? Thank you!