ParabolInc / parabol

Free online agile retrospective meeting tool

Home Page:https://www.parabol.co/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: Replacing task content with whitespace does not delete the task

Dschoordsch opened this issue · comments

When removing the content of a task, it is deleted. When replacing the task content with whitespace, the task enters a broken state where it says " is editing a Task".

Expected behaviour

We trim the task content on server side. Removing all task content equals a delete call. Since we can't have whitespace only tasks, this should equal a delete call as well and the task be removed.

Actual behaviour

The task enters the editing state and can therefore only be removed by the current assignee of the task.

Screen.Recording.2024-06-24.at.13.28.20.mov

To make sure we don't run into these discrepancies between handling on the server and client side in the future, we should delete a task in the updateTask mutation if the new content is empty.

I think a good solution would be to get rid of the deleteTask mutation and do the deleting in updateTask anytime the content is empty. This would ensure consistent behaviour between client and server.