MWDelaney / sage-acf-wp-blocks

Composer library for generating ACF Gutenberg blocks from templates. Intended for use with Roots/Sage (http://roots.io)
348 stars 65 forks source link

Switch-to-preview button missing #15

Closed erikhartin closed 5 years ago

erikhartin commented 5 years ago

Using dev-master it is no longer possible to switch between the ACF editor and the preview of the created block in the Gutenberg editor (the Switch to preview-button is missing and it only displays the ACF editor inline – it is not possible to edit ACF fields in the sidebar whilst viewing the preview in the main content window).

Already created blocks who are in preview-mode stays that way (and work fine).

Downgrading to the latest release (0.4.2) restores the button but triggers the missing className error – and there are other useful updates since of course

Is anyone else seeing this?

MWDelaney commented 5 years ago

Can you confirm the mode you have set in the comment at the top of your block blade file? Mode is a relatively recent addition to this library but it should let you control exactly the behavior you’re talking about here. See more about mode here

erikhartin commented 5 years ago

THANK YOU! I suspected as much, but I was looking at the woeful documentation from the Gutenberg project and not the ACF docs and couldn't find any reference to this. Works now.