Skip to content
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

Block Editor: Add documentation for SpacingSizesControl component #68581

Conversation

Infinite-Null
Copy link
Contributor

Related to: #22891
Closes: #52070

What?

Adds documentation for the SpacingSizesControl component by:

  • Adding a comprehensive README.md file
  • Adding JSDoc comments with proper syntax, examples, and prop descriptions

Why?

The SpacingSizesControl component currently lacks documentation, making it difficult for developers to understand and implement the component correctly:

  • Clear documentation of all available props and their usage
  • Examples showing how to implement the component properly
  • Documentation of component views and internal structure

The documentation follows established patterns from other components while providing specific details relevant to SpacingSizesControl, making it easier for developers to use this component effectively in their blocks.

@Infinite-Null Infinite-Null marked this pull request as ready for review January 10, 2025 05:56
Copy link

github-actions bot commented Jan 10, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Infinite-Null <ankitkumarshah@git.wordpress.org>
Co-authored-by: stokesman <presstoke@git.wordpress.org>
Co-authored-by: glendaviesnz <glendaviesnz@git.wordpress.org>
Co-authored-by: mburridge <mburridge@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@t-hamano t-hamano added [Type] Developer Documentation Documentation for developers [Package] Block editor /packages/block-editor labels Jan 11, 2025
@Infinite-Null
Copy link
Contributor Author

Hi @stokesman,
Thank you for the feedback!
I have implemented the requested changes. Please review them at your convenience.

Copy link
Contributor

@stokesman stokesman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the update 🙇. I had a look at prior art around the codebase and have some more suggestions.

- Removed unnecessary props and wrappers
- Added proper state management with useState hook
- Ensured consistent documentation between the component and README
- Replaced SpacerBlock with Example component
- Added proper imports for SpacingSizesControl and useState
- Removed unnecessary View wrapper and optional props
- Updated README to match the new implementation
Copy link
Contributor

@stokesman stokesman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the updates again 🙇.

- Removed redundant description section in README
- Consolidated component description into a single paragraph
- Updated import examples to use `__experimentalSpacingSizesControl` alias
- Removed screenshot reference
- Standardized prop descriptions
@Infinite-Null
Copy link
Contributor Author

Hi @stokesman,
Thank you for the follow-up feedback!
I have implemented the necessary changes. Please review them at your convenience.

Copy link
Contributor

@stokesman stokesman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems adequate to me. Thank you @Infinite-Null!

@stokesman stokesman merged commit 73b8e2c into WordPress:trunk Jan 29, 2025
64 checks passed
@github-actions github-actions bot added this to the Gutenberg 20.2 milestone Jan 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Package] Block editor /packages/block-editor [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add README.md file for spacing-sizes-control component
3 participants