acf-composer icon indicating copy to clipboard operation
acf-composer copied to clipboard

Add inline editing for blocks (ACF 6.7+)

Open dsturm opened this issue 2 weeks ago • 5 comments

With the release of ACF (Pro) 6.7, inline editing is now supported. To enable this feature for blocks, you need to add “autoInlineEditing“: true to the block.json file.

This PR introduces a new configuration option to enable or disable inline editing.

Furthermore, we couldn’t explicitly set the blockVersion through configuration. This issue has been resolved as well.

dsturm avatar Dec 04 '25 07:12 dsturm

@dsturm This is maybe outside of the scope of this PR, but how would you implement the new filter acf/blocks/top_toolbar_fields in Block.php? Adding it to the constructor of each block manually?

aanndryyyy avatar Dec 05 '25 09:12 aanndryyyy

Hej @aanndryyyy,

good question! I'm not 100% familiar yet with the inline editing feature and still need to find out, what works best.

But currently my first thought on this, would be adding a new array property like topToolbarFields or inlineFields and add the hook in the register callback for the block.

Or should we extend the Log1x\AcfComposer\Builder\FieldBuilder class (since stoutlogic/acf-builder doesn´t support this) to support something like:

$blockFields
    ->addText('label')
    ->inline(); // Or `->addToTopbar()`

dsturm avatar Dec 05 '25 15:12 dsturm

I'm open to extending FieldBuilder or even a PR to ACF Builder if you think it should be done there. I haven't had time to mess with inline editing yet, really appreciate the push here. 🙌

Log1x avatar Dec 05 '25 16:12 Log1x

Hej @Log1x ,

unfortunately I'm currently short on free time - but I'll be gladly working on this as soon as possible.

dsturm avatar Dec 09 '25 07:12 dsturm

@Log1x / @dsturm I propose that this PR to be merged, so it's possible to set how good that "auto" mode is. I'll try to find the time to do a PR for the block header level topbar/inline functionality. Already got simple blade components that allow manual adding of text and toolbar inline editing and it's great.

aanndryyyy avatar Dec 10 '25 12:12 aanndryyyy