-
Notifications
You must be signed in to change notification settings - Fork 89
Description
Describe the feature you'd like to request
We'd like to simplify the Hygraph schema by leveraging a 'Variant' system instead of separate models for rows. This is an extension of #1912
Describe the solution you'd like
With the current introduction of the Hygraph schema migration system we can start assuming the Hygraph schema exists in a certain format. We can assume the Page and DynamicRow components exist, this means that queries do not need to be in the example directory, but can be moved to a hygraph-content package or something (for now we can re-use the old graphcms-ui package).
The goal of the hygraph-content package should be: Make sure the schema is locked for the current models except for specific project specific implementations.
Asset (alt field)
DynamicRow
Page
PageLink
RowColumnOne (to be renamed to RowText)
RowLinks
Footer (to be renamed to Settings)
Components:
AND
Number
OR
Text
Enums:
DynamicRowConditionNumberOperator
DynamicRowPlacement
MetaRobots
RowLinksVariants
RowProductVariants
And assume the following Row components are 'project specific' (need to be kept in the examples directory):
RowBlogContent (to be migrated to RowText)
RowButtonLinkList (already deprecated)
RowColumnThree (to be deprecated)
RowColumnTwo (to be deprecated)
RowContentLinks (already deprecated)
RowHeroBanner (to be deprecated, replace with a variant on RowLinks)
RowQuote (to be deprecated, replace with RowText with a blockquote)
RowServiceOptions (to be deprecated, replace with a variant on RowLinks)
RowSpecialBanner (to be deprecated??)
Usps (to be deprecated??, replace with RowLinks variant?)
This of course is a way bigger project than the current implementation here, but it sets the changes that need to be made before the next major release.
After this comment we've had further discussions to simplify this even more, if we'd add an Asset field to RowLinks we could use it for even more cases.