-
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
Global Styles: Add support for Google Fonts #54468
Comments
Technical Details
Relevant Links
NotesI'll try and draft a WIP PR of what implementation might look like. The biggest uncertainty is the current status of the global styles sidebar UI. |
More ContextThere's been a hiccup! It turns out that I was mistaken about the extensibility of global styles.
Next StepsRight now, to add google fonts to the site editor, all we'd need to do is update the |
I've separated adding google fonts support to dotcom simple sites into two separate phab diffs for readability -- one for site editor changes D65114-code, and one for frontend changes D65115-code. Both are ready for preliminary code review (will update testing notes tomorrow morning) |
@jeyip Have you thought about how we will deploy these changes to Atomic sites, as well, and how we'll keep the Simple and Atomic implementations in sync? I think its best if we figure this out before committing anything to wpcom (though I appreciate having the diffs to start testing). |
@creativecoder I haven't given those ideas as much attention, but that's a great question. I've been focused on making sure the extension points that we're hooking into work as expected. I've had two approaches floating around in my head, which I assumed were interchangeable (although I haven't verified). Feel free to correct me if either of these don't actually work, if they're too simplistic, or if there are other alternatives. Update Dotcom simple codebase + wpcomshPros
Cons
Update Editing Toolkit PluginPros
Cons
I've ruled out Jetpack because, from my understanding, this is a dotcom specific feature we're implementing. |
@creativecoder friendly ping to see if you have further thoughts about my suggestions. Also wondering if others have thoughts about the best way to make google fonts support available to simple + atomic sites @Addison-Stavlo, @mattwiebe ( see link ). I'm currently leaning towards using the Editing Toolkit Plugin. |
That seems like a good way to go about it. I wonder if its better to go ETK or Jetpack for this? 🤔 |
Update Editing Toolkit Plugin @jeyip The main problem adding new features to ETK is that about 38% of Atomic sites still don't have the plugin active (probably because they were created before it was released), so those users never see the feature. Enhanced fonts seem like a basic feature that most users expect to be available, so this seems like a major problem to me. Another proposal I've seen recently, is to develop a package in Jetpack, and add it as a dependency of wpcomsh (p9o2xV-1um-p2). That seems worth investigating. Adding a package dependency to wpcomsh is trivial, so I think the main question is how wpcom can run such a package (preferably with out manually copying and pasting the code, of course).
@Addison-Stavlo you bring up a great point, which is that we shouldn't assume this isn't a fit for Jetpack. I think we should inquire about this as the next step in figuring out where to put this code. |
WordPress.com has its own composer.json file for Jetpack packages being utilized on there. Crew can add it there. We update it whenever we're shipping new Jetpack versions, but can explore process if needed. A Jetpack-developed package is definitely an option. Another would be to include it in Jetpack itself as an experimental block (like the other wp.com-only blocks). In any event, the Jetpack monorepo sounds like a fine place for this. |
Status UpdateI'm pausing work on google fonts to focus on the remaining FSE beta release blockers. https://github.com/Automattic/wp-calypso/milestone/359. I plan to return to this in the near future when the blockers are resolved, and will update this issue accordingly when things change. @Copons @vindl @creativecoder |
Upcoming Core change which should make this a bit easier: https://make.wordpress.org/core/2021/09/28/implementing-a-webfonts-api-in-wordpress-core/ |
Moving this out of |
PR at Gutenberg: WordPress/gutenberg#36394 |
|
The “Simplified” Webfonts API has been merged (WordPress/gutenberg#37140). We'll proceed with Automattic/jetpack#23045 to bring Google fonts support to WP.com sites, (which can start working once the feature is available from Gutenberg). |
As we have released Google Fonts to simple and atomic, I am closing this issue. A big "Congrats!" and "Thank You!" to everyone involved! 🥳 🎉 🚀 Remaining issue with some universal themes conflicts will be tracked here - [Bug]: Google fonts not appearing in Global Styles for some Dotcom Sites |
Description
We'd like to make google fonts available as selectable font families in the global styles site editor experience. The legacy dotcom FSE feature, as seen below, is a good example of this.
In Progress
Closed (Not Merged)
Done
Notes
Todos
The text was updated successfully, but these errors were encountered: