Skip to content

Conversation

@emrikol
Copy link

@emrikol emrikol commented Oct 29, 2018

This updates the meta box to refresh the meta table when a Gutenberg post is saved. It does this very simply by just re-requesting the table HTML, rather than getting fancy with something like a JSON object and parsing it into DOM bits. Not elegant, but simple.

Might fix #17. Thoughts @danielbachhuber?

This updates the meta box to refresh the meta table when a Gutenberg post is saved.  It does this very simply by just re-requesting the table HTML, rather than getting fancy with something like a JSON object and parsing it into DOM bits.  Not elegant, but simple.

Might fix #17.  Thoughts @danielbachhuber?
@danielbachhuber
Copy link
Contributor

Honestly, I don't have a preference. This does seem like a hack but probably sufficient aside from entirely rewriting it like you mention.

@emrikol emrikol mentioned this pull request Nov 19, 2018
emrikol and others added 3 commits December 11, 2018 17:29
Updates from feedback:

* Broke out AJAX table rendering to separate function
* Added user capability check

Other Updates:
* Changed the way we checked for the block editor.  We now user core enqueue_block_editor_assets to only load the necessary block editor JS

wp.data.subscribe(
function() {
var isSaving = editPost.isSavingMetaBoxes();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indentation mistake?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think this got fixed in 5cc768a ... does it look correct to you now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gutenberg compatibility

6 participants