Refactor EditorBlock to simplify block registration. #20
Labels
modification
Update to an existing element that could determine a MAJOR or MINOR release.
priority: P0
This is a critical issue
size: small
Issue should take less than 4 hours to complete
status: in progress
Issue is currently in progress
The EditorBlock structure was developed as an initial attempt to capture the basics of what's needed to register a custom block for the WordPress editor. Unfortunately, in its current state, it doesn't meet one of the aims of OOPS-WP, which is to make registration of custom WordPress elements as quick and painless as possible.
After some discussion with both front-end and back-end engineers today, we've come to the conclusion that refinements are needed to streamline this process. The primary changes that are necessary include:
{block_name}-js
,{block_name}-editor-css
, and{block_name}-style-css
)wp-blocks
,wp-element
), with the option to add additional dependencies, similar to how theget_args
method ofContentType
objects allow for customizations to the narrow defaults.register_block_type
method in WordPress.index.js
scripts (instead ofblock.js
) as that appears to be the accepted standard in WordPress. The default editor style should beeditor.css
.In light of these changes, it's likely that this update will break compatibility with the existing EditorBlock contract. If that is the case, then inclusion of this change into the library should result in a full version increase in OOPS-WP.
The text was updated successfully, but these errors were encountered: