Navigation: Add clearable option to color picker in navigation block#68454
Navigation: Add clearable option to color picker in navigation block#68454t-hamano merged 1 commit intoWordPress:trunkfrom
navigation block#68454Conversation
navigation block
|
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. |
Mayank-Tripathi32
left a comment
There was a problem hiding this comment.
LGTM, Works as expected.
hbhalodia
left a comment
There was a problem hiding this comment.
Not sure if the failing tests are related, but it should resolve. Approving for code logic.
|
Hi @t-hamano, can you please review this PR when you get a moment? |
|
I think we should first consider whether we need a consistent clear button. Because there is precedent in the past where the need for this clear button has been debated and removed (#42689). @WordPress/gutenberg-design Is this clear button necessary in the current Gutenberg? By the way, currently there is a reset button that appears when you hover the mouse over an item if it has a color value. Whether this reset button is displayed or not is synchronized with the |
|
Thanks for the review @t-hamano.
This feature becomes quite helpful when clearing the colors. The
|
t-hamano
left a comment
There was a problem hiding this comment.
I noticed that PRs similar to this one were merged recently:
Maybe it's better to have a consistent clear button now, so I'm accepting this PR. Sorry for the confusion 🙇♂️
However, if the button text is long, the reset button will cover the text:
We'll need to address this issue separately.
I've taken this case into account and am working on it. Thanks for the review! |
…ordPress#68454) Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
…ordPress#68454) Co-authored-by: yogeshbhutkar <yogeshbhutkar@git.wordpress.org> Co-authored-by: Mayank-Tripathi32 <mayanktripathi32@git.wordpress.org> Co-authored-by: hbhalodia <hbhalodia@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>



What, Why and How?
This PR introduces a
clearablebutton, allowing users to easily clear applied colors. It ensures consistency between theColor Pickerin theSub Menuand the one in theNavigationblock.The
clearableoption has been added to the settings for all applicable settings, effectively addressing the issue.Testing Instructions
Navigation blockto your page.Background Colorto the block.Clear buttonto remove the applied color and verify that it works as expected.Screenshots
Screencast
Closes: #68453