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

Documentation: Bootstrapping the Extensibility API docs #3567

Merged
merged 3 commits into from Nov 23, 2017

Conversation

Projects
None yet
4 participants
@youknowriad
Contributor

youknowriad commented Nov 20, 2017

Related issue: #3330.

This PR tries to bootstrap the extensibility API docs. For now, It's a simple page but I expect this to evolve to a "category" page with links to sub pages. It includes:

  • Block creation as main extensibility API
  • Block removal
  • Block modification

@youknowriad youknowriad self-assigned this Nov 20, 2017

Show outdated Hide outdated docs/extensibility.md Outdated
@gziolo

Thanks for opening this PR. It looks very good. I left a few comments and questions. We will need to elaborate more, but this is a great start. ❤️

Show outdated Hide outdated docs/extensibility.md Outdated
Show outdated Hide outdated docs/extensibility.md Outdated
```js
// myplugin.js
wp.blocks.unregisterBlockType( 'core/verse' );

This comment has been minimized.

@gziolo

gziolo Nov 20, 2017

Member

Does it mean we married wp.blocks forever?

@gziolo

gziolo Nov 20, 2017

Member

Does it mean we married wp.blocks forever?

This comment has been minimized.

@youknowriad

youknowriad Nov 20, 2017

Contributor

I think so :) but we can always provide backwards compatibility if we want to (like done for the matchers)

@youknowriad

youknowriad Nov 20, 2017

Contributor

I think so :) but we can always provide backwards compatibility if we want to (like done for the matchers)

Show outdated Hide outdated docs/extensibility.md Outdated

@gziolo gziolo requested review from mtias and aduth Nov 20, 2017

@@ -11,6 +11,12 @@
"markdown_source": "https:\/\/raw.githubusercontent.com\/WordPress\/gutenberg\/master\/docs\/language.md",
"parent": null
},
{
"title": "Extensibility",

This comment has been minimized.

@mtias

mtias Nov 20, 2017

Contributor

Might be good to move "theme support" below this category.

@mtias

mtias Nov 20, 2017

Contributor

Might be good to move "theme support" below this category.

This comment has been minimized.

@youknowriad

youknowriad Nov 21, 2017

Contributor

Agreed, Can we wait until we have other Extensibility "subcategories" like a page dedicated to "filters"...?

@youknowriad

youknowriad Nov 21, 2017

Contributor

Agreed, Can we wait until we have other Extensibility "subcategories" like a page dedicated to "filters"...?

@aduth

Tangentially I explored an alternative block filtering approach in #3577. Curious to hear if you have thoughts on the approach there. We will still need some option to filter client-side to a subset for block nesting.

Show outdated Hide outdated docs/extensibility.md Outdated
Show outdated Hide outdated docs/extensibility.md Outdated
Show outdated Hide outdated docs/extensibility.md Outdated
Show outdated Hide outdated docs/extensibility.md Outdated
@codecov

This comment has been minimized.

Show comment
Hide comment
@codecov

codecov bot Nov 21, 2017

Codecov Report

Merging #3567 into master will increase coverage by 0.29%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3567      +/-   ##
=========================================
+ Coverage    35.1%   35.4%   +0.29%     
=========================================
  Files         265     280      +15     
  Lines        6734    7663     +929     
  Branches     1220    1431     +211     
=========================================
+ Hits         2364    2713     +349     
- Misses       3693    4154     +461     
- Partials      677     796     +119
Impacted Files Coverage Δ
blocks/library/shortcode/index.js 33.33% <0%> (-6.67%) ⬇️
blocks/library/heading/index.js 21.62% <0%> (-3.38%) ⬇️
blocks/api/validation.js 93.54% <0%> (-1.62%) ⬇️
blocks/library/html/index.js 15.78% <0%> (-0.88%) ⬇️
blocks/library/more/index.js 21.42% <0%> (-0.8%) ⬇️
blocks/library/list/index.js 6.2% <0%> (-0.7%) ⬇️
editor/components/inserter/menu.js 86.88% <0%> (-0.44%) ⬇️
components/popover/index.js 84.61% <0%> (-0.15%) ⬇️
editor/header/ellipsis-menu/index.js 0% <0%> (ø) ⬆️
editor/modes/visual-editor/index.js 0% <0%> (ø) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 025f964...1a90487. Read the comment docs.

codecov bot commented Nov 21, 2017

Codecov Report

Merging #3567 into master will increase coverage by 0.29%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #3567      +/-   ##
=========================================
+ Coverage    35.1%   35.4%   +0.29%     
=========================================
  Files         265     280      +15     
  Lines        6734    7663     +929     
  Branches     1220    1431     +211     
=========================================
+ Hits         2364    2713     +349     
- Misses       3693    4154     +461     
- Partials      677     796     +119
Impacted Files Coverage Δ
blocks/library/shortcode/index.js 33.33% <0%> (-6.67%) ⬇️
blocks/library/heading/index.js 21.62% <0%> (-3.38%) ⬇️
blocks/api/validation.js 93.54% <0%> (-1.62%) ⬇️
blocks/library/html/index.js 15.78% <0%> (-0.88%) ⬇️
blocks/library/more/index.js 21.42% <0%> (-0.8%) ⬇️
blocks/library/list/index.js 6.2% <0%> (-0.7%) ⬇️
editor/components/inserter/menu.js 86.88% <0%> (-0.44%) ⬇️
components/popover/index.js 84.61% <0%> (-0.15%) ⬇️
editor/header/ellipsis-menu/index.js 0% <0%> (ø) ⬆️
editor/modes/visual-editor/index.js 0% <0%> (ø) ⬆️
... and 36 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 025f964...1a90487. Read the comment docs.

@gziolo gziolo referenced this pull request Nov 21, 2017

Merged

Editor: Make BlockListBlock extensible #3493

3 of 3 tasks complete
@youknowriad

This comment has been minimized.

Show comment
Hide comment
@youknowriad

youknowriad Nov 23, 2017

Contributor

I've added a paragraph about the recently added allowed_block_types filter. I'm keen to move forward with this and iterate as we add new Extensibility APIs

Contributor

youknowriad commented Nov 23, 2017

I've added a paragraph about the recently added allowed_block_types filter. I'm keen to move forward with this and iterate as we add new Extensibility APIs

@youknowriad youknowriad merged commit 08b4719 into master Nov 23, 2017

3 checks passed

codecov/project 35.4% (+0.29%) compared to 025f964
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@youknowriad youknowriad deleted the doc/bootstrap-extensibility-api branch Nov 23, 2017

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