-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Move @automattic/components
' Storybook to the root Storybook
#76007
Conversation
ScreenCategoryList in the SiteAssemler
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
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 is looking great 👍
Just left a documentation suggestion.
Also, did you intend to merge into the other PR, or is the idea to merge it first, and then rebase this onto trunk?
In any case, this works well in my testing and code looks great 🚀
@@ -67,7 +66,6 @@ | |||
"scripts": { | |||
"clean": "tsc --build ./tsconfig.json ./tsconfig-cjs.json --clean && rm -rf dist", | |||
"build": "tsc --build ./tsconfig.json ./tsconfig-cjs.json && copy-assets", | |||
"prepack": "yarn run clean && yarn run build", | |||
"storybook": "start-storybook" |
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 keep in mind the READMEs and documentation that we need to update:
https://github.com/Automattic/wp-calypso/blob/trunk/packages/components/README.md#L44
Ideally, we should add a more central section that leads to the central Storybook instance, somewhere in /docs
for example in components.md
.
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.
Thank you for pointing this out, I updated the code about the existing command in this PR. 722e121
And I agree that we must update the document, such as https://github.com/Automattic/wp-calypso/blob/trunk/docs/components.md and https://github.com/Automattic/wp-calypso/blob/trunk/docs/component-libraries.md.
@@ -3,7 +3,7 @@ | |||
import { useRef } from 'react'; | |||
import UplotChart from '../'; | |||
|
|||
export default { title: 'Chart (uPlot)' }; | |||
export default { title: 'packages/@automattic/components/Chart (uPlot)' }; |
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.
Very minor feedback since naming can be easily adjusted whenever: I think packages
and @automattic
mean about the same thing here. packages/
is the directory in wp-calypso where packages are developed, and @automattic/
is the namespace we use for publishing them to npm. I don't think we need both.
I think I'd prefer sticking with packages
and remove @automattic
. (this is subjective feedback though, so it's non-blocking!)
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.
Nice. Very easy!
I would recommend updating this as well to mention the new command:
Line 90 in 500b5d1
"components:storybook:start": "echo 'Deprecated, run `yarn workspace @automattic/components run storybook` instead'", |
31f8bb6
to
1556b50
Compare
586e24c
to
722e121
Compare
Hey folks, this PR missed some components from the components package:
It looks like only stories written in TypeScript were ported over. Was this intentional? |
Hello @jsnmoon ! |
Related to #75167, #75943
Proposed Changes
client/*
#75167 and the initial PR Add Storybook in the root directory #75676.Testing Instructions
yarn storybook:start
locally@automattic/components
directoryScreen.Recording.2023-04-20.at.16.13.57.mov
Pre-merge Checklist