Skip to content

ColorPicker: Add a visual cue when the value is copied #70083

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

Merged
merged 2 commits into from
May 9, 2025

Conversation

Mamaduka
Copy link
Member

@Mamaduka Mamaduka commented May 8, 2025

What?

Related #57157.

PR updates ColorPicker and adds a visual cue when the value is copied.

Why?

This is a common UI pattern, alongside changing the accessible label text.

Testing Instructions

  1. Open a post or page.
  2. Insert a paragraph block.
  3. Select a color and open a color picker.
  4. Confirm that the icon changes from copy to check when the value is copied.

Testing Instructions for Keyboard

Same.

Screenshots or screencast

CleanShot.2025-05-08.at.13.07.38.mp4

@Mamaduka Mamaduka self-assigned this May 8, 2025
@Mamaduka Mamaduka requested a review from ajitbohra as a code owner May 8, 2025 09:18
@Mamaduka Mamaduka added [Type] Enhancement A suggestion for improvement. [Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components labels May 8, 2025
@Mamaduka Mamaduka requested review from mirka, tyxla and t-hamano May 8, 2025 09:18
@Mamaduka Mamaduka changed the title ColorPicker: Change icon when value is copied ColorPicker: Add a visual cue when the value is copied May 8, 2025
Copy link

github-actions bot commented May 8, 2025

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 props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

Copy link

github-actions bot commented May 8, 2025

Flaky tests detected in 54f0b10.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/14903789453
📝 Reported issues:

@Mamaduka Mamaduka force-pushed the try/color-copy-button-toggle-icon branch from 54f0b10 to 7749e93 Compare May 9, 2025 10:37
@Mamaduka
Copy link
Member Author

Mamaduka commented May 9, 2025

I'm going to merge this; it's a minor visual enhancement.

@Mamaduka Mamaduka merged commit 1eb798d into trunk May 9, 2025
89 of 124 checks passed
@Mamaduka Mamaduka deleted the try/color-copy-button-toggle-icon branch May 9, 2025 13:32
@github-actions github-actions bot added this to the Gutenberg 20.9 milestone May 9, 2025
chriszarate pushed a commit to chriszarate/gutenberg that referenced this pull request Jul 1, 2025
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system [Package] Components /packages/components [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant