Skip to:

Adding @username prefix to comment replies rather than default nested comments

  • homelesshenry


    In the activity stream, when a user replies to another user’s comment it will nest the comment (via indenting the comment/shifting if more to the right of the parent comment).

    This is alright, but it doesn’t hold up too well when getting down to smaller resolutions (because by the third to fifth nested comment the comment container width becomes too narrow).

    What I’m trying to achieve is another approach:

    I figure when a user clicks “Reply” to another user’s comment, it could add @ThatUser’sUsername either to the comment meta:

    Example: John replied to @Sally 4 hours ago

    Alternatively, it could add @ThatUser’sUsername as a prefixed/already typed in bit of text to the comment message box, so a user’s reply would start with @Sally (the rest of their comment).

    Either approach would work fine. So I am wondering if anyone has achieved this and could fill me in on the code to do it?

  • You must be logged in to reply to this topic.
Skip to toolbar