Duotone Settings: Add reset button and improve toggle rendering in FiltersPanel#68672
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. |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the PR!
The reset button should be visible when hovering over the dropdown button, not the reset button itself. Otherwise, people won't be able to use the reset button unless they know there is a transparent reset button there. This is probably because the structure is different from the rest of the UI.
You will probably need to move away from using ItemGroup,Item components and align with other implementations.
Note that you will also need to deal with focus issues. See this comment.
I reviewed the Ref: |
23d6b4a to
300968c
Compare
|
Thanks for the review. I've applied all the suggestions. The changes are testing well for me. changes.movCan you please review the PR when you get a moment? Thanks! |
t-hamano
left a comment
There was a problem hiding this comment.
Thanks for the update! I added a little bit of feedback at the end, but everything is working as expected.
|
Thanks for your suggestions! I've incorporated all of them. When you have a moment, could you take a look? Appreciate it! P.S. The failing test is unrelated to the changes made. |
…FiltersPanel (WordPress#68672) * Duotone Settings: Add reset button and improve toggle rendering in FiltersPanel * refactor: revert usage of `clearable` prop * refactor: hover on button to show `reset` * refactor: remove the usage of `ItemGroup` and add `css` for border * refactor: update button label to 'Reset' and adjust border color in filters panel Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
…FiltersPanel (WordPress#68672) * Duotone Settings: Add reset button and improve toggle rendering in FiltersPanel * refactor: revert usage of `clearable` prop * refactor: hover on button to show `reset` * refactor: remove the usage of `ItemGroup` and add `css` for border * refactor: update button label to 'Reset' and adjust border color in filters panel Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What, Why and How?
This PR adds a Reset button to the Duotone Filter control, enhancing its functionality and ensuring consistency with other color control components.
The Reset button is conditionally rendered based on a newly introduced
clearableprop.Testing Instructions
post editpage.Imageblock and insert an image.Duotonefilter to the image.Duotonevalue can now be cleared with the reset button.Screencast
Closes: #68671