-
Notifications
You must be signed in to change notification settings - Fork 800
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
Blocks: update remaining child blocks to API version v3 #40685
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. |
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.
Thank you for following up on this!
I tested each of the child blocks on Simple, WoA and self-hosted (Jurassic Ninja).
On WoA, Simple and self-hosted (both with and without Gutenberg installed and active for WoA and self-hosted), I noticed issues with the PR applied in both the Contact Info block and WhatsApp button, but only in the editor.
With the WhatsApp button, styles appear to be missing for the button:
With the Contact Info block, in both WoA and self-hosted I'm having issues adding content in the editor (the fields appear generally un-editable, and once a few are added, no new fields seem to reappear).
I saw no relevant console errors.
On Simple, I was additionally seeing block validation issues within the Recipe block both before and after the change (so, unrelated). I'll note it down anyway here:
One inner block with issues was for recipe details:
Content generated by `save` function:
<div class="wp-block-jetpack-recipe-details"><div class="wp-block-jetpack-recipe-details__detail"><p>Prep Time</p><p itemprop="prepTime" content="PT15M">15m</p></div><div class="wp-block-jetpack-recipe-details__detail"><p>Cook Time</p><p itemprop="cookTime" content="PT30M">30m</p></div><div class="wp-block-jetpack-recipe-details__detail"><p>Servings</p><p itemprop="recipeYield">4</p></div><div class="wp-block-jetpack-recipe-details__detail wp-block-jetpack-recipe-details__detail--print"></div></div>
Content retrieved from post body:
<div class="wp-block-jetpack-recipe-details"><div class="wp-block-jetpack-recipe-details__detail"><p>Prep Time</p><p itemprop="prepTime">15m</p></div><div class="wp-block-jetpack-recipe-details__detail"><p>Cook Time</p><p itemprop="cookTime">30m</p></div><div class="wp-block-jetpack-recipe-details__detail"><p>Servings</p><p itemprop="recipeYield">4</p></div><div class="wp-block-jetpack-recipe-details__detail wp-block-jetpack-recipe-details__detail--print"></div></div>
The other inner block with issues was for recipe steps:
Content generated by `save` function:
<ol itemscope itemprop="recipeInstructions" itemtype="https://schema.org/HowTo" class="wp-block-jetpack-recipe-steps"></ol>
Content retrieved from post body:
<ol itemprop="recipeInstructions" class="wp-block-jetpack-recipe-steps"></ol>
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 looked into this some more. With the Send a Message / WhatsApp button block, it looks like wrapping the returned content in a div with blockProps may solve that particular issue: <div { ...blockProps }>
For that, useBlockProps
also needs to be imported from '@wordpress/block-editor'
and then const blockProps = useBlockProps();
. Though in my testing the HTML was ever so slightly different, so may need some tweaking.
Fixes #40678
Proposed changes:
It seems that we had forgotten to update a few of our child blocks in #34120.
Other information:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
Testing instructions:
Note
add_filter( 'jetpack_blocks_variation', function () { return 'beta'; } );
) or use the option in Settings > Jetpack constants on JN. On simple sites, you will get the Beta blocks if you are proxied.