Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

panel_custom: Allow ES5+latest build, deprecate html #36464

Merged
merged 2 commits into from
Jun 5, 2020

Conversation

balloob
Copy link
Member

@balloob balloob commented Jun 5, 2020

Breaking change

Specifying custom panels based on HTML imports is being deprecated and will be removed in a future version.

Proposed change

Allow specifying both an es5 + latest build for custom panels.

Deprecates specifying HTML panels.

Requires home-assistant/frontend#6104

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New integration (thank you!)
  • New feature (which adds functionality to an existing integration)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example entry for configuration.yaml:

# Example configuration.yaml

Additional information

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue:
  • Link to documentation pull request:

Checklist

  • The code change is tested and works locally.
  • Local tests pass. Your PR cannot be merged unless tests pass
  • There is no commented out code in this PR.
  • I have followed the development checklist
  • The code has been formatted using Black (black --fast homeassistant tests)
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

If the code communicates with devices, web services, or third-party tools:

  • The manifest file has all fields filled out correctly.
    Updated and included derived files by running: python3 -m script.hassfest.
  • New or updated dependencies have been added to requirements_all.txt.
    Updated by running python3 -m script.gen_requirements_all.
  • Untested files have been added to .coveragerc.

The integration reached or maintains the following Integration Quality Scale:

  • No score or internal
  • 馃 Silver
  • 馃 Gold
  • 馃弳 Platinum

tests/components/panel_custom/test_init.py Outdated Show resolved Hide resolved
homeassistant/components/panel_custom/__init__.py Outdated Show resolved Hide resolved
tests/components/panel_custom/test_init.py Outdated Show resolved Hide resolved
Co-authored-by: Martin Hjelmare <marhje52@gmail.com>
Dev automation moved this from Needs review to Reviewer approved Jun 5, 2020
@balloob balloob merged commit 6faf9e8 into dev Jun 5, 2020
Dev automation moved this from Reviewer approved to Done Jun 5, 2020
@balloob balloob deleted the custom-panel-allow-two-builds branch June 5, 2020 17:39
@mkarnebeek
Copy link

mkarnebeek commented Jul 2, 2020

Can I ask a question? I'm using panel_custom: for https://gist.github.com/AdamNaj/cbf4d792a22f443fe9d354e4dca4de00 -- Is there a replacement

Also https://www.home-assistant.io/integrations/panel_custom/ doesn't say anything about it being deprecated

I'm using it as:

panel_custom:
  - name: zwavegraph2
    sidebar_title: Z-Wave Graph
    sidebar_icon: mdi:access-point-network
    url_path: zwave_graph

And as far as I know i'm not using anything which is deprecated

@Mariusthvdb
Copy link
Contributor

yes, please let us know, because there is some confusion on the way forward, a least for this. See https://community.home-assistant.io/t/z-wave-graph-without-the-python/64275/349

@balloob
Copy link
Member Author

balloob commented Jul 2, 2020

That integration needs to be rewritten to use JS as the entrypoint, not HTML.

@nickrout
Copy link

nickrout commented Jul 3, 2020

Why is this needed? Deprecation doesn't fix any issue (according to the above)

@balloob
Copy link
Member Author

balloob commented Jul 3, 2020

HTML imports was a draft spec that was not accepted by the browsers. Only Chrome had it implemented and has since removed it. It requires Home Assistant to include extra logic and code to keep supporting it. If someone can write an HTML panel, they can write a JS panel.

@nickrout
Copy link

nickrout commented Jul 4, 2020

Thank you :)

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

Successfully merging this pull request may close these issues.

None yet

6 participants