ls1intum / Apollon

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

Class Diagram: Adjust spacing of newly added lines to a class #357

Open farisd16 opened 1 month ago

farisd16 commented 1 month ago

Checklist

Motivation and Context

Fixes #333

Description

I have adjusted the height of newly added lines to a class to match the height of lines from the preview (specifically class-preview.ts)

Steps for Testing

  1. Create a class diagram
  2. Add a new class
  3. Add new lines (attribute, method, etc.) to the class
  4. Assert that all lines have even spacing

Test Coverage

| File | Branch | Line | | uml-classifier-member.ts | 100% | 100% |

Screenshots

Before: image

After: image

FelixTJDietrich commented 4 weeks ago

@farisd16 it is maybe a bit too much space now? Can you make it similar to Constant 4, Constant 5, Constant 6 in the before screenshot?

farisd16 commented 3 weeks ago

@farisd16 it is maybe a bit too much space now? Can you make it similar to Constant 4, Constant 5, Constant 6 in the before screenshot?

Sure, this is what it looks like:

image

FelixTJDietrich commented 3 weeks ago

Somehow the vertical padding is now smaller, don't you think?

loreanvictor commented 3 weeks ago

code looks good to me too, though I wonder if we need to manage these visual constants a bit better (perhaps in a follow-up issue).