# How to get answer's comments? (stackoverflow-like & tiny)

**URL:** https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660
**Category:** Support
**Created:** [January 31, 2017, 3:26pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660 "2017-01-31T15:26:41Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [January 31, 2017, 3:26pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/1 "2017-01-31T15:26:41Z")

</div>

By default, discourses answers and replies to answers are organized chronologically

- [QUESTION]
- Answer #1 (Monday)
- Answer #2 (Tuesday, early)
- 1st reply to answer #2 (Tuesday, late)
- 2nd reply to answer #2 (Wednesday, early)
- 1st reply to answer #1 (Wednesday, late)
- 2nd reply to answer #1 (Friday)
- 3nd reply to answer #2 (Saturday)

We know that Discourse does records the child-relation of replies to a parent answer, because as admin we can select an answer and its children :

[![enter image description here](https://global.discourse-cdn.com/meta/original/3X/3/5/355ae38b9f0f9b04e307a06fa98638d106d17144.gif)](https://global.discourse-cdn.com/meta/original/3X/3/5/355ae38b9f0f9b04e307a06fa98638d106d17144.gif)

I now want that each reply to an answer appears on my discourse, as for Stackoverflow/Stackexchange’s “comment vs answer”, below the answer it comments. Such as :

- [QUESTION]
- Answer #1 (Monday)
  - 1st reply to answer #1 (Wednesday)
  - 2nd reply to answer #1 (Friday)

- Answer #2 (Tuesday)
  - 1st reply to answer #2 (Tuesday)
  - 2nd reply to answer #2 (Wednesday)
  - 3nd reply to answer #2 (Saturday)

**Q: Is there a plugins or solution to have discrete, nested comments as for stack-exchanges sites ?**

* * *

Related to: [Thoughts on a plugin which turns discourse into stackoverflow](https://meta.discourse.org/t/thoughts-on-a-plugin-which-turns-discourse-into-stackoverflow/20763)

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 31, 2017, 5:05pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/2 "2017-01-31T17:05:15Z")

</div>

Discourse was designed for flat discussion. While we do store the `reply_to_postnumber` info, you’re going to have a really bad time if you want to do threading with Discourse.

---

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [January 31, 2017, 5:33pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/3 "2017-01-31T17:33:28Z")

</div>

If `reply_to_postnumber` is added the the post such as

```
<div class="topic-post clearfix regular" data-reply_to_postnumber="107" style="min-height: 1018px">
...
</div>

```

Then, some JS + CSS could do the sorting.

Is that first part so hard ?

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [January 31, 2017, 5:34pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/4 "2017-01-31T17:34:18Z")

</div>

Nope. The JS part is the hardest.

---

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [January 31, 2017, 6:22pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/5 "2017-01-31T18:22:19Z")

</div>

**For the reasons :**  
Discourse has a lot of sugar and settings that the competition doesn’t really have, or not as clean.  
StackOverflow is great but doesn’t provide its soft, or too expensively (\>=$175k).

**For the dev :**  
Sorting out the posts via JS seems easy, but side effects happen on the right side chrono-elevator.  
(I’am first thinking about a dirty client-side JS solution)  
The “Reply” form, also, suggest a flat system.

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [January 31, 2017, 10:02pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/6 "2017-01-31T22:02:07Z")

</div>

The thing that’ll really screw you up when trying to do nested comments is that a single post can be a reply to _multiple_ earlier posts. How you nest that (tuck the reply under the “first” replied-to post? the “biggest” reply? duplicate it under all the posts it replies to?) is something you’ll need to decide.

---

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [February 1, 2017, 10:17am UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/7 "2017-02-01T10:17:39Z")

</div>

**Clarification : only one more level wanted**  
I want to have a single level of comments, put below an answer. Really like stackoverflow. No need for deep depth nor deep tree nesting. The basic idea is that we often don’t want long chit-chat, but just send a discrete note and request for clarification, so the answer can be clarified where it is (author come back and improve his answer) rather than go into a pingpong discussions.

As for Stackoverflow, I would consider we either react-reply-answer to the topic’s question via an answer, or we react-reply-comment to an answer via a comment on it. I’am aware this is not the out of the box way of discourse, but I would like to _have this possibility available_.

**Reply to multiple earlier post ?**  
I have difficulties to understand your _“reply to multiple earlier posts”_ tho. You mean a reply (post=“6”) to a reply (post=“5”) to a reply (post=“3”)… produce that post 5 actually `reply_to_postnumber="4, 3, 2"` ??

```
* Question (post=2)
** reply (post="3" reply_to_postnumber="2") 
*** reply (post="4" reply_to_postnumber="3") 
**** reply (post="5" reply_to_postnumber="4")

```

and would be a challenge ?

**Possible approach.es**  
I think I could approach that like Stackoverflow, and helped by some clean CSS, make post=“3” an **answer** to post=“2”, and post=“4” and post=“5” both **comments** of post=“3”, very much like Stackoverflow.

But rather that this hack of current structure, it could be easier to have **a plugin which ADD a new comment array of objects** , attached/attachable to an answer. For the visual design, these comments being tiny in font-size, limited in number of characters, compact by design.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [February 1, 2017, 11:06am UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/8 "2017-02-01T11:06:25Z")

</div>

> [@hugo\_lpz](#):
>
> **Reply to multiple earlier post ?**  
> I have difficulties to understand your “_reply to multiple earlier posts_” tho. You mean a reply (post=“6”) to a reply (post=“5”) to a reply (post=“3”)… produce that post 5 actually `reply_to_postnumber="4, 3, 2"` ??

No. `reply_to_post_number` will always link to 1 post (when you clicked on the Reply button underneath a post).  
But, you can **quote** any number of posts, thus replying to multiple posts.

---

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [February 1, 2017, 11:36am UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/9 "2017-02-01T11:36:22Z")

</div>

Oh. I forgot about this “ **quote** ” functionality. lol. As usual, easy at first, then you get yourself into a long run. 😂

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [February 1, 2017, 12:34pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/10 "2017-02-01T12:34:21Z")

</div>

The answer to your question is that yes this is possible to do this in a plugin, but this plugin doesn’t exist yet. Discourse core will probably not adopt this functionality (but I don’t speak for them) as Discourse is designed for discussions, not QA topics. Nevertheless, Discourse has a great plugin system.

If you’re interested in building this plugin yourself, I can help you figure this out. If not, post a paid job on the [marketplace](https://meta.discourse.org/c/marketplace) and there are a number of good developers who could take it (I don’t take paid gigs).

---

<div class="post-metadata">

### Author: ![mpalmer](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mpalmer/32/45740_2.png) [@mpalmer](https://meta.discourse.org/u/mpalmer)
#### Post date: [February 1, 2017, 9:49pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/11 "2017-02-01T21:49:19Z")

</div>

> [@angus](#):
>
> Discourse is designed for discussions, not QA topics

I think this is the crux of the issue. If you want something Stack Overflow-like, then there are plenty of open source SO clones out there (some of them _eerily_ similar) that you can use. Trying to shoehorn Q&A into Discourse is unlikely to end with a satisfying result for anyone.

---

<div class="post-metadata">

### Author: ![hugo\_lpz](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hugo_lpz/32/120290_2.png) [@hugo\_lpz](https://meta.discourse.org/u/hugo_lpz)
#### Post date: [February 1, 2017, 10:38pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/12 "2017-02-01T22:38:47Z")

</div>

I looked for opensource SO-like, often one man made project, not as many functionalities, no active development.  
Lot of noise.  
Also, Discourse is interesting, the _civic_ approach is interesting. We are looking for a mix. But i’am open to SO-like suggestions.

---

<div class="post-metadata">

### Author: ![neborion](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neborion/32/180352_2.png) [@neborion](https://meta.discourse.org/u/neborion)
#### Post date: [May 13, 2020, 11:40pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/14 "2020-05-13T23:40:08Z")

</div>

> [@hugo\_lpz](#):
>
> I would like to _have this possibility available_ .

Indeed, I would like to testify that the need for this to be possible is shared.  
I am glad to learn that it is technically possible through plugin development. @angus  
I’m still looking for ways to implement this reply behavior through the forum.

---

<div class="post-metadata">

### Author: ![angus](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/angus/32/341715_2.png) [@angus](https://meta.discourse.org/u/angus)
#### Post date: [May 13, 2020, 11:54pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/15 "2020-05-13T23:54:35Z")

</div>

In the intervening years since this topic was last active, such a plugin has been created 🙂

> [@Question Answer Plugin](https://meta.discourse.org/t/question-answer-plugin/56032):
>
> mega This plugin is now retired in favour of the official [Discourse Post Voting](https://meta.discourse.org/t/discourse-post-voting/227808) plugin Question Answer plugin that allows you to create topics in a similar QA style used by Stack Overflow. [page_facing_up Get the code](https://github.com/paviliondev/discourse-question-answer)[desktop_computer See an example](https://try.thepavilion.io/c/qa/)[raising_hand_woman Request a feature](https://thepavilion.io/w/feature-request)[bug Report a bug](https://thepavilion.io/w/bug-report)Of note memoUp-votes, but no down-votes (yet) The first post of the topic cannot be voted on (yet). Adding this would raise some …

---

<div class="post-metadata">

### Author: ![hoangphuctran93](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/hoangphuctran93/32/290976_2.png) [@hoangphuctran93](https://meta.discourse.org/u/hoangphuctran93)
#### Post date: [February 13, 2023, 1:45am UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/16 "2023-02-13T01:45:03Z")

</div>

oh wow this is what i was looking for 5 years ago since i started using and growing a community with Discourse

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 13, 2023, 3:43pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/17 "2023-02-13T15:43:50Z")

</div>

Angus’s plugin is now discontinued in favor of the official Discourse Post plugin:

> [@Discourse Post Voting](https://meta.discourse.org/t/discourse-post-voting/227808):
>
> discourse2Summary Discourse Post Voting allows the creation of topics with votable posts.open_bookInstall Guide This plugin is bundled with Discourse core. There is no need to install the plugin separately. Features To create a new topic with votable posts open the menu in the top left of the composer and select ‘Toggle Post Voting’: With the topic in Post Voting mode, there’s a filter to sort answers by votes or by activity. Here’s an example …

---

<div class="post-metadata">

### Author: ![Canapin](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/canapin/32/119591_2.png) [@Canapin](https://meta.discourse.org/u/Canapin)
#### Post date: [February 13, 2023, 3:43pm UTC](https://meta.discourse.org/t/how-to-get-answers-comments-stackoverflow-like-tiny/56660/18 "2023-02-13T15:43:56Z")

</div>


