-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
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
Docs: web components API table has wrong default value #9642
Comments
cc @daKmoR |
jup that is the spot 👍 yes it is not that stable yet 🙈 we could do |
@daKmoR Your call -- you have the most context on what's going on in the WC community. Since we're on 6.0 now we can make breaking changes, and we should do that where we can. When in doubt move things forward. In subsequent releases we'll need to be careful about this kind of stuff as the spec changes, and support back compat until 7.0. |
I created a pull request with the suggested fix from @daKmoR. I kept compatibility with If no more 5.X releases are planned then it makes sense to just make the incompatible change and rely only in |
Gadzooks!! I just released https://github.com/storybookjs/storybook/releases/tag/v6.0.0-alpha.2 containing PR #9655 that references this issue. Upgrade today to try it out! You can find this prerelease on the Closing this issue. Please re-open if you think there's still more to do. |
I updated to 6.0.0-alpha.2 and it works as expected now! Thank you very much 😃 |
Thanks @telpalbrox! Will patch this into 5.3 in a few days too |
Yippee!! I just released https://github.com/storybookjs/storybook/releases/tag/v5.3.10 containing PR #9655 that references this issue. Upgrade today to try it out! |
Docs: web components API table has wrong default value
When using
@storybook/addon-docs
the prop table is not displaying the default value generated fromcustom-elements.json
with [email protected].To Reproduce
@storybook/addon-docs
custom-elements.json
file using[email protected]
custom-elements.json
there is a default value.Expected behavior
"DEFAULT" column of the prop table has the value specified in
custom-elements.json
.Screenshots

Code snippets
Component:
Additional context
After taking a quick look to the code in addons/docs/src/frameworks/web-components/config.js#L14 I can see that is looking for
defaultValue
but now it is calleddefault
incustom-elements.json
. You can see an example of the new format here https://runem.github.io/web-component-analyzer/?format=json .I guess as the format is experimental and it changed at some point 😓
Please, ping me if you need any more information.
I would be more than willing to provide a pull request to fix this problem 😄
The text was updated successfully, but these errors were encountered: