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:

https://blog.codinghorror.com/hacker-hack-thyself/

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 Embedding Discourse Comments 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:

2019-04-17_11-50-22

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:

Ciao @simon,

Ti scrivo solo per un aggiornamento. Mi piacerebbe ancora vedere una presentazione più chiara delle risposte, delle citazioni e dei commenti su WordPress.

Hai avuto un po’ di tempo per occupartene?

Capirò perfettamente se non è stato possibile, ma volevo solo farti sapere che è una cosa che mi sta molto a cuore. Ho ricevuto alcuni altri commenti dai miei lettori secondo cui seguire la conversazione è confuso con il formato attuale, e penso che potrebbe incoraggiare più persone a provare Discourse sul mio sito se le copie su WordPress fossero un po’ più chiare.

Grazie per il tuo ottimo lavoro su questo plugin. È davvero fantastico e molto apprezzato. :slight_smile:

Sto valutando cosa si possa fare per indicare che un commento è una risposta, oppure per aggiungere un link “risposte” sotto i commenti che ne hanno. I dati necessari a questo scopo non vengono attualmente trasmessi da Discourse a WordPress, ma sembra che possano essere resi disponibili con una modifica abbastanza semplice a Discourse.

Sì, gli stili predefiniti per questo caso non sono molto buoni. Puoi migliorarli aggiungendo questa regola al CSS del tuo tema:

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

Con il tema WordPress twentyninteen, otterrai qualcosa di simile a questo:

L’aspettativa con il plugin è che i siti stiliino i commenti in modo da adattarli al proprio tema, ma gli stili abilitati quando l’opzione “Carica CSS dei commenti” è attiva dovrebbero fornire un punto di partenza ragionevole. Aggiornerò molto presto il plugin con una regola CSS simile a quella che ho pubblicato sopra.

Ciao Simon,

In qualche modo ho perso questo messaggio. Grazie per il consiglio sul CSS! Aggiungendolo, sono passato da:

a:

Che è decisamente un miglioramento. Ma il mio tema sta ancora aggiungendo quel bordo strano. Ho provato a guardare nel CSS, ma ci sono molti riferimenti a “borders” e faccio fatica a capire cosa ne sia responsabile. (Il mio livello di CSS non è dei migliori.)

Hai qualche consiglio su cosa cercare nel mio CSS per eliminare quel bordo, così da poter avvicinarmi di più a quello che sei riuscito a fare con il tema twentynineteen?

Capirò se non hai tempo. Continuerò a provare a risolverlo da solo. Ma grazie mille per avermi portato fin qui! :slight_smile:

Ci saranno alcuni miglioramenti al CSS predefinito delle citazioni nel prossimo aggiornamento del plugin.

Questa modifica dovrebbe risolvere l’allineamento a destra del blockquote e del suo titolo sul tuo sito. Dovrebbe anche risolvere il problema relativo al bordo. Questo CSS verrà aggiunto al plugin entro la fine della settimana, ma non ci saranno conseguenze nel caso tu lo aggiunga al tuo sito subito:

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

Grazie mille! È fantastico! (E penso sia ottimo che tu stia aggiungendo questa funzionalità al plugin di base.)

Ho aggiunto il codice e questo è il risultato:

Nel complesso, è un enorme miglioramento. Grazie mille!

Solo un’ultima cosa: esiste un modo per creare un piccolo spazio sotto la data, come nei commenti ma senza il riquadro bianco di risposta?

Penso che avere un po’ di spazio negativo tra la data e il bordo del riquadro bianco potrebbe rendere il tutto un po’ più pulito.

Sì, penso che si tratti di un problema legato al tuo tema. Prova ad aggiungere una regola CSS simile a questa:

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

Potrebbe essere necessario regolare il valore 22px per adattare il margine al tuo sito.

C’è un altro problema nel tuo tema che potresti voler correggere. WordPress utilizza elenchi ordinati per i commenti, ma utilizza il CSS per rimuovere i numeri dall’elenco. Se non vuoi visualizzare i numeri accanto ai commenti, prova ad aggiungere una regola simile a questa del tema Twentyninteen:

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

Yay! Tutto molto meglio, in generale. Quel CSS ha fatto la sua parte.

Grazie mille, @simon! Come sempre, sei fantastico! :smiley: