ls1intum / Apollon

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

`General`: Restrict users from inserting more than 100 characters #254

Closed minrows closed 2 years ago

minrows commented 2 years ago

Checklist

Motivation and Context

This PR fixes the issue mentioned in Testing Session regarding the stretching of diagrams when input text is long. [Findings > Assigned Issues > Issue Nr: 24].

Description

This PR restricts users from inserting more than 100 characters in the application's input fields (except for the assessment feedback field).

Steps for Testing

In test Server:

  1. Goto test server
  2. Insert any element in canvas and try setting its name (or attributes/methods) with more than 100 characters.
  3. Observe that the application stops taking input once 100 characters are inserted.

In local machine:

  1. Clone the repo
  2. Checkout to branch bugfix/input-length-restriction
  3. Run the application by executing yarn install followed by yarn start command.
  4. Insert any element in canvas and try setting its name (or attributes/methods) with more than 100 characters.
  5. Observe that the application stops taking input once 100 characters are inserted.

Screenshots

screen-capture (15)

PS: For illustration purposes, the restriction length in the video is set to 10.

Additional Info:

Changes released in v2.11.3-beta.1