Open juanfra opened 3 days ago
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: juanfra <juanfra@git.wordpress.org>
Co-authored-by: dhruvang21 <dhruvang21@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>
Co-authored-by: jameskoster <jameskoster@git.wordpress.org>
Co-authored-by: tyxla <tyxla@git.wordpress.org>
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.
Size Change: +184 B (+0.01%)
Total Size: 1.82 MB
Filename | Size | Change |
---|---|---|
build/block-editor/index.min.js |
255 kB | +88 B (+0.03%) |
build/block-editor/style-rtl.css |
15.4 kB | +48 B (+0.31%) |
build/block-editor/style.css |
15.4 kB | +48 B (+0.31%) |
I tested this PR in the Gutenberg PR reviewer, and it works perfectly, resetting the color with a single click. I’ve also attached a video of the testing process below for reference.
https://github.com/user-attachments/assets/f16b4035-4af4-4960-b7fc-2b20e094c60e
This feels like a good ergonomic addition. However I wonder if this reset button shouldn't be part of the ItemGroup component itself, rather than a separate piece like this. CC: @WordPress/gutenberg-components
However I wonder if this reset button shouldn't be part of the ItemGroup component itself
Eventually yes I think so; https://github.com/WordPress/gutenberg/issues/64445.
@jasmussen @jameskoster should we move forward with this improvement and then eventually implement the changes in the component?
Component first or this use case first, I'm personally okay either way. Though I'd love a components-group chime in just to be sure we aren't building up drift.
I'd lean on going use-case first, and then we can always add it as an API to the ItemGroup.Item
component as part of https://github.com/WordPress/gutenberg/issues/64445.
What?
Add an inline reset button to the color control, shown on hover/focus, if there's a value. Picked changes from this PR with a few tweaks. The original PR was closed as stale, but I believe this is a nice improvement that will improve the overall experience for creators.
Props @kevin940726
Why?
To make it easier to reset a color selection, reduce the number of clicks as it doesn't require opening the color options panel.
Fixes https://github.com/WordPress/gutenberg/issues/41866
How?
Adding a button if there's a color value, and adjusting the CSS so that it looks like the proposed designs.
Testing Instructions
Screenshots or screencast
https://github.com/user-attachments/assets/5e41d3ca-be1c-43ad-980c-c26b07515505