Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent cards from loading until toggled #85

Closed
wb5xo opened this issue Sep 29, 2023 · 9 comments
Closed

Prevent cards from loading until toggled #85

wb5xo opened this issue Sep 29, 2023 · 9 comments
Labels
enhancement New feature or request

Comments

@wb5xo
Copy link

wb5xo commented Sep 29, 2023

When porting my cards from browser mod to bubble-card, One particular feature I've found necessary is the behavior where pop-ups aren't preloaded in Lovelace until the toggle button is pressed. This functionality proved highly effective for handling cameras. Therefore, when I apply the same approach to my four cameras using popup cards, all four cards are preloaded into Lovelace. This, in turn, leads to extended loading times for the dashboard as it renders all four camera cards simultaneously. My proposed enhancement idea is to include an option that allows the popup card to be somehow prevented from loading until the pop-up is activated.

A workaround to this is to put your popups on another dashboard and you can call them like 6#camera but its a little wonky sometimes it won't open the popup card.

@dnestico
Copy link

I agree I need this too because when I open the app I hear camera audio playing in the background now, as a workaround I've set the frigate card to mute by default but that doesn't mean it's not running in the background anymore still, might even help with performance too

@Clooos Clooos added the enhancement New feature or request label Oct 6, 2023
@Clooos
Copy link
Owner

Clooos commented Oct 6, 2023

I would love to be able to do that, but I don't know if it's even possible with how the pop-ups are working in Bubble Card right now.

A possible solution/workaround would be to add a conditional card in your pop-up with your camera in it, then add a new input_boolean as a condition. You can now use this same input_boolean to trigger it (with trigger_entity). As a result when you open your pop-up by toggling your input_boolean the conditional camera will be shown then hidden when the pop-up is closed.

@dnestico
Copy link

dnestico commented Oct 6, 2023

Maybe this conditional card functionality can be built in to the card? Hopefully there's a solution soon cuz I like the idea of a popup to quickly view a camera, it just shouldn't keep the card loaded when closed.

@Clooos
Copy link
Owner

Clooos commented Oct 6, 2023

On my dashboard I have a pop-up with two cameras and no sound, it work like charm for me. But indeed it could be cool to have such a feature, maybe by cloning the default vertical stack code to have a full control on how it work and load its content.

@dnestico
Copy link

dnestico commented Oct 6, 2023

Are you using the frigate card for the pop-up? I turned off the sound so I don't hear it anymore, but technically doesn't mean that the card isn't active anymore though. And yea full control would be awesome

@Clooos
Copy link
Owner

Clooos commented Oct 6, 2023

Yes I'm using it too, and I know that some cards are lazy loaded (the frigate card is not) but it could be indeed pretty cool to have the vertical stack directly when you create a pop-up, I will take a closer look at that.

@jimz011
Copy link

jimz011 commented Oct 23, 2023

I really like the cards, but after reworking my entire dashboard to just a single view with all bubble-card popups I also found that loading times are very bad when running a large dashboard like mine. I also believe this is caused because the entire code loads when opening the frontpage (as everything is on the frontpage, since I'm only using a single view). When leaving the app open on the background and coming back to it it will simply lock up and I'll need to restart the HA app (Android).

I wonder if it isn't possible to use a dom-event instead (like browser_mod or local conditional card does)? That would certainly speed up loading times as it would load on demand instead of on startup.

But still very nice cards! Kudos!

@Clooos
Copy link
Owner

Clooos commented Oct 23, 2023

Thanks for your feedback, have you tried v1.3.3? I've just released it and it should improve pop-ups performances a lot even if it's still not perfect yet. But I'm aware of this issue and I'm working on it almost everyday, I really hope that this will be fixed soon 🤞

@jimz011
Copy link

jimz011 commented Oct 23, 2023

No worries, just take whatever time you need. These projects are in free time and in no way is anyone entitled to apply pressure on you to speed up your project.

I will follow this thread and once in a while try out performance again.

Repository owner locked and limited conversation to collaborators Jan 6, 2024
@Clooos Clooos converted this issue into discussion #289 Jan 6, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants