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

Added missing docs for the wrapperProps property for the BlockListBlock component returned by the editor.blockListEdit filter. #26961

Conversation

hansjovis
Copy link
Contributor

Description

Fixes #24864

Adds missing documentation on how to use the wrapperProps property on the BlockListBlock component to add (custom) properties to a block's wrapper component, using the editor.blockListEdit filter.

How has this been tested?

I tested the added code samples by creating a minimal plugin that extended the block editor using the steps as described in the Gutenberg Handbook. Once using the ES5 syntax, once using the ESNext syntax.

Screenshots

N/A

Types of changes

Added missing documentation.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR.

@github-actions github-actions bot added the First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository label Nov 13, 2020
@JustinyAhin JustinyAhin added the [Type] Developer Documentation Documentation for developers label Nov 13, 2020
Base automatically changed from master to trunk March 1, 2021 15:44
- The docs were reorganized so rebasing required moving the changes in
  the original PR

- Updated the function name to match the wrapperProp isntead of clientId
  example from previous

 - Applied same expansion change that @talldan contributed to ES5
   example

Co-authored-by: Daniel Richards <[email protected]>
@mkaz mkaz force-pushed the update/24864-missing-docs-blocklistblock-wrapperprops branch from f007a97 to 6698355 Compare October 14, 2021 20:30
Copy link
Member

@mkaz mkaz left a comment

Choose a reason for hiding this comment

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

I had to move the changes to a new file, everything looks good the only real change I made was to the function name and added the same spread expansion to the props in ES5 example that was done in ESNext example.

I'll give it a day to see if you have any tweaks, but it was mostly there, so I'll merge it in tomorrow if no issues. 👍

@mkaz mkaz merged commit 151b800 into WordPress:trunk Oct 15, 2021
@github-actions
Copy link

Congratulations on your first merged pull request, @hansjovis! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts:

https://profiles.wordpress.org/me/profile/edit/

And if you don't have a WordPress.org account, you can create one on this page:

https://login.wordpress.org/register

Kudos!

@github-actions github-actions bot added this to the Gutenberg 11.8 milestone Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
First-time Contributor Pull request opened by a first-time contributor to Gutenberg repository [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Missing documentation: BlockListBlock.wrapperProps
4 participants