-
Notifications
You must be signed in to change notification settings - Fork 147
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
feat: add Storybook #765
feat: add Storybook #765
Conversation
This should be a good starting point.
Insight:
I was thinking about mocking requests using service workers but I find that it's actually better to do real requests to know if things are broken or not. Let me know what you think. Regarding CI, it can be done programmatically using test-runner or visually and collaboratively using Chromatic. I prefer the latter since it's visual but it depends on if you are looking to use Chromatic or not @fakepixels @Zizzamia |
parameters: { | ||
layout: 'centered', | ||
}, |
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.
Let's move this to .storybook/preview.ts
? Looks like it is shared among all 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.
Good call. Moved all of them inside .storybook/preview.ts
<WagmiProvider config={wagmiConfig}> | ||
<QueryClientProvider client={new QueryClient()}> | ||
<Story /> | ||
</QueryClientProvider> | ||
</WagmiProvider> |
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.
Should we move this to preview.ts as well?
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'd favor explicitness because:
- Not every components needs to be wrapped inside
- Some components only need to be wrapped inside
QueryClientProvider
More verbose but it's clear what's needed when reading stories.
.gitignore
Outdated
@@ -57,3 +57,5 @@ package-lock.json | |||
# VitePress | |||
docs/.vitepress/cache | |||
docs/.vitepress/dist | |||
|
|||
*storybook.log |
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'd also add recommend ignoring storybook-static/*
# Storybook
*storybook.log
storybook-static/*
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.
Good call. I though running npx storybook init
would update correctly .gitignore
.
@roushou can you get the Build pass, please. So than I can review it. |
This reverts commit eaccd39.
@Zizzamia I can't reproduce locally. It seems to come from this line
Which makes build fail on purpose on CI https://classic.yarnpkg.com/lang/en/docs/cli/install/#toc-yarn-install-frozen-lockfile |
@@ -33,3 +33,4 @@ | |||
} | |||
|
|||
@tailwind utilities; | |||
@tailwind 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.
Why this? @roushou
We have not see the need to have those in a Tailwind application.
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.
Right it's not needed here. I added it because I'm used to have it and I often define custom classes in @layer components
but there's none in OnchainKit.
Ok I am going to take care of the Build issue. |
close #758