-
Notifications
You must be signed in to change notification settings - Fork 6
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
Should support tabbed custom types #11
Comments
Hi @seanlail, thanks for the detailed bug report. This is actually the expected behavior; Prismic's Rest API does not separate fields in different tabs in the API response. Tabs are only used in the editing interface. Because the API "flattens" tabs into one What we could do, however, is add the tab name in the generated TSDoc comment. Do you think this would be helpful? It could look like this: /**
* main_title field in *Tabbed Page*
*
* - **Field Type**: Title
* - **Placeholder**: *None*
* - **Tab**: Main
* - **API ID Path**: tabbed_page.main_title
* - **Documentation**: https://prismic.io/docs/core-concepts/rich-text-title
*
*/ Note the new |
I didn't know this - completely agree and this makes sense then. If it's easy to implement then the tab in the TSDoc comment could be good - I guess it's not a huge requirement though as it won't make using tabs easier... but as you explained, this is how the API works anyway. |
Fantastic. Thanks @angeloashmore |
Again, I love this repo! I'm using it and finding it excellent.
I just found this issue and I'm not sure how to fix it.
If I have tabbed sections in a custom type the type generated does not know about this and all the fields are collapsed in to 1 type.
Versions
Reproduction
Custom Type
Screenshots
Steps to reproduce
What is expected?
Types are generated with "Main" and "Tab" fields separated.
What is actually happening?
Generated type actually looks like this
The text was updated successfully, but these errors were encountered: