Repository navigation
Explain empty block bindings field list and hide unbindable fields - #606
Open
the-hercules wants to merge 1 commit into
Open
the-hercules wants to merge 1 commit into
the-hercules wants to merge 1 commit into
Conversation
…dable fields Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
With default settings, the block editor's "Connect to a field" panel didn't appear at all, because field groups have Show in REST API off. Once that was on, the picker listed fields with "Allow Access to Value in Editor UI" off, which render empty on the front end once bound. Nothing in the UI explained either requirement.
This PR:
_sourcedata and thescf_field_groupstypes endpoint now includeallow_in_bindings.updateBlockBindings()store{ content: undefined }. An empty value for an unbound attribute is now ignored.Closes #600
Testing
Automated: new Jest tests in
tests/js/bindings/block-editor-panel.test.jsandutils.test.js, and new PHPUnit tests forallow_in_bindingsin the REST and types endpoint tests. The JS and PHPUnit suites and PHPStan pass locally.Use of AI Tools
Written with Claude Code (Claude Opus 5.5), reviewed and tested by me.