-
-
Notifications
You must be signed in to change notification settings - Fork 9.4k
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
[Try] Add support for LitElement #7731
Conversation
…test/support-lit-element
This pull request is automatically deployed with Now. Latest deployment for this branch: https://monorepo-git-fork-lonyele-feature-support-lit-element.storybook.now.sh |
// internally to cover the case using only html`...` instead of | ||
// lit-element which makes using lit-html and lit-element at the same | ||
// time. | ||
LitElement.render(element, renderTo, { scopeName: '' }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is a hack I've found...
@@ -0,0 +1,4 @@ | |||
module.exports = async ({ config }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the place where help is needed. Please see Also some advanced webpack settings. More example from open-wc
Oh... wait... |
@@ -0,0 +1,31 @@ | |||
# Storybook for Polymer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
probably this title needs to be adjusted to Lit-Element
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, there are other mentions in the readme as well, work in progress I guess
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great work btw!
This is neat. I'm also using this for custom elements with |
Hm... I'm not really sure, it is too small for a so called framework support... putting |
@fernandopasik @emilio-martinez Could we get a seal of approval from you or some assistance maybe getting this in a state it's merge-able? |
It looks like much better implementation(#8400) is merged. Check that out! |
I'm pretty sure I'm not the best person doing this one, but I gave a shot for the super basic settings. I've read #4958, #6208, Polymer Issue etc... and came to a conclusion... that it is kind of complicated than I thought about this
Web Components
thing(first time looking at it...)From the Polymer side there are
polymer1/2
,polymer3
,lit-html
,lit-element
or any frameworks/compiler that converts things to web components such asstencil
,svelte
etc.For the users, installing
@storybook/web-components
and it works for every case I wrote above is the best thing since It will be ended up just'Web Components'
, but I'm not sure if it's possible(It looks easy on theory, but I'm not sure in practice) So I made the working example only forlit-element
for a starter(@storybook/lit-element) I also havelit-html
example on my local(possibly@storybook/lit-html
and it's almost same as this PR)I found that there are a lot discussions and opinions on this matter, I just want to hear some thoughts on this. For me, I don't really have much opinions(almost no knowledge and experience), just wanted to make things working(please ignore some copy/paste texts, I'll fix it once it looks ok)
What I did
@storybook/lit-element
lit-element-kitchen-sink
exampleNeed help
@storybook/addon-link
support. Everything is in shadow-dom and I couldn't make it working...