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 documentation to InnerBlocks props that missed it #7715

Merged
merged 4 commits into from Jul 5, 2018

Conversation

Projects
None yet
5 participants
@jorgefilipecosta
Member

jorgefilipecosta commented Jul 4, 2018

Description

This PR just documents the InnerBlock properties allowedBlocks, template and templateLock.

@jorgefilipecosta jorgefilipecosta changed the title from Add documentation to InnerBlock props that missed it to Add documentation to InnerBlocks props that missed it Jul 4, 2018

@tofumatt tofumatt self-requested a review Jul 4, 2018

@tofumatt

Looks good! I made a few tweaks and pushed them–a few things I found a bit unclear so I tried to expand on them/tidy them up.

If you're okay with my changes: 🚢

@Soean Soean added the Documentation label Jul 5, 2018

- `all` — prevents all operations. It is not possible to insert new blocks. Move existing blocks or delete them.
- `insert` — prevents inserting new blocks, but allows moving or removing existing ones.
- `false` — prevents locking from being applied to an `InnerBlocks` area even if a parent block contains locking.

This comment has been minimized.

@gziolo

gziolo Jul 5, 2018

Member

Not related to this PR: How do you feel about converting false to none string so we could use only one variable type?

This comment has been minimized.

@tofumatt

tofumatt Jul 5, 2018

Member

That seems reasonable, especially as 'none' would be the default– it is the "weirdest" argument to pass (I half expect it to be false and half expect it to be a string type 😄) .

If locking is not set in an `InnerBlocks` area: the locking of the parent `InnerBlocks` area is used.
If the block is a top level block: the locking of the Custom Post Type is used.
* **Type:** `Array<String>`

This comment has been minimized.

@gziolo

gziolo Jul 5, 2018

Member

Should we remove this line, too?

This comment has been minimized.

@gziolo

gziolo Jul 5, 2018

Member

I removed, it didn't fit here :)

@gziolo

gziolo approved these changes Jul 5, 2018

I added two small corrections where I noticed obsolete lines.

@gziolo gziolo merged commit 082b168 into master Jul 5, 2018

2 checks passed

codecov/project 46.44% (-0.01%) compared to 6bf9832
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@gziolo gziolo deleted the add/missing-innerblocks-props-docs branch Jul 5, 2018

@gziolo gziolo added this to the 3.2 milestone Jul 5, 2018

@jorgefilipecosta jorgefilipecosta self-assigned this Jul 5, 2018

@albedo0

This comment has been minimized.

albedo0 commented Jul 6, 2018

Hello,

Where can i find a list of the arguments for the blocks like "placeholder, align,..."

@tofumatt

This comment has been minimized.

Member

tofumatt commented Jul 6, 2018

Hi @albedo0,

In the future please open a new issue or ask a question in the #core-editor channel in the Make WordPress Slack.

If you're looking for the props each block accepts, right now the best option, I think, is to look at the code for each block as I don't think we have a set of API docs for the core blocks.

If you'd like to ask something else or follow up please do it outside this pull request as it's unrelated and this is closed 😄

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