WordPress / gutenberg

The Block Editor project for WordPress and beyond. Plugin is available from the official repository.
https://wordpress.org/gutenberg/
Other
10.53k stars 4.21k forks source link

ColorPalette: "Clear" button should be disabled if there's no value. #67107

Closed juanfra closed 2 days ago

juanfra commented 3 days ago

Description

The “Clear” button in the ColorPalette is currently active even when no color value is set. This can be confusing for users, as clicking the button doesn’t do anything in this case. It would be more intuitive if the button were disabled when there’s no color to clear.

https://github.com/user-attachments/assets/18fa5f81-0567-40be-aea1-2efe937c0035

Mayank-Tripathi32 commented 3 days ago

Hi @juanfra ,

Thank you for reporting this. I agree with your suggestion to disable the button when no color is selected. I will work on implementing this change and will open a PR accordingly. I believe this adjustment will also contribute to an improved user experience.

juanfra commented 3 days ago

Thanks @Mayank-Tripathi32 ! I already created a PR for this issue as I fixed it when I found it. So there's no need to create a new one; you can check the open PR here