Skip to content

No way to leave the panel / reopen the sidebar when the sidebar is hidden #29

Description

@SH1FT-W

Description

HACS Vision registers as a full-page panel (panel_custom, embed_iframe=False), but its toolbar has no hamburger/menu button and no back or close control. As long as the HA sidebar is visible, this is fine — you just click another panel. But as soon as the sidebar is hidden, there is no way out of Vision except editing the URL manually or reloading the page.

Note: v5.0.0 removed the "redundant ≡ button" (Fix: 重复折叠键 — 移除多余 ≡ 按钮). Since HA's own panels always keep ha-menu-button in the toolbar exactly for this case, Vision is now the only panel you can get stuck in.

Steps to reproduce

  1. Open the HA sidebar, right-click the HA logo → Hide sidebar (or use kiosk-mode / a narrow mobile viewport where the sidebar is collapsed by default).
  2. Navigate to the HACS Vision panel.
  3. Try to get back to another panel.

Actual behavior

No hamburger, back or close button anywhere in the Vision toolbar. The sidebar cannot be reopened from within the panel, so the user is stuck until they type a different URL or reload.

The same applies to the embedded config-page modal (iframe with the sidebar cropped via CSS) when it is opened in fullscreen — there is no consistent escape control there either.

Expected behavior

The panel toolbar always shows a menu button that toggles the HA sidebar, the way native HA panels do — regardless of whether the sidebar is docked, collapsed or hidden.

Suggested fix

Render HA's standard menu button in the panel header and let HA handle the rest:

<ha-menu-button .hass=${this.hass} .narrow=${this.narrow}></ha-menu-button>

or, if you want to keep your own icon button, just fire the event HA listens for:

this.dispatchEvent(new CustomEvent("hass-toggle-menu", { bubbles: true, composed: true }));

panel_custom with embed_iframe: false already passes hass, narrow, route and panel to the panel element, so both work without extra plumbing. Additionally, Escape should reliably close the fullscreen iframe modal.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions