pull down to refresh
10 sats \ 4 replies \ @Signal312 OP 2 Oct 2024 \ parent \ on: How about creating...a type of stacker.news post that can be updated? meta
Got it, thank you. I thought I've seen discussion of this before, but then couldn't find anything searching on stacker news. Should have checked the feature requests!
Looks like on Reddit, they do allow edits (with some restrictions).
reply
Something like this might be relatively straightforward:
-
Have an ItemEditHistory table. Perhaps only these fields:
id
originalItemID
createdAt
title
text
editReason ?
-
Add field to Item table
nEdits (sum of related rows in ItemEditHistory)
-
When an edit occurs: -- Insert new record (with old text and title values, and current datetime for createdAt field) from item to the ItemEditHistory -- In the original Item record, update the text and title fields with the updated values, and update nEdits with the total of related records from ItemEditHistory table
-
The post could have a little button on it, indicating (if edited) the number of edits. Then just don't show that button if it hasn't been edited, to avoid clutter.
-
It should be straightforward to show a history of edits.
Mentioning @elvismercury because he wrote some posts on this as well.