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 "Block API" initial doc to the documentation app. #2639

Merged
merged 2 commits into from Sep 1, 2017

Conversation

Projects
None yet
3 participants
@mtias
Contributor

mtias commented Sep 1, 2017

image

This covers the main properties of block registration and is meant to be a resource highlighting what is available and how it works.

This is not mean to be a tutorial, for which we have a specific section already.

@mtias mtias requested review from youknowriad and aduth Sep 1, 2017

@BE-Webdesign

This comment has been minimized.

Show comment
Hide comment
@BE-Webdesign

BE-Webdesign Sep 1, 2017

Contributor

This looks great Matias! 👍

Contributor

BE-Webdesign commented Sep 1, 2017

This looks great Matias! 👍

@mtias

This comment has been minimized.

Show comment
Hide comment
@mtias

mtias Sep 1, 2017

Contributor

Thanks! I plan on adding a separate section for Edit and Save (which would cover setAttributes, focus, etc), another one for large component utilities (Editable, Toolbar, Inspector, etc), and another one for reusable elements (buttons, form inputs, upload buttons, etc).

Feedback welcome.

Contributor

mtias commented Sep 1, 2017

Thanks! I plan on adding a separate section for Edit and Save (which would cover setAttributes, focus, etc), another one for large component utilities (Editable, Toolbar, Inspector, etc), and another one for reusable elements (buttons, form inputs, upload buttons, etc).

Feedback welcome.

Show outdated Hide outdated docs/block-api.md
category: 'widgets',
```
#### Icon

This comment has been minimized.

@aduth

aduth Sep 1, 2017

Member

icon is optional (though now that I think of it, I'm not sure how well it appears in the inserter)

@aduth

aduth Sep 1, 2017

Member

icon is optional (though now that I think of it, I'm not sure how well it appears in the inserter)

This comment has been minimized.

@mtias

mtias Sep 1, 2017

Contributor

We should offer a generic fallback, probably, and keep it optional.

@mtias

mtias Sep 1, 2017

Contributor

We should offer a generic fallback, probably, and keep it optional.

Show outdated Hide outdated docs/block-api.md
Show outdated Hide outdated docs/block-api.md
Show outdated Hide outdated docs/block-api.md
### className (optional)
By default, Gutenberg adds a class with the form `.wp-blocks-your-block-name` to the root element of your saved markup. This helps having a consistent mechanism for styling blocks that themes and plugins can rely on. If for whatever reason a class is not desired on the markup, this functionality can be disabled.

This comment has been minimized.

@aduth

aduth Sep 1, 2017

Member

Not for much longer if I have my way 😄 #2507

@aduth

aduth Sep 1, 2017

Member

Not for much longer if I have my way 😄 #2507

This comment has been minimized.

@mtias

mtias Sep 1, 2017

Contributor

;)

@mtias

mtias Sep 1, 2017

Contributor

;)

@aduth

aduth approved these changes Sep 1, 2017

@mtias mtias merged commit 3e95870 into master Sep 1, 2017

3 checks passed

codecov/project 31.38% remains the same compared to de19238
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@mtias mtias deleted the add/block-api-doc branch Sep 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment