-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: Cleanup unused ToggleGroupControl
config values
#65456
Conversation
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. |
I feel like a CHANGELOG entry isn't necessary here, but I'm happy to add one if anyone disagrees. |
Size Change: -133 B (-0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
5761750
to
96046db
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup! 🧹
Ideally in the long term:
- we mostly use theme variables;
- we share variables for all styles, regardless of how they are written (CSS, Sass, JS...)
This is definitely a step in the right direction.
Co-authored-by: tyxla <[email protected]> Co-authored-by: ciampo <[email protected]>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 969c3a5 |
Part of #43997
What?
While reviewing some code related to
ToggleGroupControl
I spotted some unused config values and decided to clean them up.I found that there are more unused ones around, but I decided this is enough for a single PR, since I initially headed to clean up solely the
ToggleGroupControl
ones.Why?
They're unused and can just be removed:
toggleGroupControlBackgroundColor
- updated to use the underlyingcontrolBackgroundColor
toggleGroupControlBorderColor
(previouslysegmentedControlBorderColor
) - never used since creation in [Components]: Add SegmentedControl #31937toggleGroupControlBackdropBackgroundColor
(previouslysegmentedControlBackdropBackgroundColor
) - never used since creation in [Components]: Add SegmentedControl #31937toggleGroupControlBackdropBorderColor
(previouslysegmentedControlBackdropBorderColor
) - never used since creation in [Components]: Add SegmentedControl #31937toggleGroupControlButtonColorActive
: (previouslysegmentedControlButtonColorActive
) - never used since creation in [Components]: Add SegmentedControl #31937controlBoxShadow
: no longer in use since Remove BaseField component #47911controlDestructiveBorderColor
: no longer in use since Remove BaseField component #47911controlSurfaceColor
- no longer in use after thetoggleGroupControl
values were removed.controlTextActiveColor
- never used since creation in [Components]: Add SegmentedControl #31937surfaceBackgroundSubtleColor
- not in use since introduced in components: Remove wp-g2 from surface #31238As you can see, this also allowed us to remove the entire
TOGGLE_GROUP_CONTROL_PROPS
object.How?
I removed the unused ones and cleaned the code around a little bit.
Testing Instructions
Verify the removed config values aren't in use. There should be no visual/functional changes.
Testing Instructions for Keyboard
Same
Screenshots or screencast
None, this has no visual impact.