-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix: 'add reply' link should link directly reply to comment form
See #77
- Loading branch information
Showing
1 changed file
with
5 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
686b273
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jaswsinc Here's why 686b273 fixes a bug:
If someone reads a comment in a comment notification email and then clicks "add reply", the most common expectation will be that we're replying to the comment, not replying to the entire post (after all, we just read a specific comment and then clicked 'add reply'; we didn't read the entire post and click 'add reply').
However, prior to this commit, the 'add reply` link was linking directly to the comment. You could argue that the user then just needs to click the "Reply" button on the comment form to reply to that comment, however there is one common scenario where this does not happen:
If a new comment notification arrives and a user clicks 'add reply', they are sent to the permalink for the comment (e.g.,
/hello-world/#comment-34
). However, if this comment is the most recent comment (i.e., the last comment in the list of comments), the main comment reply form will be directly beneath the comment:When the user sees this comment form, there won't be any reason for them to click "Reply" on the comment they're actually responding to, so instead they will use the comment form that is visible thinking they're replying to the comment they just read, when in fact they're just posting a new top-level comment responding to the whole post.
This makes for a lot of confusion! I recall fixing a similar bug in StCR over a year ago.
In any case, this commit changes the link for by 'add reply
in the email templates so that it uses
replytocom=, e.g.,
/hello-world/?replytocom=34#respond`. This causes the reply form to be loaded already assigned to the comment to which the user is replying.The only downside to this is that using
replytocom
doesn't load the form in-line with the comment being replied to (i.e., you'd have to scroll back up and look for the comment you're responding to if you want to re-read it), however in my experience that's worth giving up in return for linking to a comment form that doesn't require clicking "Reply" on the comment you want to reply to.