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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Block Bindings: Use post meta label from
register_meta
in block bindings workflows #65099Block Bindings: Use post meta label from
register_meta
in block bindings workflows #65099Changes from 41 commits
12f355e
9ba93b0
364dc27
d3491d6
19cb1f9
1e8c3bf
f8f18fc
82006cf
ae6037e
faa713f
8706071
7593629
6758ec1
35127e0
ef6c64b
0330ddf
53ac96d
c41877b
bf7ab98
da336be
0734e02
d76d0a4
ca45424
b911680
44048d7
17e0bd6
1d33103
e17fde7
782a123
344cbf7
4914c8f
780ae67
a23dd37
a4436b0
d5eb220
0a92891
0a0ee3f
f089676
6288d34
efa3b5d
23908f7
d724026
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This part needs further enhancements to become more flexible. In particular:
In my opinion, every source should construct
args
argument, which for Post Meta happens to be{ key }
. For Pattern Overrides that would be{}
orundefined
, and every other source could decide what that it.In effect, I believe the object item from the
fields
should have the following shape:This way it's up to the implementor to provide all that's necessary to make it work when defining
getFieldsList
fir the source.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I plan to create an issue to discuss the whole
getFieldsList
API to ensure it feels good before making it public.I believe I shouldn't have used the
args
variable name here because it doesn't refer to the source args, but the object returned bygetFieldsList
. There are two different things:args
they want. For example, in post meta we usekey
to specify which custom field the attribute is connected to:getFieldsList
API: This is used just to get a list of ALL the bindable fields in order to show them in the UI and let the user select. In this case, I believe we only need thelabel
and thevalue
. As it is a callback, each source can decide what to show as the label and the value.I hope we can clarify it by improving the
getFieldsList
API (probably needs a new name) and that part of the code, because I agree it feels confusing right now.