Closed gvn closed 1 year ago
Only your own comments, right?
Wouldn't this create scenarios where, for example, an operator has responded with "Issue is fixed" but the comment below (which stated the issue) has been removed or edited and so the operator's comment has no context?
Yes, only your own comments would be editable.
One possible solution for your scenario would be exposing UI to mark your comment as fixed instead of being able to delete it or edit it. The original comment could then be shown with strikethrough formatting or have other UI displayed to indicate that it's fixed (eg: a FIXED
badge).
There's such a wide range to the types of comments people leave that I'd be hesitant to only provide a static response option (like "Fixed"). I don't mind the idea of users being able to edit their text. At least, we could do it and see how it goes.
We should include some kind of indication that it's been edited. I know that reddit includes an asterisk next to the timestamp - though to be honest I almost never notice that. I'm kind of thinking we could use the created_at
and updated_at
timestamp fields in the machine_conditions table, and basically double timestamp it (to say, comment left on x date, and comment edited on y date - or something).
Additionally, I'd be ok with letting users delete comments. But we'd want to leave some sort of "commented deleted" message in place. And perhaps have the action not destroy the record, but instead just deactivate and hide it.
There is also the issue of "user_submissions." A user_submissions is generated when a machine comment is created (and they are used for displaying "recent activity"). If a comment is edited or deleted, what happens to the user_submission?
EDIT to add: we would probably want to track history using papertrail.
I will note that I'm the most active dev on the website right now, and I'm not a professional developer. So this will be challenging for me. If you have capacity and desire to take something like this on, let me know.
Side note: we used to allow users to edit their comments! Back in the pre-rails and pre-github days (subversion!), I believe. But it's all a little hazy - that was like 15 years ago.
Update: I have a branch where I'm making some progress on the editing functionality.
After working on that branch a bit, we are leaning away from implemented this. We would prefer to have new comments in order to display a history. But we might be open to having a short window when editing is available - like 10 minutes after posting the comment.
Just remembered this issue that we closed as not planned. Well times change! This is now a feature. Here's the issue for it https://github.com/pinballmap/pbm/issues/1576
Users can edit or delete their own comments.
As a user it would be nice to have the ability to edit and/or remove machine comments. (EG: when a machine issue is fixed)