Nesting Comments

I’d like a create a commenting system that can be nested infinitely. Does anyone have an example of how this could be accomplished.

To give a little more clarity to what I’m wanting to do:


  • Reply to Comment
    • Reply to Reply
      • Reply to Reply
        • Reply to Reply
        • etc…

It’s easy enough to create a “Comments” table and then create a “reply1” table which is connected to the Comments table. Then create a “reply2” table which is connected to the “reply1” table. But I’m thinking there must be a more dynamic way of doing something like this.

Any help would be very much appreciated.

Hi cfisher440,

I just created a video for you to illustrate how this is done.

Skip the basics by clicking 4:43 in the video.

Hope this helps.

What you can do to make it look cleaner is only have a speech bubble icon instead of the input together with the post reply button always showing and being in the way of the reader. So the speech bubble icon unhides that group, that is normally collapsed when hidden.


Hi @TipLister,

Thanks for creating the video. That was great. I really appreciate you taking the time to do that. This is a better way compared to what I was thinking as it consolidates all the replies into one table and seems to solve the problem of doing infinite nesting from a database point-of-view. This solves half of the problem.

Unfortunately, to do things this way, I need to create a table within a table within a table, and so on using the Bubble editor. This makes the amount of nesting finite within the UI. Ideally, I’d like to be able to nest comments infinitely within the UI. So, as I mentioned, your solution seems to solve half of the problem by making nested replies infinite within the database, but, like I mentioned, not within the UI. So my challenge to you is this. Is there a way to make the nesting infinite within the UI?

I’m thinking somehow there would only be one table on the editor for the replies and, somehow, there would have to be conditional formatting to indent the replies of replies, replies of replies of replies, and so on.

You mentioned Reddit, at the beginning of the video. That’s exactly what I’m thinking. Something like Reddit. Or if this was a to-do list app, listing one main to-do and then being able to list sub to-dos infinitely.

If you’re able to come up with a solution for this, it would be a huge win for the community, at large, since I feel many people could benefit from such a solution.

Hi cfisher440,

What made this a little more difficult is the setup of having comments with a list of replies as well as replies with lists of replies. This setup is however the setup that scales the best I believe ;).

Conditional indenting is not really possible with Bubble as far as I know.
You could change the colour code by making the background within each cell of the RG and of the parent group, lighter, as you go from lvl 1 to 5.
Editor link:


1 Like

Data Type : Comment
Comment : Text
Parent Comment : Comment

Count the number of Comments with the same parent comment, which have a created date < this comment. (that’s the number in the input box above reply)

Stick that number of spaces before the comment text.

Count of zero / no parent comment = the parent.

1 Like

I like what you did here. Unfortunately, it’s not something I would use on the project I’m working on. It doesn’t totally meet my requirements.
From a UI point-of-view and functionally speaking, I want to be able to see all nested replies with proper formatting. Again, probably the best example I can think of would be the way Reddit does their commenting system if you’ve seen that before.

This topic was automatically closed after 70 days. New replies are no longer allowed.