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

How are edit methods dissected when displaying the editor? #12227

Closed
mrmadhat opened this issue Nov 22, 2018 · 2 comments
Closed

How are edit methods dissected when displaying the editor? #12227

mrmadhat opened this issue Nov 22, 2018 · 2 comments
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Type] Help Request Help with setup, implementation, or "How do I?" questions. [Type] Question Questions about the design or development of the editor.

Comments

@mrmadhat
Copy link
Contributor

When constructing a block the edit method might include components such as InspectorControls and BlockControls to add settings in the sidebar/block toolbar. I would like to know how these components make it into the sidebar and block settings when the editor loads.

I imagine when a block is selected the sidebar will somehow look at the construction of the component and if it finds an InspectorControls component it loads it. Potentially something to do with the active component being passed into the sidebar as a prop then mapping through the children of the prop?

Could someone explain what's happening or link me to a doc/article that explains it?

Thanks

@designsimply designsimply added [Type] Question Questions about the design or development of the editor. [Type] Help Request Help with setup, implementation, or "How do I?" questions. Needs Technical Feedback Needs testing from a developer perspective. labels Nov 23, 2018
@aduth
Copy link
Member

aduth commented Jan 31, 2019

A high-level overview can be found here:

https://wordpress.org/gutenberg/handbook/designers-developers/developers/tutorials/block-tutorial/block-controls-toolbars-and-inspector/#inspector

A more low-level / technical explanation is that it uses a combination of:

@aduth aduth closed this as completed Jan 31, 2019
@mrmadhat
Copy link
Contributor Author

mrmadhat commented Feb 1, 2019

That's exactly what I was look for, thanks @aduth

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Technical Feedback Needs testing from a developer perspective. [Type] Help Request Help with setup, implementation, or "How do I?" questions. [Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

No branches or pull requests

3 participants