Open Cleop opened 6 years ago
Question for @SimonLab @nelsonic - if a comment is deleted and we add the GH UI for this, what colour should the comment box be for the last active comment? Should it be white as the latest comment normally is or as the latest activity on the comment is that it's been deleted should all the records of the comment now have a grey background?
I think that all versions of the comment should turn grey so that visually it's immediately obvious that the comment has been deleted. Otherwise a user could overlook the deleted bit.
We need to rethink our schema for doing this. We can't just add a deleted
column because we need to also record the author
of the deleting action. So far we only record an author
value when we add a new version.
So instead given that there will be lots of github events to record in the future e.g. adding a label, putting an issue in a milestone etc. We think it would be better to have an events
table with actions like - deleted comment, adds/removes label, adds/ removes from milestone etc.
UPDATE:
Making an events table would not be such a good idea because label/milestone/project events are actually issue events not comment events. So I think the former idea of attaching the deleted event to the comment table is a better idea but to take into consideration the need for the user responsible for deleting the post being included, we can also add a deleted_by
column.
I think the only event linked to the comment will be deleted
. The other events (new label, isssue assigned,...) are linked to the issue not the comment itself
A solution to save the user who deleted a comment is to create another new field in the comment table deleted_by
which will be set to null by default.
When a comment is deleted we can then update this field with the name of the user and later one when #46 is done we can create a reference to the user table
This is the UI for now:
I haven't included the 'X' as we'd need an asset.
@Cleop copy is good. Could we use https://fontawesome.com/icons/trash?style=solid ?
@nelsonic - thanks for the font awesome asset suggestion. Shall I create this as a separate issue or complete it as part of this one?
@Cleop you can create a new issue (linked back to this one).
(I kinda prefer that to changing the acceptance criteria in this
issue ... don't you?)
I agree, just wanted to check as you hadn't closed this issue (and it was in please-test
). I'll do that now 👍
As a gh-backup user, I want to know when a comment has been deleted So that I can see all the activity happening on github reflected on the backup app.
deleted: true
orfalse
). Default offalse
.deleted_by
column to the comments tabledeleted
column when a comment is deleted totrue
deleted_by
column