-
Notifications
You must be signed in to change notification settings - Fork 48
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: add storybook #5162
docs: add storybook #5162
Conversation
Demo starting at https://maas-ui-5162.demos.haus |
065656a
to
b4e2680
Compare
eec091e
to
52463ac
Compare
52463ac
to
2450159
Compare
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 really like this. I think the re-structure of the app side navigation is a really solid example for extracting component state from presentation, and a good basis for future improvements. LGTM!
Thanks. Keep in mind that it's just the beginning. The shared MAAS UI Component Library is where the real work will happen in terms of refactoring and aligning with component design best practices. |
c60ea14
to
f72290c
Compare
Done
AppSideNavigation
,Meter
,TooltipButon
,MachineActionFormWrapper
@storybook/addon-a11y
for easy accessibility testingHACKING.md
docsAppRoot
asRootProviders
(so that they can be used in storybook)Rationale
This PR adds storybook to maas-ui to encourage component-driven development and good component design.
It allows to quickly preview various states of components acting as an interactive documentation and speeding up the development.
It's not using extensive customisation options or specifying separate variants for each type of component to keep things simple and minimize the maintenance burden.
For example, MachineActionFormWrapper is not added as separate Stories for each action (deploy, abort, etc.). This would have the benefit of them being displayed in the navigation on the left, but would require specifying each story manually. We can achieve the same thing by simply switching the "action" prop using storybook controls. These are added automatically and don't require any extra code.
What's not included
QA
QA steps
Screenshots
After