Clooos / Bubble-Card

Bubble Card is a minimalist card collection for Home Assistant with a nice pop-up touch.
MIT License
1.44k stars 39 forks source link

Pop-up Close Action #478

Closed electroflame closed 2 months ago

electroflame commented 2 months ago

Hi there!

Background I'm using Bubble Card in an, admittedly, non-standard way. As an example, I've got two views:

Home Kitchen

From Home, I can launch into a pop-up in Kitchen simply by targeting "kitchen#popup" which correctly flips over to the Kitchen view and opens up the Bubble Card matching "#popup".

From Kitchen#Popup, I can then add a button to go back to Home simply by targeting the Home view, or even go back to a popup in Home by targeting "home#popupHome".

All of this works great (and it's not mentioned explicitly, so it's fantastic that it works).

The issue lies in what happens if I were to close the "kitchen#popup" -- I would end up on the Kitchen view, when I want to end up back at Home.

Feature Request Would it be possible to add a configurable action (On Close, etc.) so I can set a navigation path when the card is closed? That way I could have a card kick me back to Home when closed, rather than setting up a bunch of extra "Back to Home" buttons.

In a nutshell, I'm looking for:

A configurable Close Action that works for all close scenarios, for example: Hitting the close button Tapping empty space to close a card Swiping down, etc.

By being able to set a Navigation Path when closed, it would make it possible to essentially navigate between cards multiple-levels deep, just by keeping track of what URL path a card should kick you back to when closed. This would basically make it possible to have "child popups" that can only direct back to their parent popup.

electroflame commented 2 months ago

Hey, @Clooos, I saw that after (or around) the time I posted this you added the guideline to use discussions -- would you rather I close this and open a discussion instead?