-
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
Dynamically set border panel label based on the controls available #59358
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: +79 B (0%) Total Size: 1.71 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.
I've given this a smoke test and all the scenarios are working well for me. I tested with a blank block theme so there were no theme presets that could influence the settings.
appearanceTools
enabled in theme.json: title is "Border & Shadow" ✅appearanceTools
disabled in theme.json: the border panel doesn't show ✅- Setting
shadow.defaultPresets
to false: title is "Border" ✅ - Setting
shadow.defaultPresets
to true but disabling all border controls: title is "Shadow" ✅
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.
Code changes are looking good to me so I think this is ready to bring in 👍
I just cherry-picked this PR to the cherry-pick-wp-6-5-beta-3 branch to get it included in the next release: 65a8496 |
What?
This fixes #58907
As suggested in this comment label of the panel is set based on the controls available/enabled
Following are the scenarios:
Testing Instructions
Test the below mentioned scenarios both in global styles and block settings (of image or button).
Test: border ✅, shadow ✅
Enable appearanceTools in
theme.json
. Both should be enabled.Test: border ✅ , shadow ❌
Test: border ❌ , shadow ✅
Test: border ❌ , shadow ❌
Note: even if appearanceTools is off, when theme defines shadows, shadows UI appears to show theme defined shadows. This now becomes scenario 3.