Skip to content

Make Hass.io menu toggle button work in pre and post 90 release#2959

Merged
pvizeli merged 1 commit into
devfrom
hassio-backwards-compat
Mar 18, 2019
Merged

Make Hass.io menu toggle button work in pre and post 90 release#2959
pvizeli merged 1 commit into
devfrom
hassio-backwards-compat

Conversation

@balloob
Copy link
Copy Markdown
Member

@balloob balloob commented Mar 18, 2019

In #2930 we simplified <ha-menu-button> to just fire hass-toggle-menu instead of differentiating between hass-open-menu and hass-close-menu. Great clean up, however also breaks the contract between custom panels that work in iframes and Home Assistant, of which one the most popular is Hass.io.

The Hass.io supervisor is not tight to a Home Assistant release. This means that newer builds of the supervisor and its new UI can run on old versions of Home Assistant. By breaking the API, it means that if the supervisor and its new UI would run on an old version of Home Assistant, the menu button won't work. Especially annoying if you are on mobile and are unable to dock the sidebar.

So to work around this, we're going to have the Hass.io panel translate hass-toggle-menu events into the appropriate hass-open-menu / hass-close-menu events to keep compatibility with older Home Assistant versions.

Lesson learned: don't mess with our custom panel API!

@ghost ghost assigned balloob Mar 18, 2019
@ghost ghost added the in progress label Mar 18, 2019
Comment thread hassio/src/hassio-app.js
@@ -1,41 +0,0 @@
import { html } from "@polymer/polymer/lib/utils/html-tag";
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted this file as it was not being used anymore.

@pvizeli pvizeli merged commit 2fe0398 into dev Mar 18, 2019
@pvizeli pvizeli deleted the hassio-backwards-compat branch March 18, 2019 07:53
@ghost ghost removed the in progress label Mar 18, 2019
@balloob balloob mentioned this pull request Mar 18, 2019
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants