Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
bc378c3
Need refactor
cbravobernal Sep 3, 2025
0d4fc9a
Add a more stable version
cbravobernal Sep 3, 2025
92d5955
Works with warnings
cbravobernal Sep 4, 2025
fdbe38d
Pass update function
cbravobernal Sep 8, 2025
039b22b
More experiments, still pending some work
cbravobernal Sep 9, 2025
ba06677
Fix post meta not loading, but back to useSelect warning
cbravobernal Sep 10, 2025
c06f100
Return to edit values
cbravobernal Sep 10, 2025
4497a1d
remove not used
cbravobernal Sep 11, 2025
61cd233
Update e2e tests
cbravobernal Sep 11, 2025
6cd151b
Add modal e2e test
cbravobernal Sep 11, 2025
1f595ab
All is working now, still needs some review and tweaks
cbravobernal Sep 11, 2025
5df22ef
Add editorUI validation and testing
cbravobernal Sep 12, 2025
d054a8e
Forgot to remove that
cbravobernal Sep 12, 2025
993dba0
Remove deprecated getFieldsList
cbravobernal Sep 12, 2025
e266ecb
Remove more getFieldsList uses
cbravobernal Sep 12, 2025
86e5e30
Pass attribute to the modal function
cbravobernal Sep 15, 2025
e21766c
Use item instead of value
cbravobernal Sep 15, 2025
008b35b
Limit post-data only to post-date block
cbravobernal Sep 15, 2025
ba4dc83
Add e2e to post-data binding source
cbravobernal Sep 15, 2025
faa67ab
Reduce modal overload
cbravobernal Sep 16, 2025
9b16988
Sourcekey is needed
cbravobernal Sep 16, 2025
27abc0e
Update modal
cbravobernal Sep 16, 2025
ad973da
Remove context trick, fix post data registration
cbravobernal Sep 17, 2025
21676e9
Fix useSelect warning
cbravobernal Sep 17, 2025
9cb5b23
Add backport changelog
cbravobernal Sep 17, 2025
2456f74
Put the wrong name on backport
cbravobernal Sep 17, 2025
cecf24e
Address feedback
cbravobernal Sep 18, 2025
8d65862
Address more fixes
cbravobernal Sep 18, 2025
1cee070
Remove extraneous `blockBindingsContext` computation
ockham Sep 18, 2025
6b24a13
Remove onSelect
ockham Sep 18, 2025
25e775a
Remove temporary format
cbravobernal Sep 18, 2025
3cbf5a4
Fix performance on attribute rendering
cbravobernal Sep 18, 2025
05766fb
Refactor to simplify the source
cbravobernal Sep 19, 2025
5380430
Add ton of changes
cbravobernal Sep 24, 2025
1835f8c
Fix unnecessary double click
cbravobernal Sep 24, 2025
c5c55ac
Fix isSelected checker bug
cbravobernal Sep 25, 2025
2d58447
Move the renderModal to a React component
cbravobernal Sep 26, 2025
070847d
Adapt code to new server bindable attributes getter
cbravobernal Sep 29, 2025
2d9f61e
New approach that simplifies a lot
cbravobernal Sep 29, 2025
1a06498
Make react key more stable
cbravobernal Sep 30, 2025
2afa1db
Registration: Remove validation of value field
ockham Oct 1, 2025
cedc481
Fix registration tests
ockham Oct 1, 2025
b2eb501
Remove stray dependencies header
ockham Oct 1, 2025
71bc965
Remove more now-obsolete value fields
ockham Oct 1, 2025
08aa120
Add no data available
cbravobernal Oct 1, 2025
0528e59
Remove now-obsolete keys from editorUI data items
ockham Oct 1, 2025
7942b31
Update docs
ockham Oct 1, 2025
22c3b30
Update WPBlockBindingsEditorUIDataItem type def
ockham Oct 1, 2025
b3f6445
Not need to deprecate getFieldsList, as it was only in Gutenberg and …
cbravobernal Oct 2, 2025
9e1455b
Remove docs and wait for 6.9 beta at least
cbravobernal Oct 2, 2025
c516357
Remove extra empty line
cbravobernal Oct 2, 2025
be8d327
Move modal
ockham Oct 2, 2025
aa317fb
Remove unnecessary React fragment
ockham Oct 2, 2025
b372f76
Remove another unnessecary React fragment
ockham Oct 2, 2025
eefea63
Allow mixing of readonly and editable attributes
ockham Oct 2, 2025
e4a1034
Show attributes without compatible data as read-only
ockham Oct 2, 2025
7ee4e63
Address modal changes requested, add onClose functionç
cbravobernal Oct 3, 2025
7095be1
Fix bad implemented e2e example
cbravobernal Oct 3, 2025
8c3bc88
Rename to closeModal
cbravobernal Oct 3, 2025
372c976
Expose postId and postType context to e2e test source
ockham Oct 6, 2025
50a7e74
Update JSDoc
ockham Oct 6, 2025
bf9f93c
Whitespace
ockham Oct 6, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions backport-changelog/6.9/9933.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
https://github.com/WordPress/wordpress-develop/pull/9933

* https://github.com/WordPress/gutenberg/pull/71542
2 changes: 1 addition & 1 deletion lib/compat/wordpress-6.9/post-data-block-bindings.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ function gutenberg_register_block_bindings_post_data_source() {
array(
'label' => _x( 'Post Data', 'block bindings source' ),
'get_value_callback' => 'gutenberg_block_bindings_post_data_get_value',
'uses_context' => array( 'postId' ),
'uses_context' => array( 'postId', 'postType' ),
)
);
}
Expand Down
19 changes: 13 additions & 6 deletions packages/block-editor/src/components/rich-text/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import clsx from 'clsx';
import fastDeepEqual from 'fast-deep-equal/es6';

/**
* WordPress dependencies
Expand Down Expand Up @@ -218,13 +219,19 @@ export function RichTextWrapper(

const { getBlockAttributes } = select( blockEditorStore );
const blockAttributes = getBlockAttributes( clientId );
const fieldsList = blockBindingsSource?.getFieldsList?.( {
select,
context: blockBindingsContext,
} );
let clientSideFieldLabel = null;
if ( blockBindingsSource?.editorUI ) {
const editorUIResult = blockBindingsSource.editorUI( {
select,
context: blockBindingsContext,
} );
clientSideFieldLabel = editorUIResult.data?.find( ( item ) =>
fastDeepEqual( item.args, relatedBinding?.args )
)?.label;
}

const bindingKey =
fieldsList?.[ relatedBinding?.args?.key ]?.label ??
blockBindingsSource?.label;
clientSideFieldLabel ?? blockBindingsSource?.label;

const _bindingsPlaceholder = _disableBoundBlock
? bindingKey
Expand Down
Loading
Loading