-
Notifications
You must be signed in to change notification settings - Fork 179
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
chore(components): sub in storybook for styleguidist #7549
Conversation
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.
First review pass, 77 out of 114 files. I think the lack of linting and autoformatting on the stories is making this review a little harder, so opened #7708 to get that working
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.
Took a pass at this, and looks good to me!
- Can build storybook locally
- Can run dev server locally
- CI builds look like they're working
- No source code changes to actual components
Lack of typechecking in components in annoying, but for now, VS Code still handles the files in isolation, so that's not the worst
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.
@@ -37,7 +37,7 @@ merge_timeout=300 | |||
esproposal.optional_chaining=enable | |||
; default value of 19 (16 * 2^19 bytes > 8ish MB) isn't quite enough and can | |||
; result in flow crashing with `Unhandled exception: SharedMem.Hash_table_full` | |||
sharedmemory.hash_table_pow=20 | |||
sharedmemory.hash_table_pow=21 |
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.
out of curiosity how come we gotta bump this up?
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.
Not bumping it can result in flow crashing with Unhandled exception: SharedMem.Hash_table_full
🙃
But yeah, as the codebase grew, we started seeing that particular flow crash. Added the config to bump it up to 20 in #4959. As Brian was working on this PR, he started seeing this crash again, and bumping it again (from 16 MB to 32 MB) seemed to resolve it.
Since Flow is on its way out, it seemed like the most straightforward thing to do to keep things chugging along rather than investigating it too deeply
@@ -1,7 +1,7 @@ | |||
# opentrons component library makefile | |||
|
|||
# dev server port | |||
port ?= 8081 | |||
port ?= 6060 |
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.
how come we're switching this to port 6060? upon googling looks like 6060 is used to indicate the use of the X Windows Protocol
which i'd never heard of!
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.
😬 so yeah, turns out we never used this $(port)
variable. If you run make -C components dev
in edge
right now, the dev server will launch on port 6060. This PR changes this value to match the currently used port and actually uses it in the make dev
target now
Overview
This migrates the sandbox renderer for our component library from styleguidist to storybook.
In addition to working cleanly with TypeScript, Storybook has more features and flexibility compared with styleguidist.
Give it a whirl here
TODOs
Following Work
Docs
tab of each component's story.as well as eslintto sidestep an issue with storybook's usage of emotion conflicting with our usage of styled-components. This should be mended soon, so that our stories can take advantage oflinting andtypechecking.Changelog
Component.stories.tsx
for each non-deprecated component story in the libraryReview requests
make dev -C components
locally and confirm that it starts the storybook dev server.Risk assessment
low, no code should have been altered