-
Notifications
You must be signed in to change notification settings - Fork 582
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
Headless Pages #2621
base: next
Are you sure you want to change the base?
Headless Pages #2621
Conversation
# Conflicts: # packages/app-headless-cms/src/HeadlessCMS.tsx
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 left some comments which we can discuss. I didn't comment on all the export default
, but try to avoid those.
...ages/app-headless-cms/src/modules/pageTemplates/views/editor/EditorPlugins/SidebarPlugin.tsx
Outdated
Show resolved
Hide resolved
packages/app-headless-cms/src/modules/pageTemplates/views/editor/EditorPlugins/index.tsx
Outdated
Show resolved
Hide resolved
packages/app-headless-cms/src/modules/pageTemplates/views/editor/ModelFieldPlugins.tsx
Outdated
Show resolved
Hide resolved
} | ||
}) | ||
}, | ||
tags: ["content-model", ...(model.tags || [])] |
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.
Tag here is content-model
and I saw in some other places type:contentModel
. I assume the difference is due to one being model and other a field...? Maybe use the camel case in both cases?
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.
Yeah good catch. That content-model
is a left-over. Tags will be pulled in from model.tags
exclusively, so I'll remove this.
Changes
This PR introduces tagging of content models and model fields, and adds a "page template" list view. This serves as a starting point to develop a dedicated "Page Template Editor" and Headless Pages functionality. Since page templates are still content models at its core, tags are the simplest way to differentiate between various types of content models.
From the API perspective, we're still using the same
listContentModels
query, but we're filtering models on the client side, to render type specific UI. However, from the GraphQL schema standpoint, all models are processed the same way, and their respective schemas are generated using the same underlying logic.I'll use this PR as an umbrella PR for all further tasks.