hass-browser_mod icon indicating copy to clipboard operation
hass-browser_mod copied to clipboard

Nested Popups

Open muddro1 opened this issue 2 years ago • 2 comments

My Home Assistant version: 0.XX.X

What I am doing: Trying to have a popup within a popup. Was able to do this in 1.x. I have tried to have a standalone second popup card as well as a popup card within the popup card.

What I expected to happen: Long press on main card produces popup with various entities. I want to be able to long press on another entity within this popup to produce another popup card.

What happened instead: brings standard longpress actino

Minimal steps to reproduce:

# The least amount of code or steps possible to reproduce my error
      - type: custom:popup-card
        entity: light.bedroom_lights
        title: Bedroom Lights
        dismissable: true
        card:
          type: vertical-stack
          cards:
            - type: custom:mushroom-light-card
              entity: light.bedroom_lights
              name: Main Bedroom Lights
              show_brightness_control: true
              layout: horizontal
            - type: custom:mushroom-light-card
              entity: light.lamps
              show_brightness_control: true
              layout: horizontal
              name: Bedroom Lamps
            - type: custom:mushroom-light-card
              entity: light.bedroom_fan
              show_brightness_control: false
              layout: horizontal
            - type: custom:popup-card
              entity: light.lamps
              title: Bedroom Lamps
              dismissable: true
              card:
                type: vertical-stack
                cards:
                  - type: custom:mushroom-light-card
                    entity: light.zach
                    name: Zach's Lamp
                    show_brightness_control: true
                    layout: horizontal
                  - type: custom:mushroom-light-card
                    entity: light.kristin
                    show_brightness_control: true
                    layout: horizontal
                    name: Kristin's Lamps
# Put your code/steps here

Error messages from the browser console:

// Select everything from the browser console and copy it

// Paste it here

By replacing the space in the checkboxes ([ ]) with an X below, I indicate that I:

  • [x] Understand that this is a channel for reporting bugs, not a support forum (https://community.home-assistant.io/).

  • [x] Have made sure I am using the latest version of the plugin.

  • [x] Have followed the troubleshooting steps of the "Common Problems" section of https://github.com/thomasloven/hass-config/wiki/Lovelace-Plugins.

  • [x] Understand that leaving one or more boxes unticked or failure to follow the template above may increase the time required to handle my bug-report, or cause it to be closed without further action.

muddro1 avatar Sep 05 '22 13:09 muddro1

But if you are doing this with fire-dom, nested popups are working here. Still in v2. Of course the first is closed, but this was the case before already (other when opening more info, there the popup stayed open in v1).

emufan avatar Sep 15 '22 16:09 emufan

ok I've redone mine and made this:

          - type: horizontal-stack
            cards:
              - type: horizontal-stack
                cards:
                  - type: custom:mushroom-light-card
                    entity: light.bedroom_lights
                    layout: vertical
                    show_brightness_control: true
                    use_light_color: false
                    icon: bha:ceiling-downlight
                    name: Main Bedroom
                    collapsible_controls: true
                    hold_action:
                      action: fire-dom-event
                      browser_mod:
                        service: browser_mod.popup
                        data:
                          title: Bedroom Lights
                          content:
                            type: vertical-stack
                            cards:
                              - type: custom:mushroom-light-card
                                entity: light.bedroom_lights
                                name: Main Bedroom Lights
                                show_brightness_control: true
                                layout: horizontal
                              - type: custom:mushroom-light-card
                                entity: light.lamps
                                show_brightness_control: true
                                layout: horizontal
                                name: Bedroom Lamps
                                hold_action:
                                  action: fire-dom-event
                                  browser_mod:
                                    service: browser_mod.popup
                                    data:
                                      title: Lamps
                                      content:
                                        type: vertical-stack
                                        cards:
                                          - type: custom:mushroom-light-card
                                            entity: light.name1
                                            name: name1's Lamp
                                            show_brightness_control: true
                                            layout: horizontal
                                          - type: custom:mushroom-light-card
                                            entity: light.name2
                                            show_brightness_control: true
                                            layout: horizontal
                                            name: name2's Lamps
                              - type: custom:mushroom-light-card
                                entity: light.bedroom_fan
                                show_brightness_control: false
                                layout: horizontal
  1. Would def prefer a card version of this, or as another issue noted, one that could be defined for the whole card as it was for previous version.
  2. It still has issues on mobile where one must long press twice for the nested popup to appear.

muddro1 avatar Sep 15 '22 17:09 muddro1

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Nov 19 '22 16:11 stale[bot]