AdvancedCustomFields / AdvancedCustomFields/acf

Gutenberg compatibility for dynamic metaboxes

Open
#111 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
945
Forks
197
PR merge metrics
No merged PRs in 30d

Description

Description

One of our favorite, simple and intuitive features is the ability to update metaboxes dynamically whilst editing a post. For example, metaboxes will hide or show depending on their location rules when changing the post template, format, parent and other post attributes.

To do this, we use JS to detect "changes" to the post attributes. Once a change is detected, we send an AJAX request with the current "post" information and use the returned JSON to hide, show or update the metaboxes. We also update the "Show on Screen" checkbox elements to match the visible metaboxes.

Issues

  • Existing jQuery event listeners are not compatible with Gutenberg

Questions

  • How do we listen for changes to the following post attributes?
    page_template
    page_parent
    post_format
    post_terms
  • How do we get these values on initial page load?
  • How do we get these values on change?
  • How can we hide and show metaboxes? Is CSS ok for this?
  • How can we update the "Show on Screen" check boxes to match the visible metaboxes?

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the existing jQuery event listeners and AJAX flow for dynamic metaboxes. Identify how Gutenberg exposes page_template, page_parent, post_format, and post_terms on initial load and when they change. Done means metabox visibility and the “Show on Screen” checkboxes stay synchronized in Gutenberg.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, php, wordpress
Domain
backend, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.