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

Addon-docs/web-components: Add attributes to props table #8598

Merged
merged 3 commits into from
Oct 29, 2019

Conversation

steel
Copy link
Contributor

@steel steel commented Oct 28, 2019

Issue:

The new web-components framework does not render attributes in the doc block.

What I did

I ran web-component-analyzer to get the most up to date custom-element.json file and added support for attributes when extracting props.

How to test

Here is what web components kitchen sink app now renders:

Addons | Docs - Simple ⋅ Storybook 2019-10-28 15-16-58

@vercel
Copy link

vercel bot commented Oct 28, 2019

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/storybook/monorepo/mti5uur51
🌍 Preview: https://monorepo-git-fork-steel-web-component-attributes.storybook.now.sh

@steel steel changed the title Update web-components framework to render attributes fix: update web-components framework to render attributes Oct 28, 2019
@shilman shilman requested a review from daKmoR October 28, 2019 23:42
@shilman shilman changed the title fix: update web-components framework to render attributes Addon-docs: Update web-components Props to render attributes Oct 28, 2019
@shilman shilman changed the title Addon-docs: Update web-components Props to render attributes Addon-docs: Update web-components Props w/ attributes Oct 28, 2019
@daKmoR
Copy link
Contributor

daKmoR commented Oct 29, 2019

customElements.json was handwritten before 🙈 - for testing purposes 😅
awesome that auto-generation works that well 👍

let's make it fully nice then 💪

  • remove set side and get side it's outdated code
  • add a description to properties backSide, header, rows via the constructor like
/**
 * Indicates that the back of the card is shown
 */
this.backSide = false;

default is yet not supported by the analyzer but it's ok 😅

@runem be prepared for all the storybook users 💪 and yeah default and attribute on the properties would be nice 😬

Copy link
Member

@shilman shilman left a comment

Choose a reason for hiding this comment

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

This is pretty awesome guys 😻 - thanks @steel!!

@shilman shilman changed the title Addon-docs: Update web-components Props w/ attributes Addon-docs/web-components: Add attributes to props table Oct 29, 2019
@steel
Copy link
Contributor Author

steel commented Oct 29, 2019

Addons | Docs - Wrapper ⋅ Storybook 2019-10-29 11-33-15

The buttons weren't clickable and the backside wasn't rendering properly for me in Safari. This fixes that.

@daKmoR daKmoR merged commit 5e9001b into storybookjs:next Oct 29, 2019
@daKmoR
Copy link
Contributor

daKmoR commented Oct 29, 2019

thaankkk you 🤗

@steel
Copy link
Contributor Author

steel commented Oct 30, 2019

@daKmoR I created a PR for default value runem/web-component-analyzer#117

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

Successfully merging this pull request may close these issues.

4 participants