dwyl / github-backup

:octocat: :back: 🆙 Backup your GitHub Issues so you can still work when (they/you are) offline.
https://github-backup.herokuapp.com
GNU General Public License v2.0
32 stars 3 forks source link

Indicate when a comment has been deleted #58

Open Cleop opened 6 years ago

Cleop commented 6 years ago

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.

Cleop commented 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?

image

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.

Cleop commented 6 years ago

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.

SimonLab commented 6 years ago

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

SimonLab commented 6 years ago

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

Cleop commented 6 years ago

This is the UI for now: image

I haven't included the 'X' as we'd need an asset.

nelsonic commented 6 years ago

@Cleop copy is good. Could we use https://fontawesome.com/icons/trash?style=solid ?

Cleop commented 6 years ago

@nelsonic - thanks for the font awesome asset suggestion. Shall I create this as a separate issue or complete it as part of this one?

nelsonic commented 6 years ago

@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?)

Cleop commented 6 years ago

I agree, just wanted to check as you hadn't closed this issue (and it was in please-test). I'll do that now 👍