Comment Reply Threading / Linking on the WordPress Side

Hi, one major issue I’m having with the WP-Discourse plugin is that comment replies are unclear. When there is a comment reply in Discourse, the WordPress side does not show what it’s a reply to. It’s just a pure flat conversation.

It would be nice to either utilize WordPress’ threading capabilities (unlikely given Discourse’s stance), or at least state “This is a reply to comment #2” or something like that.

Is that possible?

Thanks!

It has been discussed before, so you might search for those conversations; I’d point you to a thread, but it is always mentioned in passing. Get yer search on! :slight_smile:

I couldn’t find it. Was using keywords such as threaded and reply but that’s obviously not helpful. Will try Google.

I’ll see if there is something that can be done with that.

Our standard embed script works this way. See Jeff’s blog for example:

I like that - this could be acceptable. What’s “our standard embed script” though? What you have in WP-Discourse isn’t doing this for me (also tried in default theme, still nothing).

I believe he’s referring to Embed Discourse comments on another website via Javascript.

Hi, I’m revisiting this issue. The JS embed isn’t working well enough for my liking, so I’m looking at going back to the comment sync.

Doing some tests, many of our conversations look plain awful without knowing who’s replying to whom. Is there a possibility of getting a bit more clarity with the replies?

Unfortunately, when you are doing the wp_remote_get inside of lib/discourse-comment.php, using the best=____ parameter strips out the reply information from your JSON!

Not sure if that’s on purpose or is a bug, but that’s a roadblock on its own.

Edit: Yet, if you remove the best parameter, it doesn’t work with /wordpress.json anymore. I can see the problems baked in here for wanting this ‘simple’ change.

Thanks!

Hello,

I did a search and even though it’s said in this thread this has been discussed elsewhere, I can’t find it. (I also looked at WP Discourse template customization and WP Discourse Plugin Tips and Tricks.)

I just launched Discourse comments on my Wordpress site, and I’m having the same issue as Berto—without the context of “This is a reply to…” (either name or comment), the comments are a bit challenging to follow. Since I am trying to sell my readership that Discourse is a superior experience to Disqus, and that they should give it a try, it’s not the best look for that.

@simon Did you come up with a solution to this? Do I need to use the the Javascript embedding? It’d be great if I could make the conversation flow more clearly like on Coding Horror’s blog. (But I’d really prefer to keep using WP-Discourse, which I love.)

Thanks for bringing this up. I think that improving the way that comments are displayed should be the next thing we focus on for the plugin.

That would be awesome, @simon.

You already have a super-solid integration with linking the comments between the sites. Having both references to replies (and even active links that move you through the conversation) on Wordpress, like @codinghorror uses on his blog, would be a big benefit. His site, I think, gives a good template to start from and, if necessary, you could tweak the UI from there.

Please let me know if you need any help testing things. I’m happy to offer whatever assistance I can. :slight_smile:

If improving the way comments are displayed is something you’re going to focus on, I might also ask for a cleaner presentation for when you are quoting previous content.

Quoting is something I’m trying to encourage now in order to have the comments on Wordpress make more sense. But currently the name quoted and the quote itself are separate and styled differently:

I think it feels a little disconnected.

It’d be cool if it could match more like how it’s presented in Discourse:

I don’t know how hard that is to make happen, but my 2 cents anyway. :slight_smile:

Hey @simon,

I’m just checking in. I’d still love to see a cleaner presentation of the replies, quotes, and comments on Wordpress.

Have you had any bandwidth to look into that?

I’ll of course understand if you haven’t, but I just wanted to let you know that it’s very much something I’d like to see. I’ve gotten a few more comments from my readers that following the conversation is confusing in the current format, and I think it might encourage more folks to give Discourse a shot on my site if the Wordpress copies were a bit more clear.

Thank you for your great work on this plugin. It’s really awesome. And much appreciated. :slight_smile:

