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 · 3 comments
Assignees
Labels
enhancement New feature or request

Comments

@bobbingwide
Copy link
Owner

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 added the enhancement New feature or request label Jan 8, 2020
@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
Copy link
Owner Author

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
Copy link
Owner Author

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.

@bobbingwide
Copy link
Owner Author

Most, but not all of the code, has been changed to use import. eg

import { __ } from '@wordpress/i18n';

I haven't checked for deprecated messages recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant