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 InspectorControls example #11736

Merged
merged 6 commits into from
Apr 11, 2019
Merged

Docs: Add InspectorControls example #11736

merged 6 commits into from
Apr 11, 2019

Conversation

ajitbohra
Copy link
Member

Fixes #4478

@ajitbohra ajitbohra added the [Type] Developer Documentation Documentation for developers label Nov 11, 2018
@mtias mtias added this to the Documentation & Handbook milestone Nov 12, 2018
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.

I tested this example. It works perfectly fine. I would vote to use a different control than alignment as noted in the comment.

This PR also needs rebase after docs folder structure changes.

source: 'html',
selector: 'p',
},
alignment: {
Copy link
Member

Choose a reason for hiding this comment

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

Can we use other control? We have a built-in support for alignment so this may be very confusing for developers. It is also included in block controls in core blocks which is the preferred way. Everything else is fine.

@ajitbohra ajitbohra self-assigned this Nov 29, 2018
@chrisvanpatten
Copy link
Contributor

@ajitbohra Will you be able to rebase and update this PR or should it be closed?

@chrisvanpatten chrisvanpatten added the [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. label Dec 12, 2018
@ajitbohra
Copy link
Member Author

@chrisvanpatten yes will update the PR

@ajitbohra ajitbohra added [Status] In Progress Tracking issues with work in progress and removed [Status] Stale Gives the original author opportunity to update before closing. Can be reopened as needed. labels Dec 12, 2018
@gziolo
Copy link
Member

gziolo commented Jan 25, 2019

Now this PR also needs to be rebased :)

@ajitbohra
Copy link
Member Author

@gziolo yes, my backlog 😅

@youknowriad
Copy link
Contributor

What's the status here, can we land it?

@gziolo gziolo requested review from mkaz and oandregal April 10, 2019 07:32
@gziolo
Copy link
Member

gziolo commented Apr 10, 2019

@mkaz and @nosolosw - we aligned the blocks tutorial to match with https://github.com/WordPress/gutenberg-examples repository. How does this PR fit to the current status?

Should we maybe move it to InsepectorTooolbar docs instead? https://github.com/WordPress/gutenberg/tree/master/packages/block-editor/src/components/alignment-toolbar - there is no README at the moment, but we could fix it.

@gziolo gziolo removed the [Status] In Progress Tracking issues with work in progress label Apr 10, 2019
@mkaz
Copy link
Member

mkaz commented Apr 11, 2019

@gziolo
Copy link
Member

gziolo commented Apr 11, 2019

I rebased with master branch and applied several coding style changes. There were also some subtle bugs which I fixed as well. This is how it looks in the browser:

Screen Shot 2019-04-11 at 11 35 34

@gziolo gziolo merged commit 4822a87 into master Apr 11, 2019
@gziolo gziolo deleted the fix/4478 branch April 11, 2019 09:43
@gziolo
Copy link
Member

gziolo commented Apr 11, 2019

Awesome work @ajitbohra, this example should be very helpful 💯

@gziolo gziolo added the [Package] Block editor /packages/block-editor label Apr 11, 2019
@gziolo gziolo added this to the 5.5 (Gutenberg) milestone Apr 11, 2019
mchowning pushed a commit to mchowning/gutenberg that referenced this pull request Apr 15, 2019
* Docs: Add InspectorControls example

* Update example

* Fix example

* Move the example to InsepectorContols README

* Improve coding styles in the examples provided

* Remove the example from block tutorial
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.

6 participants