I am looking into what can be done to either indicate that a comment is a reply, or to add a ‘replies’ link beneath comments that have replies. The data required for this isn’t currently being passed from Discourse to WordPress, but it looks like it can be made available with a fairly small change to Discourse.

Yes, the default styles for this are not very good. You can improve them by adding this rule to your theme’s CSS:

.comment-body .quote blockquote {
	margin-top: 0;
	margin-right: 0;
}

With the WordPress twentyninteen theme, that will give you something like this:

The expectation with the plugin is that site’s will style the comments to match their theme, but the styles that are enabled when the Load Comment CSS option is enabled should give a reasonable starting point. I’ll add something like the CSS rule that I posted above to the plugin very soon.

Simon님,

어떻게 된 일인지 이 메시지를 놓치고 있었습니다. CSS 팁을 알려주셔서 감사합니다! 해당 코드를 추가하니 다음과 같은 변화가 생겼습니다:

2019-10-07_10-21-42

에서 다음과 같이 변했습니다:

확실히 개선된 모습입니다. 하지만 제 테마에서는 여전히 그 이상한 테두리가 추가되고 있어요. CSS를 살펴봤는데 'borders’에 대한 참조가 너무 많아서 그 테두리를 만드는 원인을 파악하기가 쉽지 않네요. (제 CSS 실력이 별로 좋지 않아서요.)

twentynineteen 테마로 달성하신 것처럼 그 테두리를 제거하고 결과를 더 비슷하게 보이게 하려면 CSS에서 어떤 부분을 찾아봐야 할지 팁을 주실 수 있을까요?

알려주실 수 없어도 이해하겠습니다. 계속 알아내려고 노력해볼게요. 여기까지 도와주셔서 정말 감사합니다! :slight_smile:

다음 플러그인 업데이트에서 기본 인용구 CSS에 몇 가지 개선 사항이 반영될 예정입니다.

이 변경 사항은 사이트에서 blockquote와 그 제목의 오른쪽 정렬을 수정하는 데 도움이 될 것입니다. 또한 보더 문제도 해결해야 합니다. 이 CSS는 이번 주 말까지 플러그인에 추가될 예정이지만, 지금 바로 사이트에 CSS를 추가해도 아무런 문제가 되지 않습니다:

.comment-body .quote blockquote {
    margin-top: 0;
    margin-right: 0;
    margin-bottom: 0;
    margin-left: 0;
    border-top: none;
    border-right: none;
    border-bottom: none;
}

.comment-body .quote blockquote p:last-child {
	margin-bottom: 0;
}

정말 감사합니다! 너무 좋아요! (기본 플러그인에 이 기능을 추가해 주실 것 같아서 정말 기쁩니다.)

코드를 추가했는데 이렇게 나왔습니다:

전반적으로 훨씬 좋아졌습니다. 정말 감사합니다!

마지막으로 한 가지 더 여쭤볼게요: 흰색 답변 상자가 없는 댓글처럼 날짜 아래에 조금의 여백을 만들 수 있는 방법이 있을까요?

날짜와 흰색 박스 가장자리 사이에 약간의 음영 여백(negative space)을 두면 훨씬 깔끔해 보일 것 같습니다.

네, 이는 테마와 관련된 문제인 것 같습니다. 다음과 유사한 CSS 규칙을 추가해 보세요:

.comment .comment-content {
    margin: 22px;
}

사이트에 맞게 여백을 맞추려면 22px 값을 조정해야 할 수 있습니다.

수정하고 싶은 테마의 또 다른 문제가 있습니다. WordPress는 댓글에 대해 순서 있는 목록(ordered list)을 사용하지만, CSS를 사용하여 목록에서 번호를 제거합니다. 댓글 옆에 번호를 표시하지 않으려면 Twentyninteen 테마의 이 규칙과 유사한 규칙을 추가해 보세요:

.comment-list {
    list-style: none;
}

와! 전반적으로 훨씬 나아졌네요. 그 CSS가 효과가 있었어요.

@simon, 정말 감사합니다! 언제나처럼 최고예요! :smiley: