Clooos / Bubble-Card

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

Vertical stack hopping when opening and closing a pop-up in Desktop mode #626

Closed Nazze closed 2 months ago

Nazze commented 3 months ago

For any feature request you can open a new discussion here:
https://github.com/Clooos/Bubble-Card/discussions/categories/feature-requests

For any question you can open a new discussion here:
https://github.com/Clooos/Bubble-Card/discussions/categories/q-a

Describe the bug
In Desktop mode, when opening and closing a pop-up, the whole vertical stack is moving to the left.

To Reproduce
Steps to reproduce the behavior:

  1. Create an empty dashboard
  2. Create vertical stack
  3. Create a button in the vertical stack
  4. Set navigate to "#bla_popup" for this button
  5. Create a new vertical stack
  6. Create a bubble pop in that vertical stack
  7. Set the name of the pop up "Test"
  8. Save and refresh
  9. Press the button
  10. Close the button
  11. See that the button moves from middle to left to the middle

Expected behavior
The vertical stack should not move.

Screenshots

https://github.com/Clooos/Bubble-Card/assets/33813707/d50338be-0ee7-497c-b281-2438617670fa

YAML
If applicable, add any relevant YAML code.

Sample code here:
`views:
  - title: Home
    cards:
      - type: vertical-stack
        cards:
          - show_name: true
            show_icon: true
            type: button
            tap_action:
              action: navigate
              navigation_path: '#bla_popup'
            entity: light.lichter_buero
      - type: vertical-stack
        cards:
          - type: custom:bubble-card
            card_type: pop-up
            hash: '#bla_popup'
            name: Test
`

Informations (please complete the following information):

Additional context
Add any other context about the problem here.

Thank you! 🍻 Thank you, Clooos!

Clooos commented 3 months ago

Hi! Indeed, it only happens when that button is inside of a vertical stack, without it it's working as expected.

Adding the pop-up at the top kinda works, but it moves a bit too.

I really don't know why it's happening, have you considered trying the new section view type? In this mode everything works flawlessly, because I really don't know if I will be able to fix that issue.

Nazze commented 3 months ago

Hi! I didn't work on the new section view type yet. My dashboard is really complex. Since the section view type was experimental, I wanted to wait until it is more or less stable and then migrate. And it will take a day or two.

So if this is complicated to fix, I can wait for the section view to be stable

And while writing this thought came up: I think I can try my dashboard also without the first vertical stack. Don’t know how it will look like, though. Let me get back on that.

pgale commented 3 months ago

Jumping in here to ask a question @Clooos - you recommend the section view but as @Nazze mentions, I've been holding off too and have tested it a few times. Still doesn't quite seem mature enough. Why do you recommend it over standard vertical card layouts etc?

Clooos commented 3 months ago

I haven't found a single issue and it's so easy to create a nice dashboard with it, also in a section view you can place your pop-ups anywhere without any alteration of the layout. It's almost perfect since v2 in the masonry layout, but this issue proves that it's not 😅

pgale commented 3 months ago

I'll have to see about transitioning one of my dashboards to it.

Nazze commented 2 months ago

Strange. With beta 2 it is working with my complex dashboard... So should I close this bug as of now?

Clooos commented 2 months ago

I've changed something with how the pop-ups are hidden to fix the editor issue, so this is totally possible 🎉