ToggleGroupControl: Make unselected item color consistent across all variants#75737
ToggleGroupControl: Make unselected item color consistent across all variants#75737
ToggleGroupControl: Make unselected item color consistent across all variants#75737Conversation
|
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. |
|
|
||
| &:hover { | ||
| color: ${ COLORS.theme.gray[ 900 ] }; | ||
| color: ${ COLORS.theme.foreground }; |
There was a problem hiding this comment.
This is effectively the same color, but the change fixes a deprecation warning.
|
Size Change: +14 B (0%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
|
Nice, thanks for doing this! At a glance, this looks good, what's the hex code color? I had some problem with my env trying to test this, just want to make sure the gray color is at least the equivalent of gray 600 or around 700, either of those is fine. |
mirka
left a comment
There was a problem hiding this comment.
While I still have concerns about differentiation between disabled and unselected, I'd say the changes in this PR are just consistency improvements 👍
Also I noticed a bug. It's subtle, but there's a hover effect on disabled items:
CleanShot.2026-02-20.at.04-39-39.mp4
Probably pre-existing, so your call on whether a fix can be sneaked in here 😄
ToggleGroupControl: tweak deselected item colorToggleGroupControl: Make unselected item color consistent across all variants
b008c15 to
dab82cd
Compare
Yup, it's
I agree that disabled and unselected items don't look very different, and I also agree that it's something that we should iterate on separately.
👀 🧹 🐛 ❌ I included a fix for that, too. |
|
Flaky tests detected in 3dccb64. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/22214636685
|
…l variants (#75737) * `ToggleGroupControl`: Remove color override for icon and pressed items * Don't use deprecated variables * CHANGELOG * Edit CHANGELOG * Do not apply hover styles to disabled items * Add hover color bug fix to CHANGELOG --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
|
I just cherry-picked this PR to the wp/7.0 branch to get it included in the next release: 430c8b6 |
CI run: #10988. See #64595. --- I've included a log of the Gutenberg changes with the following command: ``` git log --reverse --format="- %s" b441348bb7e05af351c250b74283f253acaf9138..23b566c72e9c4a36219ef5d6e62890f05551f6cb | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy ``` - Remove experimental property from Icon block (WordPress/gutenberg#75742) - Real-time collab editing: Fix undo E2E test (WordPress/gutenberg#75740) - Snackbar: Fix scaling issue with snackbars that update their content via a common id (WordPress/gutenberg#75709) - Vips and worker-threads packages: remove private flag so that packages can be published to npm (WordPress/gutenberg#75752) - Update wordpress/vips in root package.json to use a relative path (WordPress/gutenberg#75758) - Fix change-detection and new-post E2E tests after RTC enabled by default (WordPress/gutenberg#75751) - Query: Remove content role from block (WordPress/gutenberg#75760) - `ToggleGroupControl`: Make unselected item color consistent across all variants (WordPress/gutenberg#75737) - Icon-block: fix global-styles selectors (WordPress/gutenberg#75724) - RTC: Add cap check for single taxonomy term entities (WordPress/gutenberg#75708) - Core Data: Create icons entity (WordPress/gutenberg#75773) git-svn-id: https://develop.svn.wordpress.org/trunk@61705 602fd350-edb4-49c9-b593-d223f7449a82
CI run: WordPress/wordpress-develop#10988. See #64595. --- I've included a log of the Gutenberg changes with the following command: ``` git log --reverse --format="- %s" b441348bb7e05af351c250b74283f253acaf9138..23b566c72e9c4a36219ef5d6e62890f05551f6cb | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy ``` - Remove experimental property from Icon block (WordPress/gutenberg#75742) - Real-time collab editing: Fix undo E2E test (WordPress/gutenberg#75740) - Snackbar: Fix scaling issue with snackbars that update their content via a common id (WordPress/gutenberg#75709) - Vips and worker-threads packages: remove private flag so that packages can be published to npm (WordPress/gutenberg#75752) - Update wordpress/vips in root package.json to use a relative path (WordPress/gutenberg#75758) - Fix change-detection and new-post E2E tests after RTC enabled by default (WordPress/gutenberg#75751) - Query: Remove content role from block (WordPress/gutenberg#75760) - `ToggleGroupControl`: Make unselected item color consistent across all variants (WordPress/gutenberg#75737) - Icon-block: fix global-styles selectors (WordPress/gutenberg#75724) - RTC: Add cap check for single taxonomy term entities (WordPress/gutenberg#75708) - Core Data: Create icons entity (WordPress/gutenberg#75773) Built from https://develop.svn.wordpress.org/trunk@61705 git-svn-id: http://core.svn.wordpress.org/trunk@61013 1a063a9b-81f0-0310-95a4-ce76da25c4cd
…l variants (#75737) * `ToggleGroupControl`: Remove color override for icon and pressed items * Don't use deprecated variables * CHANGELOG * Edit CHANGELOG * Do not apply hover styles to disabled items * Add hover color bug fix to CHANGELOG --- Co-authored-by: ciampo <mciampini@git.wordpress.org> Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
What?
Tweak the color of the
ToggleGroupControlitems as per the instructions in #75138 (comment)Why?
Visual polish
How?
Removed dedicated color overrides for icon and deselecteable internal item variants.
These variants now align with the standard, non-icons, non-deselectable version of
ToggleGroupControl.These changes also exposed a little bug about the hover color of disabled items, for which a fix is also included in this PR.
Testing Instructions
Screenshots or screencast