-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add READMEs to all block-editor components #22891
Comments
I want to make a README for the block-alignment-matrix-toolbar, issue #22516 ; How should I proceed? Is this a README for the issue or for the component? |
@alita-moore yes, a README is needed for that component. so you should add a file to the component folder name it README.md, copy some existing component README to get the "base template" and fill it. |
Okay, Doesn't have a very defined structure. Are you saying to copy the format in terms of linking to the parent directory? |
Yes, this is not the best example. This might work better https://github.com/WordPress/gutenberg/blob/master/packages/components/src/button/README.md |
Oh okay, that's much better. Thank you for info, I'll get cracking 👩💻 |
Working on a pull for BlockBreadcrumb componenent https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/block-breadcrumb |
I've identified all the packages that haven't yet a README. |
This comment has been minimized.
This comment has been minimized.
If someone works on this issue, in addition to adding a README file, it would be great if we could also add JSDoc. The recommended complete JSDoc format should look like this: /**
* Component description here.
*
* @see https://github.com/WordPress/gutenberg/blob/HEAD/packages/block-editor/src/components/my-component/README.md
*
* @example
* ```jsx
* function MyComponent() {
* return (
* <MyComponent />
* );
* }
* ```
*
* @param {Object} props Component props.
* @param {string} props.prop1 props description here.
* @param {Array} props.prop2 props description here.
* @return {Element} My component control.
*/
export default function MyComponent( {
prop1,
prop2,
} ) {
return (
<div>
My Component
</div>
);
} |
Can guide me on how to start or just go with the example from the other documented components, such as this one for button? Thanks! |
@0x8sksr There are many components in the |
The Block Editor package in Gutenberg is full of components used to build blocks or block editors. These components lack documentation.
This issue is a tracking issue for the documentation effort to add READMEs to all these components.
If you want to help with this:
Updated by @t-hamano
If someone works on this issue, in addition to adding a README file, it would be great if we could also add JSDoc.
The block editor package reference is generated with a JSDoc reference for each component. Components that don't have JSDoc will look like this in the reference:
The recommended complete JSDoc format should look like this:
The text was updated successfully, but these errors were encountered: