-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Refactor reusable block edit component using hooks (and fix interactions with multiple instances of the same reusable block) #21427
Conversation
Size Change: -118 B (0%) Total Size: 1.17 MB
ℹ️ View Unchanged
|
f1b74e7
to
5d5eef5
Compare
7800a14
to
3773085
Compare
d0c1873
to
c17ca09
Compare
62852c5 fixed the last issue with this PR. It should be good to go now. 🥳 |
I'd like a final code review prior to merge. Since the bugs this PR fixes are rather significant (in my opinion), I've added the "Backport to WP Core" label. Feel free to remove it if you disagree. |
62852c5
to
cd545a7
Compare
Rebased. @aduth, if you have the time, could you review this again? (Your previous review is blocking.) |
I don't know that I can review this right away, but I can at least dismiss my own older review 👍 |
cd545a7
to
a2f7f0b
Compare
I tested this branch myself again, trying everything I could to try and break something, but I was unable to. The behavior seems to be rock solid, and the PR definitely fixes the issues in In the interest of getting this included in WP 5.6, I'm going to go ahead and merge this. |
Description
This PR refactors the
ReusableBlockEdit
to use React hooks.It also fixes two issues with the current implementation in
master
:Esc
to cancel editing the reusable block didn't work properly. (It would mess up the preview of the reusable block in the editor.)