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

Update blocks to cater for deprecated messages in the console and add example: #31

Open
bobbingwide opened this issue Jan 8, 2020 · 2 comments
Assignees
Labels

Comments

@bobbingwide
Copy link
Owner

@bobbingwide bobbingwide commented Jan 8, 2020

Messages I've seen are:

wp.editor.InspectorControls is deprecated. 
Please use wp.blockEditor.InspectorControls instead.

Also the CSS class names of blocks are now prefixed block-editor-; was editor-.
Some of the .scss files will need updating to ensure the blocks are correctly styled. e.g blockicon/style.css

@bobbingwide bobbingwide self-assigned this Jan 8, 2020
@bobbingwide bobbingwide changed the title Update blocks to cater for deprecated messages in the console Update blocks to cater for deprecated messages in the console and add example: Jan 8, 2020
@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Jan 8, 2020

It would also be nice to implement an example for each block.
The simplest way to do this is to add

example: {
},

into the registerBlockType.

This works for most block, but not for the oik-block\address block where the first display shows the HTML.

@bobbingwide

This comment has been minimized.

Copy link
Owner Author

@bobbingwide bobbingwide commented Jan 8, 2020

The example for the Search block didn't appear to work... for some reason the build paused itself!
Actually, something's a bit flaky. It works sometimes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.