-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Issue: Content type actions generate half-functioning block
fields.
#808
Comments
Thanks for opening an issue for this. Some enhancements are required to support more "complicated" structures. |
@theinfinit I have added support for your sample in the latest beta. The above example should now generate a new field group: {
"frontMatter.taxonomy.fieldGroups": [
{
"id": "actions_group",
"fields": [
{
"title": "text",
"name": "text",
"type": "string"
},
{
"title": "link",
"name": "link",
"type": "string"
},
{
"title": "icon",
"name": "icon",
"type": "string"
},
{
"title": "variant",
"name": "variant",
"type": "string"
}
]
}
]
} And map this group in for the {
"title": "actions",
"name": "actions",
"type": "block",
"fieldGroup": [
"actions_group"
]
} This allows you to change the values from the UI: |
Thank you Elio for the fast response! I appreciate your dedication. I tested your example with The only thing that is bothering me, is the added Why? Also, for more complex cases, and easier integration with existing websites, the ability to rename the What do you think? |
The We can look into removing this property when only one group is defined. For that we best create a new issue to track its progress. |
That will be great. It is pretty common case, that discriminator is not used for arrays of objects of the same type. |
Describe the bug
I have used the Content type action "Add missing fields" to generate missing fields based on the frontmatter.
It generated structure that is using
block
type withfields
instead offieldGroup
as described in the documentation. And it is almost working.The generated structure is actually great, and what I would expect. Defining working structures like this without
fieldGroup
property will be really handy, as it is often unnecessary for creation of working frontmatter schema.To Reproduce
Steps to reproduce the behavior:
Expected behavior
It's expected for "Content type actions" to generate valid, working fields. Additionally, editing and adding new records while using
fields
withblock
will be valuable addition.Screenshots
As you can see, each object is properly recognized and swapped, so it seems like any kind of discriminator (like
fieldGroup
) is not necessary for Front Matter CMS to recognize and handle the objects correctly. But addition is for sure more complex :)front-matter-block-with-fields.mp4
Desktop (please complete the following information):
v10.2.9129636
Additional context: Generated part of the config
The text was updated successfully, but these errors were encountered: