-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
theme.json schema: Allow object type on style properties #45897
Merged
Merged
Changes from 10 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
ae29bde
Allow objects on color properties
mikachan d1a0d8e
Add definition for ref property
mikachan 6096487
Reduce repetition in property definitions
mikachan b914874
Move properties def to oneOf array
mikachan 7992e54
Fix $ref path
mikachan 0fd839b
Move ref def to global scope
mikachan 5974460
Apply ref type to all style properties
mikachan 1441c4e
Update docs
mikachan 73236fb
Result of docs:build script
mikachan 59e34ec
Merge branch 'trunk' into update/theme-json-schema-for-refs
mikachan b467666
Merge branch 'trunk' into update/theme-json-schema-for-refs
mikachan 679ecbc
Run docs:build to update docs
mikachan ea9eb1c
Make ref logic more specific
mikachan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
These
undefined
types are the result of runningnpm run docs:build
. It looks like these changes need to match the result of this script when run on GitHub, so I've pushed these changes for now. However, this should probably be improved, asundefined
isn't that helpful.I'll spin up a follow-up PR if I figure this out!
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.
There isn't anything special going on with the docgen—just reading in the json file and formatting a few things as markdown. So it shouldn't be too hard to update the docgen to aggregate the types in the
oneOf
list which would also fix theradius
property.Eventually it would be nice to generate the schema from a higher-level source that is more suited for docgen. There's a discussion open about that, but I'd like to see the quick fix before tackling the larger problem.
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 @ajlende, that's super helpful context!
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.
Created a PR for this here: #46375