-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: Block object attributes may have custom types with subfields #223
base: main
Are you sure you want to change the base?
Conversation
🦋 Changeset detectedLatest commit: cb7bbe9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
754cc0a
to
cb7bbe9
Compare
Some of the public docs are indeed a mess. ICYMI here's the docs for block.json metadata and attributes. If there's something specific you're trying to verify I'm happy to help try and dig it out of the source code. |
Hey @mrclay thanks for the PR. I read the docs and it mentions:
Do we need to check with |
I think defining properties without a source is just undefined in WP and we should get their team to bless and document this approach before moving forward. This PR would add API surface area that may conflict with some other approach they choose in the future. |
Hey @mrclay. Thank you for the PR. Before we review it we require a CLA agreement from you: Contributor License AgreementAll external contributors to WP Engine products must have a signed Contributor License Agreement (CLA) in place before the contribution may be accepted into any WP Engine codebase.
|
If a block attribute has a "properties" key, the attribute now has a custom type with typed subfields.
Fixes #222
Obviously a big concern here is that, to my knowledge, WP haven't documented how object attribute properties should be documented in block.json. "properties" was chosen by convention in JSONSchema.