Studio: Cannot override `seo` and `navigation` with `editor({ hidden: true })` since v3.7
Environment
x
Version
v3.7.1
Reproduction
Currently, if I try:
property(seo: z.intersection(
z.object({
title: z.string().optional(),
description: z.string().optional(),
meta: z.array(z.record(z.string(), z.any())).optional(),
link: z.array(z.record(z.string(), z.any())).optional(),
}),
z.record(z.string(), z.any()),
).optional().default({})).editor({ hidden: true }),
navigation: property(z.union([
z.boolean(),
z.object({
title: z.string(),
description: z.string(),
icon: z.string(),
}),
]).default(true)).editor({ hidden: true }),
Studio throws an error on load.
Description
Since version 3.7, it is no longer possible to override the seo and navigation attributes as documented in order to add editor({ hidden: true }). Previously, this worked without issues.
Additional context
No response
Logs
@maximepvrt is this still valid using commit release of main branch? Is this happens only inside Studio? If so could you provide a reproduction project, so I can import and test?
@farnabaz Yes, it still happens with the latest commit release from the main branch. Here’s my reproduction project: https://github.com/maximepvrt/nuxt-content-studio-error
You can also see the issue directly on Studio: https://nuxt.studio/maximepvrt/nuxt-content-studio-error/content?valueId=about.md&refId=main
Anyway, with the new property().editor({ hidden: true }) option, it would make sense to be able to hide fields without having to redefine them.