-
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
Duotone: fix code typo #62953
Duotone: fix code typo #62953
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Size Change: -14.3 kB (-0.81%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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.
Thank you for following up on this 🎉
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.
Thanks for the ping!
This fixes the typo, but I think there might still be a bug in useDuotoneStyles
. The fix in #55288 had colors
in the dependency array for the useEffect
that updates blockElement
to force a re-render in Safari.
It looks like right now we only have isValidFilter
and blockElement
in that dependency array, so if we go to update the Duotone colors in Safari, that useEffect
isn't called while updating, so the old bug where sometimes Safari doesn't rerender is present:
2024-07-01.15.35.46.mp4
Here's the current dependency array:
}, [ isValidFilter, blockElement ] ); |
If I add colors
to it locally, then retesting in Safari with the rest of this PR, the Duotone colors update reliably for me:
2024-07-01.15.44.56.mp4
What do you think?
@andrewserong Thanks! The strange thing is that it works the first few time, and then it stop working. I did as you suggested and now it works consistently. |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: jsnajdr <[email protected]> Co-authored-by: andrewserong <[email protected]>
I just cherry-picked this PR to the wp/6.6 branch to get it included in the next release: fe20128 |
Thanks Ella! 🙇 |
Co-authored-by: ellatrix <[email protected]> Co-authored-by: jsnajdr <[email protected]> Co-authored-by: andrewserong <[email protected]>
What?
Better late than never, I saw the comment by @jsnajdr #56875 (comment)
I mistakenly passed the instance ID as the client ID, which broke the fix from #55288 by @andrewserong.
Why?
Restores the fix from #55288.
How?
Testing Instructions
See #55288.
Testing Instructions for Keyboard
Screenshots or screencast