commentit icon indicating copy to clipboard operation
commentit copied to clipboard

[Enhance] Add reply of comment feature

Open dbarobin opened this issue 9 years ago • 1 comments

I integrate commentit in my personal blog, but I discover I can't reply to comment. I'm looking forward to add this feature. Thanks!

dbarobin avatar Nov 29 '15 01:11 dbarobin

I asked myself how I could implement it.

First we need to implement a form that can popup when you click on a "reply" link on each comment.

Then in the data we have two options

  1. we add ID to comments, which makes it not retro-compatible. When a reply to a comment is sent, the ID of the comment is replied to is sent together.
  2. we base only of the order of comments. The order of the comment we reply to is sent along with the reply. We can use a dot-separated notation (such as 2.1 for first reply of second comment) to identify replies.

In first case 1, in the yaml data, we can add a field "reply-to" in comments which are replies. In case 2, we can just make a tree of comments in YAML data.

Because it is retro-compatible, I would more go on option 2, but please suggest any ideas. I will try to implement this month.

jillro avatar Dec 04 '15 14:12 jillro