-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Search Block: Add border radius support using skip serialization feature #30227
Search Block: Add border radius support using skip serialization feature #30227
Conversation
Size Change: +4.93 kB (0%) Total Size: 1.42 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.
This tests well for me in the editor and frontend, with each of the button position options. Tested in Twenty Twenty One, Blank Canvas. I'm a bit new to the block support discussion but took a read through and this approach looks consistent per #28913. Lgtm!
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.
Looking good, and working well in my testing! 👍
Thanks!
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.
Tests well according to instructions
- In the inspector panel, drag the border radius slider and confirm the block updates as expected ✅
- Update the radius via the input field and confirm that change is reflected ✅
- Confirm the border radius reset button works ✅
- Try setting various border radius values with different layout options selected e.g. button inside, no button etc. ✅
- Switch the block to position the button inside and set a non-zero border radius ✅
Open dev tools and confirm:
- Inner input and button have the border radius you set ✅
- The inner wrapper has an adjust border radius (the radius set + default padding i.e. 4px) ✅
- Save post and confirm border radius displays correctly on frontend ✅
Description
Opts into border radius block support for the Search block.
The changes also include using the new
__experimentalSkipSerialization
block support feature. This allows finer grained control over where and how the border radius values are applied.In the Search block's specific use case, we can adjust the inner wrapper's border radius so that it remains visually consistent with the radii of the input and button when the button is placed inside it.
For comparison purposes this has been created in a separate PR so it is easier to compare with the previous approach (#27664) and evaluate how the new
__experimentalSkipSerialization
affected this use case.How has this been tested?
Manually.
Setup
settings.defaults.border.customRadius
by setting it to true.Testing Instructions
Screenshots
Types of changes
New feature. Enhancement.
Checklist: