-
Notifications
You must be signed in to change notification settings - Fork 360
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/migrate blockbase font self hosted #6123
Conversation
This reverts commit 24dd5c1.
This reverts commit 8a0935f.
Depends on https://core.trac.wordpress.org/ticket/55752 being fixed
Hey my mistake. This totally fell off my radar. Taking a look later today |
TestingRequirementsGutenberg
I think I'm seeing another bug though. On a completely fresh WordPress instance:
The global styles "Post Title" block font family, however, does work as expected. |
I'm pushing a change that includes refactoring all of the child themes in this repository to use the new font definition so that if there are no customizations the migration will not be necessary. And also taken the opportunity to evaluate all of the child themes to ensure that the fonts look the same before and after this change. |
I'll test this again tomorrow. I wonder if there's something specific to my environment 🤔 . To set expectations, I've been super busy onboarding a new hire and with new team priorities ( we just switched gears and are being redirected to a new project ). Would the themes team be able to help code review this PR? I won't be able to get back to this as often as I'd like, and I wouldn't want the momentum on these code changes to stall. |
Thanks for the heads up @jeyip and your willingness to help amongst your busy schedule! We've had some eyes on this but it's so big it's hard to give a ✅ . We've done some testing with this branch merged with the other Blockbase 3 issues all bundled together and we're looking at that pretty hard. Hopefully anything will shake out there if nothing else. |
Couldn't get to testing today, but it's the first thing I'll do Monday morning |
Refactor/blockbase color admin (#6043) Moved templates from old folder location to new (#6073) Blockbase: Implement the Button elements API (#6041) Blockbase: Implement Comment Block and removed CSS (#6080) Fix/migrate blockbase font self hosted (#6123) Blockbase children: update comments block (#6153) Blockbase: Changed the trigger to render social icons (#6079) Blockbase: move button padding styles from ponyfill to theme.json (#5901) Co-authored-by: Grant Kinney <[email protected]> Co-authored-by: Jeremy Yip <[email protected]> Co-authored-by: MaggieCabrera <[email protected]> Co-authored-by: madhusudhand <[email protected]>
Closing: Work merged in #6167 |
This branch continues on from the custom Jetpack Font Management implementation previously created in Blockbase and moves that to instead leverage fonts that are provided locally by the theme.
The goal is that this works both WITH and WITHOUT the Gutenberg plugin activated.
When Gutenberg is activated it provides a custom Font Provider that handles compiling and enqueuing the CSS.
When Gutenberg is NOT activated that action is done manually.
All of the fonts definitions are kept in Blockbase's theme.json file. This is so font selection in the FSE can still work without Gutenberg.
The process attempts to migrate any font settings made via the customizer, or from an activated child theme that hasn't transitioned, to storing the font opinion as block styles. Additionally the Blockbase font definitions are copied to the user space for child themes that haven't transitioned.
Only (and all) those fonts that are USED (assigned via theme.json files for via Global Styles) should have the font-face styles enqueued. All font faces should be enqueued in the FSE.
Testing:
Before:
After: