-
-
Notifications
You must be signed in to change notification settings - Fork 555
refactor: zod poc #1724
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
base: main
Are you sure you want to change the base?
refactor: zod poc #1724
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
}) | ||
.extend({ | ||
// File name. | ||
name: z.string().default(""), |
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.
Maybe we want to do meta descriptions: https://zod.dev/metadata#meta
@@ -10,15 +10,15 @@ export const BackgroundColorExtension = Extension.create({ | |||
types: ["blockContainer", "tableCell", "tableHeader"], | |||
attributes: { | |||
backgroundColor: { | |||
default: defaultProps.backgroundColor.default, | |||
default: defaultProps.shape.backgroundColor._zod.def.defaultValue, |
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.
I don't really like reaching into what feels like an internal value for this, is there another way of doing it that is part of the public API?
This is a POC to use Zod instead of our custom schema language for block and inline content props. Let's discuss if this is a direction we want to take. If so, we should:
core
andtests
pass!createReactBlockSpec
to a Zod schemathanks @aeplay for mentioning this in your talk 😂
closes #444