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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Lit] add client:only functionality to Lit integration #6111

Merged
merged 3 commits into from
Feb 7, 2023

Conversation

e111077
Copy link
Contributor

@e111077 e111077 commented Feb 3, 2023

Changes

(note: I formatted integrations/lit/src/client.ts so the diff is uggo. Try ?w=1

  • Add @astrojs/lit to probable renderers list
  • Lit's client.js
    • Renders custom element in client:only
    • Renders slots and re-adds slot="..." to slotted HTML strings
    • sets properties & attributes on custom element

Testing

I added the widely-used client:only test to the lit e2e tests and added slot & shadow dom-specific tests.

Docs

Add Lit to the client:only docs

/cc @withastro/maintainers-docs for feedback!

@changeset-bot
Copy link

changeset-bot bot commented Feb 3, 2023

🦋 Changeset detected

Latest commit: 5782159

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: astro Related to the core `astro` package (scope) pkg: lit Related to Lit (scope) pkg: integration Related to any renderer integration (scope) labels Feb 3, 2023
@e111077 e111077 marked this pull request as ready for review February 3, 2023 01:25
@e111077
Copy link
Contributor Author

e111077 commented Feb 3, 2023

failures seems like a flakes. Here is the Run from the commit before "add changeset"

https://github.com/withastro/astro/actions/runs/4080151290/jobs/7032330368

@e111077
Copy link
Contributor Author

e111077 commented Feb 6, 2023

ping @matthewp LMK WYT about some of the choices made

@matthewp
Copy link
Contributor

matthewp commented Feb 6, 2023

np, code looks good. Just a minor point about whether this is patch/minor for the integration. And yes the test is a flaky one, I'll rerun it.

@e111077
Copy link
Contributor Author

e111077 commented Feb 7, 2023

Tests pass, feelsgoodman 😌

@matthewp
Copy link
Contributor

matthewp commented Feb 7, 2023

Looks great, thanks! Will likely be released tomorrow.

@matthewp matthewp merged commit ec38a89 into withastro:main Feb 7, 2023
@astrobot-houston astrobot-houston mentioned this pull request Feb 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg: astro Related to the core `astro` package (scope) pkg: integration Related to any renderer integration (scope) pkg: lit Related to Lit (scope)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants