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!

Guys I am going crazy with this one. I simply cant get the RG cell to resize when an inner group becomes visible. Collapse element height when hidden is selected on the pink group. The button toggles the visibility of the pink box. Either way the RG cell wont resize.I keep reading the above help but I must be missing something. When the pink group is hidden i am expecting the cell to resize up to the purple group but alas no go.

Any help would be hugely appreciated

Ah it has now started working. No sure what was wrong but I am sorted.