-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Border Panel: Decode values so that border radius presets are properly handled in global styles #73072
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
Border Panel: Decode values so that border radius presets are properly handled in global styles #73072
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. |
|
Size Change: +8 B (0%) Total Size: 2.47 MB
ℹ️ View Unchanged
|
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.
Thanks for the quick turnaround on this fix @andrewserong 🚀
✅ Could replicate original issue where saved Global Styles values weren't reflected in border radius controls
✅ After applying this fix, the border radius control in the global styles panel works as expected
✅ The border radius control within the block inspector continues to function as before
✅ Newly assigned "none" preset values for border radius do correct default to 0 as per: #71631
✅ Tests for previous "none" preset slug fix are still passing
LGTM 🚢
Screen.Recording.2025-11-07.at.2.51.47.pm.mp4
|
Flaky tests detected in 863c1ea. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/19158362600
|
…y handled (#73072) Co-authored-by: andrewserong <andrewserong@git.wordpress.org> Co-authored-by: aaronrobertshaw <aaronrobertshaw@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
|
I just cherry-picked this PR to the wp/6.9 branch to get it included in the next release: f9bb896 |
|
Thanks for the speedy review @aaronrobertshaw and for flagging the issue @t-hamano! 🙇 |
|
Thanks for the fix! |
What?
Resolves an issue flagged in #73033 (comment) by @t-hamano
Fix the border panel in global styles so that the border radius UI correctly reflects any presets that are selected.
Why?
With border radius presets, when saving the changes in global styles, it's correctly saved in the database, but the UI doesn't update correctly to reflect the selected values. Values can be either
var:based orvar()using the actual CSS variable. These values need to be decoded in order for the UI to correctly reflect the selected preset.How?
decodeValueon the border radius valuesTesting Instructions
In your theme add the following under the
settingssection in yourtheme.jsonto add some border radius presets:trunk.Screenshots or screencast
2025-11-07.15.34.47.mp4