-
Notifications
You must be signed in to change notification settings - Fork 4.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
Add registered fonts to theme JSON AFTER the child and parent data has been merged. #47290
Conversation
Flaky tests detected in 4e93664. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3965739031
|
With this, I'm seeing sometimes all registered fonts are enqueued. For example, see the site: https://testsitemmrfont1.wordpress.com/ (using theme: twentytwentytwo). View source and see 24,000 lines of font css.
End result: All registered fonts are enqueued and there is no longer a distinction between registered fonts and registered+enqueued fonts. |
@mreishus thank you for reporting this. Can you please open a new issue please and reference this PR? Thank you |
Added issue #48263. I first thought it was directly related to this PR, but now I'm not so sure. I think it's more related to the |
What?
This fixes a problem noted here: Automattic/themes#6827
In short because fonts registered via Font Provider are appended to a CHILD theme's data any fonts provided by the PARENT are no longer provided.
This change appends the fonts to the theme data AFTER the parent and child data have been merged.
Testing Instructions
You will need to test with a rather specific theme scenario at the moment.
In an environment with Gutenberg plugin activated
Jetpack activated and the Google Font Provider activated
(wpcom simple sites fit this scenario)
Using this branch of Blockbase (which permist SOME but not ALL Jetpack fonts to be registered)
activate a Blockbase CHILD theme (such as Geologist).
Navigate to the Site Editor and observe the collection of fonts provided. Note that ALL of the fonts offered by Blockbase as well as ALL of the fonts provided by Jetpack are available.
This fixes the problem noted here where the original change (#6777) was rolled back.
Screenshots or screencast