Garet's avatar
Level 3

Sensible interface for trash (soft deleted items)

In the past I'll display an index view of, let's say products. I'll also have a separate "trash" route which effectively is the same thing but it will display the soft deleted products, and give the user the opportunity to either delete them permanently from the trash, or restore them back to the main view.

On my latest project I've hit upon a bit of a problem which is more to do with the user interface than an actual programming issue.

I have an index view of people, and the same setup with a "trash" view for viewing soft deleted people. However, when viewing a person I also have an "inner" index view for their case history. The case history index view is related specifically to the person whose record you are accessing (i.e. it doesn't make sense to view the case history for everyone all at once).

I would like to handle soft deletes for the case history notes and provide a similar "trash" view where case history notes deleted by accident can be restored. But I am struggling to determine where such a view should go. If it's access from the "show" views of a person it's entirely possible that deleted case history notes will remain soft deleted forever if that person's record is not accessed frequently. In other words, you're not going to periodically click through every single person to clear out their soft deleted case history notes.

However, if I have a view that shows all soft deleted case history, it would be a list that is out of context to the various different people that the deleted case history notes belong to.

I would be open to suggestions as to how to handle this :-)

0 likes
2 replies
Snapey's avatar
Snapey
Best Answer
Level 122

if the note was accidentally deleted, then you would want to be in the case history notes for the user to see if it can be restored. It doesn't seem to make sense for them to be listed for all people in one place. Take an example of someone mistakenly entering the same note twice. They may go back and delete the duplicate. Seeing this deleted note out of context amongst other soft deleted records it would not make sense as to why it was there. Worse, restoring it, it would not then be apparent that this then appears on the regular case history notes page.

So, I would show it in line, possibly after checking a checkbox for "show deleted" which could then include the rows that are soft deleted, in their place in the history, possibly in red with a 'restore' button

Garet's avatar
Level 3

Thanks @snapey you're right, viewing sub-records out of context is probably not the best idea. I got a bit hung up on it because for the parent records I have a "Recycle Bin" style view where you can review items in the trash later on and restore them if you need to. I was trying to achieve the same thing for child records, but it becomes quite confusing from a usability perspective.

In the end I opted to keep the "Recycle Bin" for the parent records, and for child records I have a simple "Undo" link that appears when you delete a record. Chances are if you delete something by accident, you would realise right away. Failing that, the user would have to request the soft deleted child record is restored by someone with access to the raw data. That's still far easier than having to recover data from a backup.

I thought about your suggestion of a "show deleted" checkbox but still felt it was over-complicating matters in terms of the user interface.

Please or to participate in this conversation.