Skip to content

[FR]: Use built in Home Assistant dialog mechanism for popups #973

@dcapslock

Description

@dcapslock

Using the built in Hass dialog mechanisn for popups. Most changes required will be in the PopupMixin class.

There will be lots of benefits to this and will fix some current Issues/FR.

  1. z-index issues go away Hass makes sure to put the dialog as last child of <home-assistant>. Fixes all quirks of allowing for nested more-info dialogs (removes some style hacks). Fixes Style popup so form pickers correctly show on top without any manual styling. #845 without any z-index style hacks.
  2. Should allow for multiple popups (Fixes Return to previous popup #547). Quick look at <browser-mod-popup> class suggests that multiple instances should be fine, its just the PopupMixin that uses one instance of <browser-mod-popup> for simplicity. Once we have Hass manage the popup order, then there should be little for PopupMixin to manage.
  3. Following on from '2', some thought needs to be given to browser_mod.close_popup. Hass dialog should be able to help, and if the popup_card_id is available when this FR is released then we can use that as a parameter for selecting the popup to close. If omitted then either close top or all, to provide backwards compatability.
  4. Look into popup stack options like provide by Hass. That is, whether a back or close button is shown for, and if an option to browser_mod.popup is required.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions