-
Notifications
You must be signed in to change notification settings - Fork 0
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
Start Storybook and react components additions #334
Conversation
…h reverted postcss version
…n storybook preview.js
…o react components and update jest.config
…r, followed dir pattern from foundation-forms
… imports into components
…CI error. Relates to storybook depencies for postcss beign out of date postcss8 and webpack5 causing build failures in storybook. Known issue with storybook that's being worked on
…components, switch className prop to quoteLarge variant with tests and css
@dalecreativ everything is looking great. I think as a first pass for getting React into here this is great. We have already spoken about the use of React Testing Library over Enzyme for integration level testing. I think some next steps would be:
|
…d packages. Update configs to remove enzyme testSetup
@mchadwickweb I've updated the dependencies for react-testing-library and removed deps on enzyme and react-test-renderer. Made sure to update the tests and snapshots for the components too. 👍 |
Storybook and react additions
What we've done:
babel.config.js
for react buildscomponent-template
package to help start new react components.component-blockquote
, includes a react component, styles and jest tests.To test:
Start the storybook app
confirm working with stories at
localhost:6006
Run a build
Should build all packages without error.
NOTES:
Storybook react 6.1 > 6.2 has had known issues around its dependencies.
This has caused issues with builds for storybook when using packages like
postcss v8
in your own projects that use storybook. As a temporary measure, we've downgraded the postcss version to 7, until an official patch has been released.Issues and discussions from storybook:
UPDATE: Storybook are currently on beta release of 6.2. With some updates and a additional addon
@storybook/addon-postcss
. We're now able to build without error.I've set up a branch to help track beta to production release here : https://github.com/coopdigital/coop-frontend/tree/storybook-beta-with-postcss8