-
Notifications
You must be signed in to change notification settings - Fork 797
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
Subscriptions Block: Update subscriptions block to handle CSS unit font sizes #18936
Subscriptions Block: Update subscriptions block to handle CSS unit font sizes #18936
Conversation
Due to Gutenberg updating its FontSizePicker and theme.json to handle CSS units, those values are now strings which were incompatible with the approach in the subscriptions block shortcode for custom font sizes.
Caution: This PR has changes that must be merged to WordPress.com |
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 🤖 If you are an automattician, once your PR is ready for review add the "[Status] Needs Team review" label and ask someone from your team review the code. jetpack plugin:
|
@aaronrobertshaw this is testing okay for me in the editor, however the custom font size doesn't appear to be showing up on the front end of the site for me (it always renders at the one size, irrespective of the setting I've used in the editor). Is it working for you? It's possible I might be missing a step in my testing setup! (Testing synced to wpcom) With Barnsbury theme activated
With Twenty Twenty One activatedWith Twenty Twenty One, the width of the text field and the background of the submit button don't appear to be rendering correctly on the front end either (but that doesn't appear to be caused by this change). I believe I encountered the same issue as the one you raised in: #18809 (comment) so not related to this PR per se.
|
Thanks for the review @andrewserong!
Sounds like you are testing by using the a8c-wp-env sync to your sandbox? Unfortunately, that sync doesn't the subscription block's I've updated the PR's test instructions. It is also testing correctly for me on the frontend with that sync'ing issue accounted for.
Yep, there are a few quirks about this block in terms of styles/layout. I think it would be good to revisit this block after #18809 and this PR land. Then via a new issue we can find a solution that takes into account both the custom button widths and font sizes. |
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.
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.
Working well for me!
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.
Tested well for me. Block was correctly migrated and everything worked as expected. Looks good to go.
…es (#18936) Due to Gutenberg updating its FontSizePicker and theme.json to handle CSS units, those values are now strings which were incompatible with the approach in the subscriptions block shortcode for custom font sizes.
Cherry-picked to |
r222019-wpcom |
Fixes #18250
Changes proposed in this Pull Request:
Jetpack product discussion
Does this pull request change what data or activity we track or use?
No changes.
Testing instructions:
Note if syncing to wpcom via a8c-wp-env you'll need to manually sync the
views.php
file to the correct location. One easy way to do this would be to copy the sync'd file to the different location and name the file exists under on wpcom.cp ~/public_html/wp-content/mu-plugins/jetpack/modules/subscriptions/views.php ~/public_html/wp-content/mu-plugins/widgets/blog-subscription.php
Screenshots
Proposed changelog entry for your changes: