-
Notifications
You must be signed in to change notification settings - Fork 585
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
Update design system #255
Update design system #255
Conversation
src/components/Radio.stories.js
Outdated
export const playground = (args) => <Radio {...args} />; | ||
playground.args = { label: 'label', hideLabel: false }; |
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 feel like we are converging on this pattern of calling these Template
in the Chromatic repo & also in the SB docs. I haven't seen this "playground" pattern before. Where'd it come from?
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.
These are the stories that used to be called "Basic". They're the "representative" story that you can manipulate with Controls.
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.
Also the non-capitalization and export (export playground
vs export Playground
) goes against this other piece of the docs & pattern we have been following in Chromatic where we do this:
export default {
includeStories: /^[A-Z]/
}
so that all of the capitalized exports are treated as stories.
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.
These are the stories that used to be called "Basic". They're the "representative" story that you can manipulate with Controls.
That's right. Kinda forgot we had that. Is that a thing we recommend doing with all components these days?
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.
Useful for design system components, not sure about creating a playground for more complex components
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.
Seems good. Nice to get rid of the unused stuff. I think it makes sense to establish patterns that we use across codebases so that's why I called out some things here, but I suppose they aren't blocking. We just started in Chromatic focusing a bit more on emulating what the SB docs recommend which probably makes a lot of sense here since its all open source.
@kylesuss can you review this again? If everything is OK please do a minor release 🙏 |
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.
Looks good! Appreciate you working through the template/playground stuff w/ me.
🚀 PR was released in |
Changelog
secondary
state and usedefault
state insteadcode
state based on the styling we use in Chromaticsecondary
and usedefault
state insteadcode
statesecondary
state and usedefault
state insteadNote
This requires downstream changes in Chromatic and LearnStorybook to use the new APIs