Skip to content

Add compatibility for Lit 2.0#8878

Merged
balloob merged 6 commits intodevfrom
update-lit-to-next
May 7, 2021
Merged

Add compatibility for Lit 2.0#8878
balloob merged 6 commits intodevfrom
update-lit-to-next

Conversation

@bramkragten
Copy link
Copy Markdown
Member

@bramkragten bramkragten commented Apr 9, 2021

Proposed change

This updates our code base to the new API of Lit 2.0 using the forward compatibility of lit-element 2.5 and lit-html 1.4

Type of change

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

Example configuration

Additional information

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

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

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

@bramkragten bramkragten changed the title Update Lit element and Lit html Update Lit element and Lit html to Lit 2 May 2, 2021
@bramkragten bramkragten force-pushed the update-lit-to-next branch from cf06e51 to 5f3148a Compare May 6, 2021 11:11
@bramkragten bramkragten changed the title Update Lit element and Lit html to Lit 2 Add compatibility for Lit 2.0 May 6, 2021
@bramkragten bramkragten marked this pull request as ready for review May 6, 2021 11:15
@balloob balloob merged commit 9f032a6 into dev May 7, 2021
@balloob balloob deleted the update-lit-to-next branch May 7, 2021 20:16
@github-actions github-actions bot locked and limited conversation to collaborators May 8, 2021
public connectedCallback() {
super.connectedCallback();
if (!this.shadowRoot) {
this.attachShadow({ mode: "open" });
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This didn't have a shadow root on purpose. <ha-markdown> is the one with shadow dom. This element was just to render the markdown.

This causes <ha-markdown> styling to not be applied

image

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.

Ok, will fix

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

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.

4 participants