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

Docs: Add block patterns list component readme #24983

Conversation

JustinyAhin
Copy link
Member

Description

Added documentation for the block patterns list component (see #22891)

How has this been tested?

N/A, documentation only

Types of changes

Documentation

Checklist:

  • [n/a] My code is tested.
  • [n/a] My code follows the WordPress code style.
  • [n/a] My code follows the accessibility standards.
  • [n/a] 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.

@JustinyAhin JustinyAhin added the [Type] Developer Documentation Documentation for developers label Sep 2, 2020

const MyBreadcrumb = () => (
<BlockPatternList
onClickPattern={ onClick }
Copy link
Member Author

Choose a reason for hiding this comment

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

@ntsekouras I was wondering if it is necessary to add the onClickPattern={ onClick } to this code sample.

Copy link
Member Author

Choose a reason for hiding this comment

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

Also, I was wondering if there could be ways I can make these code samples more detailed. Til now, for the packages I documented, I basically added a const with a simple use case of the component.

I know these packages component are not intended to be uses by third parties, but was just wondering.

Copy link
Contributor

Choose a reason for hiding this comment

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

This component requires three props

shownPatterns={ shownBlockPatterns }
blockPatterns={ shownBlockPatterns }
onClickPattern={ onSelectBlockPattern }

Ideally, we pass a valid prop and explain what these props are about. (Some READMEs have a props section for the explanations)

Copy link
Member Author

Choose a reason for hiding this comment

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

Still having to find what the props do exactly. On my list for next week.

@JustinyAhin JustinyAhin force-pushed the add/block-patterns-list-component-readme branch from a5ffb06 to 8efb740 Compare September 11, 2020 09:09
@ntsekouras
Copy link
Contributor

Something has been mixed up here. Can you rebase to include only your changes in the PR?

@gziolo gziolo changed the title Add/block patterns list component readme Docs: Add block patterns list component readme Nov 26, 2020
@gziolo gziolo added the [Package] Block editor /packages/block-editor label Nov 26, 2020
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Thank you for the improvements to the block editor documentation :)

@JustinyAhin JustinyAhin merged commit 2518b58 into WordPress:master Nov 26, 2020
@github-actions github-actions bot added this to the Gutenberg 9.5 milestone Nov 26, 2020
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.

4 participants