lml / commontator

A Rails engine for comments
MIT License
353 stars 99 forks source link

Possible bug: Reply links direct to very first comment on the page, no matter which link is clicked on #146

Closed aurora-a-k-a-lightning closed 5 years ago

aurora-a-k-a-lightning commented 5 years ago
rails 5.2.3
commontator 6.0.1

pre-reqs:

Steps to reproduce:

  1. create at least 2 top level comments
  2. click on "Reply to Comment." on the second comment

Expected Result: The comment box textarea appears underneath the comment that was chosen to be commented on

Actual Result: The comment box textarea appears underneath the very first comment of the page

Dantemss commented 5 years ago

I believe the behavior is correct. With comment_order :e, the box appears after the last comment in the page. With comment_order :l, it appears before the first comment.

That said, maybe we want a new new_comment_style to make the box appear indented. And we want to not render the cancel button if new_comment_style is :t.

Dantemss commented 5 years ago

On second thought, maybe the new comment form should always appear where the new comment will actually be. Please give https://github.com/lml/commontator/pull/147 a try and let me know what you think.

aurora-a-k-a-lightning commented 5 years ago

I think this is good. Thank you so much for looking into it! :smile:

Dantemss commented 5 years ago

Glad to hear. I released version 6.1.0 with this fix.