Forum Documentation Showcase Pricing Learn more

Repeating group does not collapse properly

Hi, I have tried to do a comments section like in a forum. I used a repeating group with 1 row and set it to expand to show comments when clicked on. However,when i close it, the gap still remains and it looks very ugly on the app. Anyone can advise how to make the group go back to the original spacing? Or is there a better way to do a comments/forum section?

Before clicking:
image
After clicking to open comment :
image
After clicking to close current comment:
image

What you want to do is to put your repeating group inside of another group. Doing so enables you to access the “collapse this elements group when hidden” function. (See screenshot below).

Since this function doesn’t apply to repeating groups, that’s why you set it up inside of a repeating group. (Given that, ensure that your show/hide function impacts the group, not the repeating group).

Depending on the overall effect that you want, you may need to also draw a group around all of the cell contents within the repeating group and apply the collapse function there as well.

Let me know if you have any trouble setting it up and I’ll share an editor example.

Dan (creator of LearnTo: it’s like Netflix for learning how to use Bubble).

1 Like

Thanks for the clear explanation! Are you able to share the example? We do not want to collapse the post titles(highlighted in green), only the comments(white space), and aren’t sure what is the best way to implement it because we are using repeating group of 1 row.

An example will be good for us :slight_smile:

Just recorded a video based on a live example. Take a look :slight_smile:

1 Like

Hi @loh.cher.e ,

Took me longer than it should have to figure this out myself :slight_smile:

I had the same problem (RG with very tall cells for an image, but then the cells were too tall for short text). I resolved it by putting a normal group inside the RG’s large cell (beneath the text element), and set it to collapse when hidden - and it’s always hidden.

I’ve outlined the group in the image below. Hope this gets you a bit further!