SOLVED: Bug with the "Add Element ID & class as needed" setting/functionality, not showing ID when it's needed

Bricks Version: 1.5 RC
Browser: Safari
OS: iOS 16

I am playing with the “Add Element ID & class as needed” setting in Bricks 1.5 RC, and I have found an issue where it doesn’t render properly in the frontend when enabled in my header.

In my scenario, I was testing with a 50px margin top to a header section (to the ID), and it never showed the margin in the mobile browser when I had it enabled. So I then disabled the functionality (keeping the margin though) and it then rendered correctly in the mobile frontend.

Here’s part of the header code looked with it disabled where it worked properly by rendering the margin:

<header id="brx-header"><section id="brxe-lsgkic" class="brxe-section"><div id="brxe-dcybxn" class="brxe-container"><div id="brxe-omvlgl" class="brxe-block"><span id="brxe-ojvolr" class="brxe-button bricks-button sm bricks-background-secondary">Shop Now</span><div id="brxe-rbnvpj" class="brxe-search"><div class="bricks-search-icon overlay-trigger"><i class="ion-md-search"></i></div>			<div class="bricks-search-overlay">

Here’s that same part of the header code with it enabled where it did not render correctly with the margin:

<header id="brx-header"><section class="brxe-section"><div id="brxe-dcybxn" class="brxe-container"><div id="brxe-omvlgl" class="brxe-block"><span id="brxe-ojvolr" class="brxe-button bricks-button sm bricks-background-secondary">Shop Now</span><div id="brxe-rbnvpj" class="brxe-search"><div class="bricks-search-icon overlay-trigger"><i class="ion-md-search"></i></div>			<div class="bricks-search-overlay">

The only difference (as I would expect) is the missing “id” when the functionality is enabled, and that appears to be happening even though there are styles applied to the id, so it’s removing it unexpectedly in this scenario.

Hi @d19dotca,
I wonder how much was it necessary to add such an option to bricks builder and what value does it add to bricks builder?
I don’t see it to be so much important and at the same time there are lots of other important features to be added.
If developers consume thier time by implementing such features and then bugs occur and they consume thier time again to resolve bugs then it will definitely delay implementing other important features.
What do you think? Should bricks developers consume thier time on implementing such features?

@Sharif_Payenda I personally felt this feature was important. Bricks main selling point always been the performance over the other builders. It gives us cleaner dom and should make Bricks slightly faster in editor as well as on the front-end. This feature is pretty stable from the usage on my site except one or two elements. Bricks is on schedule with 1.5 release. Why you are worrying so much?

@omega As I said I wonder what value does this feature add?
If you are right that implementing such feature makes bricks and websites faster then I will not worry and will be as much happy as you are for implementing this feature. If the value it adds is less important than the time it has taken to implement and the time it will take to resolve bugs then not only me but every bricks user should worry about taking such decisions. I have not spoken for my benefits but for bricks community benefits.

1 Like

@charaf - is it possible to edit my original post please to remove the URL link? Thank you in advance.

I have just removed the link. We seem to have completely overlooked the problem here. I assume, however, that it is no longer acute, because otherwise you would surely have raised your hands, right?

1 Like