Need condition requesting data finished

Data source is empty/isnt empty is unreliable, If you have group1 and group2, if a groups data is empty is not reliable, the invisible one will always be visible first. Page loaded entirely doesn’t work properly especially on SPA. We need groups data requested finished and groups data source is empty.

What is the issue you are facing? What’s the use case? How have you already tried to implement?

Yeah, relying on data source is empty / isn’t empty is super inconsistent right now, especially on SPAs where groups load at different times. Bubble evaluates visibility before the data actually finishes loading, so the “wrong” group flashes first even when the data isn’t ready.

The safer approach is to wait for the actual data request to finish instead of using visibility conditions. You can do this by triggering a tiny custom state when the search or mget finishes loading, and only show the group once that state is set. That way you’re reacting to the data actually being returned, not Bubble’s early guess.

If you want, I can show you the exact setup for that.

The guy below said, you go to a product and that product is removed, you need to show this product is removed banner not the product thus that flashing happens.

I will try this, condition 1 get data is x, data source is search for product, condition 2, if this groups data source is empty make the item invisible. By default product group will be visible.

Alright

It didnt work, how do you do it ?

Bubble is working the way it’s supposed to. There’s nothing unreliable about things.

Here’s a demo of how I think it should be set up so it works:


This is what I think will fix the flash etc.

I used ‘apartments’ because that was the repeating group I was using to build the 2 groups. You can use your own description

I am not using this on a repeating group

Ok, well, you can use a hidden repeating group to run the search and then show/hide your two groups based on the RG’s is loading is no and empty/not-empty. That removes the flash completely.

Outside of that, it’s hard to give a better option because I don’t know exactly what you’re trying to show and hide. If you post your setup, maybe I can give you a more specific fix

A product page

Group1 is product, (Data source search for product slug = get data from page)

Inside group1 there is group2 and group3.

Group3 says: This product is not available,
Group2 is the product attributes like image other stuff

When URL is wrong or product is not available anymore I want to show group3, else group2.

Its an SPA.

If you use group1’s data source is empty group2 is visible, else group3 is visible, ıf you do that, then group3 will flash, because Bubble has no default “Finished requesting”, so group will be empty if not populated. Page loaded entirely doesn’t work

Page loaded entirely just tells you the DOM is ready, it doesn’t mean all the searches are done. So, it does work as it’s intended.

Myself, I would use a hidden repeating group. I think it’s the only way you can fix your problem

You can’t empty repeating group is loaded is always no. You don’t know what you are talking about. This is not some simple problem. Don’t waste my time

Repeating Groups can be empty and still give is loading, just depends on whether the RG is doing the actual search.

All good though. Hard to help without seeing your setup. I’ll step out so the thread doesn’t get noisy. Good luck getting it figured out

Maybe some sort of efficient css timer that I can get values from, to delay

CSS can animate things, but it can’t tell you when Bubble has finished loading a search. The flicker comes from the data source being empty while the search resolves, and only Bubble elements with a loading flag can help there

I will make group3 ( visible product group) is visible, and with a delay like product is empty and 500ms delay this element is invisible.

A delay won’t solve it.

Bubble doesn’t load data on a schedule. Sometimes it’s 80ms, sometimes it’s 800ms. So 500ms will still flicker on slower loads. You’ll need a real loading state to fix it for real

Okay let me contact Bubble and wait 10 years

I was trying to help, but without seeing the setup it’s impossible to pinpoint the issue. If you ever want to post a screenshot of the product group’s data source, folks here can walk you through the right fix