Skip to content

Prevent creation of empty constraints if not saved

🚀 Feature Request

Summary

Currently, a new constraint is added immediately when clicking “Add Constraint” — even if the user never saves it. This leads to empty placeholder constraints that often need to be deleted manually. This behavior could be optimized to avoid unnecessary cleanup steps. This can be fatal, especially if you copy constraints and then do not complete the editing, as a new constraint (identical to an existing one) is created anyway.

Problem to Solve / User Story

As a user, I want to avoid creating unwanted empty constraints when I experimentally click “Add Constraint” but do not proceed to save anything. Manually deleting these empty entries afterward is unnecessary and time-consuming.

Proposed Solution

Do not automatically create a constraint object upon clicking “Add Constraint”. Instead, only create and persist the constraint after the user confirms it by clicking Save.

Benefits

Prevents cluttering the UI with empty constraints

Saves time and improves UX

Possible Drawbacks

Whether this behavior is problematic is debatable. Some users might simply forget to click “Save” after adding a new constraint, and having the draft auto-created could serve as a reminder. However, this also means the system silently stores incomplete entries, which leads to confusion and extra cleanup.

Additional Context

This happens consistently when using the “Add Constraint” button but then closing or navigating away without saving. The result is a blank entry that has to be manually deleted.

Relevant Logs or Screenshots (if applicable)

image

Alternatives Considered

Alternatively, use a temporary draft state and discard it if the user cancels.

Edited by Domenic Schäfer