-
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
Font Library: simplify font collection schema #58574
Conversation
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.
See comments for a couple of nitpicks.
It looks like the font_family_settings
description also needs to be updated. It says "Font family settings similar to theme.json but without fontFace key.", and that's no longer correct.
Otherwise looks good
- ✅ schema is valid
- ✅ Google fonts collection is valid against the schema
- ✅ properties from theme.json match here with correct types and descriptions
Co-authored-by: Grant Kinney <[email protected]>
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core SVNIf you're a Core Committer, use this list when committing to
GitHub Merge commitsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
I pushed a couple of small updates, the main one being the font_family_settings
description. This looks good to go!
What?
Simplify the
font-collection.json
schema.Why?
After removing the not needed
preview
key from thetheme.json
schema, we added some complexity to thefont-collection.json
schema that was revealed as unnecessary and promoting more complex code down the line, so in this PR, we are reverting part of the complexity added.How?
Simplify the
font-collection.json
schema to make it look liketheme.json
font families but with thepreview
key.Testing Instructions
Create a JSON file in vscode or other editor with JSON Schema validation and autocomplete.
Add this content to the file:
You should not see any validation error.
If you add keys not present in the schema you should see validation errors.