Element height when hidden

Update to my question as the previous one was not so clear.

I created a menu for my application. This menu is the main group. Inside the menu I have subcategory groups and inside the subcategory group I have the text element.

When I hide the subcategory group I also collapse this element’s height. The problem for me is that the main group is also affected by the height.

Hi @nocodeventure :slight_smile: Yes, a text element’s height will collapse when hidden. Here is more info:

I made a mistake when I said im hiding the text element. I am hiding the subcategory group inside the main group.

For example I have the text element inside a subcategory group and the strange thing is that also the menu group height changes when the subcategory element is hidden.

The issue is the main group being affected by the collapse.

@nocodeventure Ohh, got it! :slight_smile:

One workaround is to place the submenu groups in a group, and place a shape element at the bottom of the main group (inside the main group, but outside of the submenu group):

Main Group:

Inner Submenu Group:

Shape element:

Here I made the shape yellow and large but this could just be 1px by 1px and transparent on the left-side of the submenu groups. This way it won’t be noticeable to the User, but Bubble will maintain the shape element’s top margin, preventing the main group from changing in height as the inside submenu groups collapse in height.



That should work! :slight_smile:

1 Like

I appreciate the solution but this seems like a bug and the solution is not working for me the main group height is still affected. Why is the main group height being affected…

@nocodeventure I believe this is intended behavior as this is commonly used for single page apps that have many vertically-stacked groups, which are shown conditionally and collapse in height when hidden. In those cases, collapsing the main group’s height would be preferred so there isn’t a ton of extra scrolling/whitespace. If you’d like to share a link to your app editor or a screenshot of your setup I can definitely take a look!

sent pm

1 Like