Skip to content
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: do not use useSource hook conditionally #59403

Merged
merged 81 commits into from
Feb 28, 2024
Merged
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit Hold shift + click to select a range
37a7f5a
replace use-binding-attributes with block-binding-support
retrofox Feb 12, 2024
09f8565
minor enhancement
retrofox Feb 10, 2024
45742ca
minor change
retrofox Feb 10, 2024
6af2517
tweak
retrofox Feb 10, 2024
f02c4ef
do not import use-binding-attributes
retrofox Feb 10, 2024
6412b7d
use isItPossibleToBindBlock() helper
retrofox Feb 10, 2024
5749a34
introduce core/entity source handler
retrofox Feb 10, 2024
25b0bb8
rename folder
retrofox Feb 11, 2024
76e0cb5
rename source name
retrofox Feb 12, 2024
dc48e09
polish post-entity source handler
retrofox Feb 12, 2024
44421f1
make core/post-entity more consistent with core-data
retrofox Feb 12, 2024
8a11812
make entity source hand;ler more generic
retrofox Feb 12, 2024
1b40bef
fix entity sour handl;er issues
retrofox Feb 12, 2024
59b26ba
remove uneeded useValue () hook (crossfingers)
retrofox Feb 12, 2024
72338e3
minor jsdoc improvement
retrofox Feb 12, 2024
f7d87a8
clean
retrofox Feb 12, 2024
b60c7ea
rename with updateValue()
retrofox Feb 12, 2024
adfd711
remove core/entity binding source handler
retrofox Feb 12, 2024
832f170
move useSource to Connector cmp
retrofox Feb 12, 2024
42fc47c
move the whole dryining logic to the Connect component
retrofox Feb 12, 2024
09c8cd3
improve jsdoc
retrofox Feb 12, 2024
b0a0310
rename to blockProps
retrofox Feb 12, 2024
c46c140
minor jsdoc improvements
retrofox Feb 13, 2024
4f4e3b5
use a single effect to update attr and value
retrofox Feb 13, 2024
5ae157e
discard useValue. Return value and setValue instead
retrofox Feb 13, 2024
6ebb240
check wheter updateValue function is defined
retrofox Feb 13, 2024
8c8c90c
check prop value is defined when updating attr
retrofox Feb 13, 2024
536bc90
handle `placerholder`
retrofox Feb 14, 2024
4063d77
ensure to put attribute in sync when onmount
retrofox Feb 14, 2024
6a28f73
remove // eslint comment
retrofox Feb 14, 2024
55c8cda
enable editing for bound with post-meta
retrofox Feb 14, 2024
a255fd5
move block bindiung processor to hooks/
retrofox Feb 14, 2024
a2b5326
ensure update bound attr once when mounting
retrofox Feb 15, 2024
ad5b1e1
Update packages/block-editor/src/hooks/block-binding-support/index.js
retrofox Feb 15, 2024
4e8f2c8
disable editing block attribute
retrofox Feb 15, 2024
f06ce6d
move changes to the use-binding-attributes file
retrofox Feb 15, 2024
de41aa0
introduce BlockBindingBridge component
retrofox Feb 15, 2024
c1119b5
update isItPossibleToBindBlock() import path
retrofox Feb 15, 2024
52c45e1
introduce hasPossibleBlockBinding() helper
retrofox Feb 15, 2024
bdc0b82
use hooks API to extened blocks with bound attts
retrofox Feb 15, 2024
f1e941a
fix propagating attr value. jsdoc
retrofox Feb 15, 2024
b944f21
minor changes
retrofox Feb 15, 2024
b9f8aef
minor code enhancement
retrofox Feb 19, 2024
e6cf0e3
not edit bound prop for now
retrofox Feb 19, 2024
8f69062
jsdoc
retrofox Feb 19, 2024
ff76966
revert using hooks API to extrend block
retrofox Feb 19, 2024
8b135ba
jsdoc
retrofox Feb 19, 2024
df35039
update internal path
retrofox Feb 19, 2024
d84bc0a
rollback hook utils chnages
retrofox Feb 19, 2024
75284b4
tidy
retrofox Feb 20, 2024
2c8edfb
wrap Connector instances with a Fragment
retrofox Feb 20, 2024
5b39024
return original Edit instance when no bindings
retrofox Feb 20, 2024
c86f3dc
check whether useSource is defined
retrofox Feb 20, 2024
967efaa
Use `useSelect` and move it out of the for loop
michalczaplinski Feb 20, 2024
3143392
check attr value type
retrofox Feb 20, 2024
f0af985
iterare when creating BindingConnector instances
retrofox Feb 21, 2024
67dd86a
rename helper functions
retrofox Feb 21, 2024
fed0e87
use useSelect to get binding sources
retrofox Feb 21, 2024
9126558
Update packages/block-editor/src/hooks/use-bindings-attributes.js
retrofox Feb 21, 2024
5179ad0
Update packages/block-editor/src/hooks/use-bindings-attributes.js
retrofox Feb 21, 2024
9837379
pass prev attr value to compare
retrofox Feb 22, 2024
cdbbda7
improve binding allowed block attributes
retrofox Feb 22, 2024
f4906b6
sync derevied updates when updating bound attr
retrofox Feb 22, 2024
c554dc5
improve getting attr source
retrofox Feb 22, 2024
9621b02
check properly bindings data
retrofox Feb 22, 2024
eb27c87
preserve the RichTextData for block attr
retrofox Feb 23, 2024
fbb24f2
comment line just for tesrting purposes
retrofox Feb 23, 2024
90c828a
rebasing changes
retrofox Feb 23, 2024
01ce180
rollback change foir testing purposes
retrofox Feb 23, 2024
f790ca7
change cmp prop name. improve jsdoc
retrofox Feb 27, 2024
46da935
simplify checking bindins value
retrofox Feb 27, 2024
1762e9c
use attr name as key instance
retrofox Feb 27, 2024
e03d861
store bound attrs values in a local state
retrofox Feb 27, 2024
8e2eeaa
collect and update bound attr in a local state
retrofox Feb 27, 2024
56a782b
Refactor block binding functionality from e55f6bc
michalczaplinski Feb 27, 2024
80e8102
pick block data from straight props
retrofox Feb 28, 2024
eb0f79a
Merge branch 'update/do-not-conditional-hook-in-binding' of github.co…
retrofox Feb 28, 2024
fa9ed05
remove conditional onPropValueChange call
retrofox Feb 28, 2024
021f87a
Merge branch 'trunk' into update/do-not-conditional-hook-in-binding
retrofox Feb 28, 2024
b6d14b5
Update e2e tests
SantosGuillamot Feb 28, 2024
879129c
Use `useLayoutEffect` instead of `useEffect`
SantosGuillamot Feb 28, 2024
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
Prev Previous commit
Next Next commit
do not import use-binding-attributes
  • Loading branch information
retrofox committed Feb 26, 2024

Verified

This commit was signed with the committer’s verified signature.
eljamm Fedi Jamoussi
commit f02c4ef1cbaa8f10f926049de50363af308be61a
2 changes: 1 addition & 1 deletion packages/block-editor/src/hooks/index.js
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ import contentLockUI from './content-lock-ui';
import './metadata';
import blockHooks from './block-hooks';
import blockRenaming from './block-renaming';
import './use-bindings-attributes';
// import './use-bindings-attributes';

createBlockEditFilter(
[