Forum Documentation Showcase Pricing Learn more

Add an assignable html id attribute to UI elements in Bubble

For non-repeated UI elements, please add the ability to give an ID attribute assignment. This could have the following uses:

  1. Automated testing frameworks such as selenium - we can select UI elements based on the ID
  2. Javascript code, selecting by ID would be useful
  3. others?

http://www.w3schools.com/tags/att_global_id.asp

2 Likes

This is probably a little too low-level for us right now. We’re thinking about the plugin system and that will define what we let users do and not do.

So short answer is no, not yet, but we’ll keep this request in mind.

1 Like

Thanks for the response! I understand the need to keep it higher level.

1 Like

I’d +1 that. Would be great if the name of the element in the Elements Tree was reflected as an ID in the HTML. Then if someone did want to go a little more low-level it would be always an option.

@gakanimal check out this thread I started with some workarounds mentioned:

Edit: ok, so there isn’t a full solution posted there. I thought there was :slight_smile: Essentially you need to create a tiny HTML block within a group (1px by 1px) and inside this group you can create some JavaScript that appends class or ID to the parent Group element.

+1 for sure.

I updated another thread that I was working on here: How to make Repeating Group height dynamic to fit screen resolution?

This shows the full JS I used in the page header, without needing to create the HTML block, since I know the index of the Repeating Groups that I want to change the height of.

But although this works nicely for resizing, it has identified another bug/problem.

Go check it out - any suggestions welcome! :slight_smile:

2 Likes