Skip to content

Docs: Add InspectorControls example - #11736

Merged
gziolo merged 6 commits into
masterfrom
fix/4478
Apr 11, 2019
Merged

gziolo merged 6 commits into
masterfrom
fix/4478

Conversation

@ajitbohra

Copy link
Copy Markdown
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

@gziolo gziolo left a comment

Copy link
Copy Markdown
Member

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

gziolo commented Jan 25, 2019

Copy link
Copy Markdown
Member

Now this PR also needs to be rebased :)

@ajitbohra

Copy link
Copy Markdown
Member Author

@gziolo yes, my backlog 😅

@youknowriad

Copy link
Copy Markdown
Contributor

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

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

gziolo commented Apr 10, 2019

Copy link
Copy Markdown
Member

@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

mkaz commented Apr 11, 2019

Copy link
Copy Markdown
Member

@gziolo

gziolo commented Apr 11, 2019

Copy link
Copy Markdown
Member

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

gziolo commented Apr 11, 2019

Copy link
Copy Markdown
Member

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