Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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(tools): create ui-components package and setup Storybook #41920
feat(tools): create ui-components package and setup Storybook #41920
Changes from 1 commit
f55e249
3c79671
11f883a
9b435b4
30570be
ea07839
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
This file wasn't generated by the script. I created it as part of the custom theming.
Ref: https://storybook.js.org/docs/react/configure/theming#create-a-theme-quickstart
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.
This file wasn't generated by the script. I created it as part of the custom theming.
Ref: https://storybook.js.org/docs/react/configure/theming#create-a-theme-quickstart
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 browsed the cdn repo but couldn't find a logo file that has both text and gray90 background color. I resorted to the secondary logo as the text of the primary one is not readable on Storybook's default background.
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.
We have png assets with set backgrounds on the design style guide. https://github.com/freeCodeCamp/design-style-guide/blob/master/downloads/fcc_primary_large.png but they are not on the CDN.
We could default to the gray85 for the background and use the primary SVG down the road.
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 just tried it out and the PNG doesn't seem to have a background either
Storybook has very limited theming options. In order to have a dark background for the primary logo, I would need to set
gray85
to the entire sidebar and change the text color; but it affects the Controls panel, which doesn't have dedicated styling options.So I think we would still need an image file with a set background on CDN if we want to use the primary logo.
Large diffs are not rendered by default.
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.
These were added by the Storybook script.
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.
All of the new dependencies were added automatically by Storybook, except for
@storybook/addon-postcss
.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.
If I understand storybookjs/storybook#14403 correctly, Storybook is using a very old version of these libraries. They are hoisted and get picked up by Webpack, but error thrown because they are not compatible with Webpack 5.
Apparently Storybook team fixed it but then reverted the PR due to it being backward incompatible (storybookjs/storybook#14403 (comment)). I followed storybookjs/storybook#14497 (comment) and added these packages to our dev dependency list as a workaround.
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.
The Storybook team recommends using Yarn's
resolutions
to workaround this issue. It is not applicable to us, but I'm just posting the link here for future reference: https://gist.github.com/shilman/8856ea1786dcd247139b47b270912324#yarn-resolutionsThere 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.
This file is generated by Storybook, along with a bunch of svg files. It has links to the official document pages, which I think might come in handy especially when we don't have documentation on our side yet.
I decided to keep this one, and we can delete it once our component library is more mature.