fix storybooks, move to top level, make them easier to use
Created by: sqs
Maintenance on our storybooks.
- All storybooks are now runnable with a single command at the root directory:
yarn storybook
. Previously, you needed to runclient/browser/
andshared/
storybooks separately. Combining them makes it easier to use, discover, and configure storybooks. - Storybooks are checked in CI. Previously, they had broken (with a Webpack
require.context
"critical dependency error" due to a Webpack upgrade, and this was not caught because they weren't checked in CI). The check just consists of a smoke test (basically, does Webpack report any errors?). - The issue that broke storybooks mentioned above was fixed.
- Upgraded
@storybook/*
to v5. - Storybooks no longer all import all the global styles. Each
*.story.tsx
file should import only the necessary CSS. This makes it easier to test shared components with accidentally relying on web app styles or forgetting that style/class props will be necessary. - Added a CompletionWidget storybook to serve as another example.
Closes #3854 (closed)