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

Components: Add stories for Icon and IconButton #17868

Merged
merged 3 commits into from
Oct 13, 2019

Conversation

ItsJonQ
Copy link

@ItsJonQ ItsJonQ commented Oct 9, 2019

Screen Shot 2019-10-09 at 11 31 03 AM

This update adds some initial Storybook stories for the Icon and IconButton
component.

Most of the stories were derived from the component's README.md documentation.
Additional stories were added to showcase prop variation (e.g. Icon size),
as well as composition (e.g. IconButton grouping).

In order to render certain UI for the stories, some simple stateless
functional components were created in the .stories.js file.

This update adds some initial Storybook stories for the Icon and IconButton
component.

Most of the stories were derived from the component's README.md documentation.
Additional stories were added to showcase prop variation (e.g. `Icon` size),
as well as composition (e.g. `IconButton` grouping).

In order to render certain UI for the stories, some simple stateless
functional components were created in the `.stories.js` file.
@ItsJonQ ItsJonQ changed the title Components: Add stories for Icon and IconButton component Components: Add stories for Icon and IconButton Oct 9, 2019
@gziolo gziolo added [Package] Components /packages/components [Type] Developer Documentation Documentation for developers labels Oct 10, 2019
@youknowriad
Copy link
Contributor

@epiqueras do we have a live deploy in netlify for these PRs? How can we get the URL?

@gziolo
Copy link
Member

gziolo commented Oct 10, 2019

Aside: it was discussed some time ago that it might make sense to deprecate IconButton or maybe leave it is an alias for the Button component with the icon passed as prop, see:

@gziolo gziolo added the Storybook Storybook and its stories for components label Oct 10, 2019
@ItsJonQ
Copy link
Author

ItsJonQ commented Oct 10, 2019

@gziolo Thanks for that context! In that case, should I remove the IconButton stories for now?

@gziolo
Copy link
Member

gziolo commented Oct 10, 2019

@gziolo Thanks for that context! In that case, should I remove the IconButton stories for now?

I guess it's fine to proceed. We will have to keep IconButton in WordPress core for very long even when we decide to merge it into Button :)

@ItsJonQ
Copy link
Author

ItsJonQ commented Oct 10, 2019

We will have to keep IconButton in WordPress core for very long even when we decide to merge it into Button :)

😅

@epiqueras
Copy link
Contributor

@youknowriad The link is in the PR checks, https://deploy-preview-${PR_NUMBER}--gutenberg-playground.netlify.com.

You'll need to manually add /design-system/components at the end, because there's no link to it yet from the playground.

I just updated the Netlify config to match the new order of build scripts though, so we'll need a new commit in this PR to trigger a new build.

@youknowriad
Copy link
Contributor

@epiqueras
Copy link
Contributor

@youknowriad

I just updated the Netlify config to match the new order of build scripts though, so we'll need a new commit in this PR to trigger a new build.

Copy link
Contributor

@epiqueras epiqueras left a comment

Choose a reason for hiding this comment

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

Thanks for moving this forward! 😄 🚀

packages/components/src/icon/stories/index.js Outdated Show resolved Hide resolved
packages/components/src/icon-button/stories/index.js Outdated Show resolved Hide resolved
@epiqueras epiqueras merged commit e3a78c5 into WordPress:master Oct 13, 2019
@youknowriad youknowriad added this to the Gutenberg 6.7 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Components /packages/components Storybook Storybook and its stories for components [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants