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:

Olá @simon,

Estou apenas dando um alô. Ainda adoraria ver uma apresentação mais clara das respostas, citações e comentários no WordPress.

Você teve alguma disponibilidade para investigar isso?

Claro que entendo se não tiver tido, mas só queria deixar claro que é algo que eu realmente gostaria de ver. Tenho recebido mais alguns comentários de meus leitores dizendo que acompanhar a conversa está confuso no formato atual, e acho que isso poderia encorajar mais pessoas a experimentar o Discourse no meu site, se as cópias do WordPress ficassem um pouco mais claras.

Obrigado pelo seu excelente trabalho com este plugin. É realmente incrível e muito apreciado. :slight_smile:

Estou analisando o que pode ser feito para indicar que um comentário é uma resposta ou para adicionar um link de ‘respostas’ abaixo dos comentários que têm respostas. Os dados necessários para isso não estão sendo transmitidos atualmente do Discourse para o WordPress, mas parece que isso pode ser disponibilizado com uma mudança relativamente pequena no Discourse.

Sim, os estilos padrão para isso não são muito bons. Você pode melhorá-los adicionando esta regra ao CSS do seu tema:

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

Com o tema twentyninteen do WordPress, isso resultará em algo assim:

A expectativa com o plugin é que os sites estilizarão os comentários para combinar com seus temas, mas os estilos habilitados quando a opção ‘Load Comment CSS’ está ativada devem fornecer um ponto de partida razoável. Em breve, adicionarei algo como a regra de CSS que postei acima ao plugin.

Oi Simon,

De alguma forma, eu perdi isso. Obrigado pela dica de CSS! Ao adicioná-la, passei de:

para:

O que é definitivamente uma melhoria. Mas meu tema ainda está adicionando aquela borda estranha. Tentei examinar o CSS, mas há muitas referências a “borders” e estou tendo dificuldade em descobrir o que está causando isso. (Meu conhecimento de CSS não é dos melhores.)

Você teria alguma dica sobre o que procurar no meu CSS para remover essa borda, para que eu possa me aproximar mais do que você conseguiu fazer com o tema twentynineteen?

Vou entender se não tiver. Vou continuar tentando descobrir. Mas muito obrigado por me levar até aqui com isso! :slight_smile:

Haverá algumas melhorias no CSS padrão das citações na próxima atualização do plugin.

Essa alteração deve resolver o alinhamento à direita do blockquote e seu título no seu site. Também deve corrigir o problema com a borda. Esse CSS será adicionado ao plugin até o final da semana, mas não há nenhum problema em adicioná-lo ao seu site imediatamente:

.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;
}

Muito obrigado! Isso é incrível! (E acho ótimo que você vá adicionar isso ao plugin base.)

Adicionei o código e foi isso que obtive:

No geral, é uma grande melhoria. Muito obrigado!

Só mais uma coisa: existe alguma maneira de criar um pequeno espaço abaixo da data, como nos comentários, sem a caixa branca de resposta?

Acho que ter um pequeno espaço negativo entre a data e a borda da caixa branca poderia deixar o visual um pouco mais limpo.

Sim, acredito que isso seja um problema relacionado ao seu tema. Tente adicionar uma regra de CSS semelhante a esta:

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

Você pode precisar ajustar o valor de 22px para que a margem combine com o seu site.

Há outro problema no seu tema que você pode querer corrigir. O WordPress usa listas ordenadas para os comentários, mas utiliza CSS para remover os números da lista. Se você não deseja exibir números ao lado dos comentários, tente adicionar uma regra semelhante a esta do tema Twentyninteen:

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

Yay! Muito melhor, em todos os aspectos. Esse CSS resolveu.

Muito obrigado, @simon! Como sempre, você é demais! :smiley: