ls1intum / Apollon

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

Add stereotype visibility toggle button #367

Closed farisd16 closed 1 month ago

farisd16 commented 2 months ago

Checklist

Motivation and Context

Closes #361

Description

I have added a button to the popups of Components and Subsystems in a Component diagram, and to the popups of Components and Nodes in a Deployment diagram, which toggles the visibility of the stereotype.

Steps for Testing

  1. Create a component/deployment diagram
  2. Add a new component/subsystem/node
  3. Open the popup of the newly added element by clicking on it and then on the pencil icon
  4. Click on the stereotype visibility toggle button
  5. Assert that the button works as expected

Test Coverage

File Branch Line
stereotype-off.tsx 100% 43.75%
stereotype-on.tsx 100% 100%
stereotype-toggle.tsx 50% 100%
main/packages/common/uml-component/uml-component-component.tsx 75% 100%
uml-component-update.tsx 100% 47.19%
main/packages/common/uml-component/uml-component.ts 100% 100%
popups.ts 100% 100%
uml-component-subsystem-component.tsx 25% 100%
uml-component-subsystem-update.tsx 100% 48.35%
uml-component-subsystem.ts 100% 64.58%
main/packages/uml-component-diagram/uml-component/uml-component-component.ts 100% 60.52%
main/packages/uml-deployment-diagram/uml-deployment-component/uml-component.ts 100% 62.5%
uml-deployment-node-component.tsx 80% 100%
uml-deployment-node-update.tsx 100% 97.8%
uml-deployment-node.ts 100% 66%
typings.ts 100% 100%

Screenshots

stereotype-toggle

farisd16 commented 1 month ago

I will try to clarify my changes