Skip to content
This repository has been archived by the owner on Oct 28, 2022. It is now read-only.

Reorder property and fix validation error in json files #269

Merged
merged 2 commits into from
Oct 10, 2022
Merged

Reorder property and fix validation error in json files #269

merged 2 commits into from
Oct 10, 2022

Conversation

t-hamano
Copy link
Contributor

@t-hamano t-hamano commented Oct 8, 2022

This PR makes the following changes to the global style JSON files:

Move $schema and version to top

Related to #54, I think these two properties should be defined first.

Remove title property

Currently, the title property is not allowed in the schema, nor is it used in the site editor.
As Gutenberg issue, it has been suggested that the title be displayed in the preview, but I think that the incorrect property should be removed at this time.

Unified indentation

In the Marigold theme, tab indentation and space indentation were mixed, so they were unified into tab indentation.

Remove Incorrect style property

In the Marigold theme, the following incorrect border styles were defined:

"border": {
  "bottom": true
}

This property was removed because it doesn't accept a boolean value and doesn't appear to be applied to the style.

Remaining problems

The code editor doesn't allow the filter property, but this is a problem on the JSON schema side and I would like to submit a separate PR to Gutenberg.

filter

If you have any questions about this PR, I would be happy to answer them.

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 is great, thank you for working on it!

Move $schema and version to top

Makes sense!

Remove title property

I'd prefer to keep the title properties, as it allows us to format the variation name in Global Styles. Without this property, the file name is used in lowercase:

Screen.Recording.2022-10-09.at.06.36.24.mov

Unified indentation
Remove Incorrect style property

🙌

The code editor doesn't allow the filter property

I agree that this should be fixed upstream 👍 It looks like you already opened an issue here: WordPress/gutenberg#44442

@t-hamano
Copy link
Contributor Author

t-hamano commented Oct 9, 2022

Thank you for the review, @mikachan !

I'd prefer to keep the title properties, as it allows us to format the variation name in Global Styles. Without this property, the file name is used in lowercase:

Oh, I see that the title property was used. I have restored the title property.
I would like to submit a separate PR to Gutenberg for the issue not defined in the schema 👍

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.

Thank you, looks good to me!

@mikachan mikachan merged commit 2953298 into WordPress:trunk Oct 10, 2022
@t-hamano t-hamano deleted the fix/json-validate-error branch October 10, 2022 14:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants