-
Notifications
You must be signed in to change notification settings - Fork 808
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
Forms: add border options to select, radio, and checkbox blocks #40866
base: trunk
Are you sure you want to change the base?
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
15aff5e
to
29fc2b8
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.
Tests 💯 . I’m not sure about the consequences of all the CSS changes in terms of backwards compatibility. @simison, what do you think? I vote for risking it—let’s merge it!
fa5179e
to
9ca3772
Compare
…ke expected across themes
1819eee
to
5394f1c
Compare
@ntsekouras What would the standard Gutenberg approach be for this? Could this take us further away from the recommended way of doing things? |
Thanks for the review @monsieur-z! I see what you mean by
This approach is a regression as to what we currently have. Will consider a different implementation. Thanks again. |
Can you take another look @monsieur-z when you have a moment. I think the issue is now fixed. |
A bit yes.. These blocks should be using |
@aaronrobertshaw can you take a look at this PR and share if it makes sense to continue, or we should wait until with any changes and proceed |
Thanks for the ping 👍
Take the following with a grain of salt as I haven't had a chance to get full context on this PR yet. My initial thoughts are that while it appears to follow what's already in place for other fields and styles, it does mean more to untangle and more to migrate in a deprecation when switching to a block supports based approach. I've spent some time today trying to get my head around the current way fields are put together and they're already pretty complex without adding more to the mix. So my gut feel is if there isn't a hurry to land this, maybe we could wait a couple of days to see what comes of explorations into refactoring the field blocks to use inner blocks. FWIW the explorations into using inner blocks seems promising so far but there are a lot of moving parts that haven't been looked into yet. If all goes to plan, I hope to have something up tomorrow that we can decide on whether its a direction we want to commit to. From there, we could use that demo PR to extrapolate the changes out to the other form fields. Here's an incredibly premature look at inner blocks for a test "name v2" field in case it helps make a call on the likelihood that we'll move towards inner blocks sooner rather than later 🤷Screen.Recording.2025-01-22.at.7.51.01.pm.mp4 |
Sounds good! Context was fixing a bug, but I'm fine waiting with this one. I don't want to complicate things and create more work. |
@aaronrobertshaw do you have a PR for the video you shared? I'm wondering if it makes sense to also convert lot's of fields to a single one with block variations. I'm curious what kind of deprecations will be needed with all these custom code.. |
@ntsekouras I'll ping you Slack for the convo about those. |
@ntsekouras Update: Collection of hacks...I mean draft here: #41281
I was headed in that direction with the exploration noted above. My plan was to get an inner-blocks-based field first alongside what's there for easier comparison. Then create block variations to match the other existing fields. The old fields can be swapped out for the new ones and deprecations created if we choose to go ahead.
Good question. As all the current fields are registered as their own block instead of block variations, it might be tricky to deprecate them to a single block type. Even if that's possible, it might still mean we'd need all the original block types still registered so they could have appropriate deprecations. To bring the discussion back to this PR, I suspect the checkbox, radio, and select fields will end up as their own blocks still. So the addition of extra classes and styles here shouldn't be a big deal if we want to get the bug fix in. |
Colors seem to be applied as expected now, both a the form and field levels. |
Fixes #39675
Proposed changes:
Editor:
Frontend
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions: