-
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
JSON Schema Reorganization and Fixes #63591
Conversation
Flaky tests detected in b313e3b. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/9950837869
|
1666bcd
to
6825d36
Compare
6825d36
to
63edffd
Compare
2e71248
to
6eab11f
Compare
ea61881
to
2ac04ea
Compare
6eab11f
to
8e826e7
Compare
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 If 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. |
@@ -39,14 +39,14 @@ Setting that enables the following UI tools: | |||
|
|||
--- | |||
|
|||
### useRootPaddingAwareAlignments |
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.
useRootPaddingAwareAlignments
is removed in this PR, but returned in #63639. I wanted to keep the codegen changes in a separate PR, but the existing codegen didn't support the refactored structure which is why it is missing here.
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.
Do all of the properties seem like they're in an intuitive order that makes sense?
Yeah, alphabetising them makes sense to me, and is as good as any other approach I can think of!
Is the JSON file readable? Would you more easily be able to figure out where to add a new property if you need to?
Yeah, it looks clear to me.
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.
Thanks for the cleanup!
Here are some things I noticed, but they're very minor and may not need any action.
If the description
field has highest priority in sorting, would it be better to move these fields as well?
gutenberg/schemas/json/font-collection.json
Line 133 in d22658b
"description": "Array of category slugs.", |
gutenberg/schemas/json/theme.json
Lines 2582 to 2600 in d22658b
"title": { | |
"type": "string", | |
"description": "Title of the global styles variation. If not defined, the file name will be used." | |
}, | |
"slug": { | |
"type": "string", | |
"description": "Slug of the global styles variation. If not defined, the kebab-case title will be used." | |
}, | |
"description": { | |
"type": "string", | |
"description": "Description of the global styles variation." | |
}, | |
"blockTypes": { | |
"type": "array", | |
"description": "List of block types that can use the block style variation this theme.json file represents.", | |
"items": { | |
"type": "string" | |
} | |
}, |
Do these need type:string
?
gutenberg/schemas/json/wp-env.json
Line 69 in d22658b
"enum": [ |
gutenberg/schemas/json/theme.json
Line 814 in d22658b
"enum": [ |
gutenberg/schemas/json/theme.json
Line 1683 in d22658b
"enum": [ |
gutenberg/schemas/json/theme.json
Line 1733 in d22658b
"enum": [ |
Is this type:object
unnecessary?
gutenberg/schemas/json/wp-env.json
Line 96 in d22658b
"type": "object", |
7f1a9f1
to
5fce792
Compare
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.
LGTM! To ship this PR, we need to merge #63583 first, right?
Yeah, looks like I missed some. I did a search through the project for the regex I also did a similar search for
All Do you have an opinion on that? I can see it either way.
No, but I should have moved it alongside One of my goals with the refactoring was to make sure that all instances of |
bf6403a
to
221349d
Compare
221349d
to
e5ed758
Compare
Co-authored-by: Aki Hamano <54422211+t-hamano@users.noreply.github.com>
This reverts commit 5363d8365c6c21f0e50b28e877adff8b072de5ca.
e5ed758
to
2546af7
Compare
* trunk: (2604 commits) Update "Versions in WordPress" page (#63869) SelectControl: Fix hover/focus color in wp-admin (#63855) Add margin-bottom lint rules for RangeControl (#63821) JSON Schema Docgen Rework (#63868) JSON Schema Reorganization and Fixes (#63591) DataForm: Add a simple story for the DataForm component (#63840) Quick Edit: Support bulk selection (#63841) Update dataviews docs (#63860) Bump the github-actions group across 1 directory with 4 updates (#63808) Add unit tests for the gutenberg_render_block_core_post_title() function. Make hover block outlines not present in Distraction Free (#63819) DataViews: Rename the header property of fields to label (#63843) Fix: Error while Calling edit-site getCurrentTemplateTemplateParts selector (#63818) Revert "Update HeightControl component to label inputs" (#63839) Zoom out: hide vertical toolbar when block is not full width (#63650) Latest comments: Add color block support (#63419) Core Data: Remove leftover 'todo' comment (#63842) Tabs: keep full opacity of focus ring on disabled tabs (#63754) Fix selected row styles in table layout (#63811) Align checkbox, radio, and toggle input design (#63490) ...
What?
Post-update code organization for JSON schema.
JSON structure changes:
useRootPaddingAwareAlignments
property.fontFace
items.settingsProperties
alphabetically.properties
has"type": "object"
.propertyNames
has"type": "object"
.stylesProperties
.Fixes:
textAlign
andtextColumns
.#/definitions/stylesElementsPseudoSelectorsProperties
Why?
Follow-up to #62462 to fix some things found while working on it.
How?
See the commits for details.
Testing Instructions
Check that the new docs and new schema look correct.
Do all of the properties seem like they're in an intuitive order that makes sense?
Is the JSON file readable? Would you more easily be able to figure out where to add a new property if you need to?
Testing Instructions for Keyboard
N/A
Screenshots or screencast
N/A