-
Notifications
You must be signed in to change notification settings - Fork 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
Fix CoBlocks fonts issue for simple sites #72679
Conversation
CoBlocks typography support is adding an extra style rule to blocks when using setting fonts. This causes a block validation error. This change removes the filter that does that - we disable typography support anyway.
This PR does not affect the size of JS and CSS bundles shipped to the user's browser. Generated by performance advisor bot at iscalypsofastyet.com. |
This PR modifies the release build for wpcom-block-editor To test your changes on WordPress.com, run To deploy your changes after merging, see the documentation: PCYsg-l4k-p2 |
I still got the error, not sure if I'm missing any testing step but I made sure to follow all the instructions. I also checked that my sandbox was serving the Screen.Recording.2023-01-31.at.12.07.03.mov |
It looks like I misunderstood |
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.
Works as expected now for both new and existing posts.
Deployed r260549-wpcom |
CoBlocks typography support is adding an extra style rule to blocks when using setting fonts. This causes a block validation error.
This change removes the filter that does that - we disable typography support anyway.
Proposed Changes
Don't allow the CoBlocks font settings filter to run on simple sites. We don't display the font controls but the filter that process them still runs. This filter was causing an 'unexpected or invalid content' block error when pasting blocks with custom fonts (or inserting patterns with the same)
Note that this does not fix the problem for atomic sites. Atomic sites use the latest upstream versions of CoBlocks which aren't possible to do surgical fixes on, since the filter is bundled into a megafilter. An issue has been opened upstream to fix the root problem.
Testing Instructions
wpcom_is_site_eligible_for_coblocks
return true in your sandbox)Ensure you test pasting the content into a brand new post, and when editing an existing post.
Pre-merge Checklist
Related to #72261 & pekYwv-mT-p2#comment-301