Skip to content
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: Update font collection json schema #58413

Merged
merged 2 commits into from
Jan 30, 2024

Conversation

matiasbenedetto
Copy link
Contributor

@matiasbenedetto matiasbenedetto commented Jan 29, 2024

What?

Update font collection JSON schema.

Why?

To accommodate the changes added in:

How?

Updating the schema.

Testing Instructions

  • Create a JSON file with this content.
  • Open this file in an editor like VS code, you should not see any validation errors. Apart from that, you should have autocomplete properties utility and error highlighting working.
{
    "$schema": "https://raw.githubusercontent.com/WordPress/gutenberg/c637a411be0b6a73d5f73260cc4b83e6e27cb65e/schemas/json/font-collection.json",
    "name": "My Font Collection",
    "slug": "my-font-collection",
    "description": "A collection of my favorite fonts",
    "categories": [
        {
            "name": "sans-serif",
            "slug": "sans-serif"
        }
    ],
    "font_families": [
        {
            "preview": "https://example.com/preview.png",
            "font_family_settings": {
                "fontFamily": "Arial",
                "name": "Arial",
                "slug": "arial"
            },
            "categories": [
                "sans-serif"
            ],
            "font_faces": [
                {
                    "preview": "https://example.com/preview.png",
                    "font_face_settings": {
                        "fontFamily": "Arial",
                        "src": "https://example.com/arial.woff",
                        "fontWeight": "normal",
                        "fontStyle": "normal"
                    }
                }
            ]
        }
    ]
}

@matiasbenedetto matiasbenedetto added [Type] Enhancement A suggestion for improvement. [Type] Code Quality Issues or PRs that relate to code quality and removed [Type] Enhancement A suggestion for improvement. labels Jan 29, 2024
Copy link
Member

@mikachan mikachan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This LGTM 🎉

I created a JSON file with the provided test content and opened the file in VS Code.

  • Did not see any validation errors ✅
  • Autocomplete works as expected ✅
  • Error highlighting works as expected ✅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Font Library [Type] Code Quality Issues or PRs that relate to code quality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants