Financial-Times / dotcom-page-kit

📰 Page Kit provides a high quality, well tested, and thoroughly documented set of tools for assembling and delivering FT.com based upon the best industry standards.
https://financial-times.github.io/dotcom-page-kit/
21 stars 6 forks source link

Allow custom element for head in shell #526

Closed apaleslimghost closed 5 years ago

apaleslimghost commented 5 years ago

next-graphics-page uses Next.js, and i'm pretty sure the only way to use Shell with that would be via Next's Head tag. currently Shell uses <head>, if it were possible to replace that in Shell this integration would be simpler

for now, i'm going to use the parts of the shell that Shell includes within the Next.js custom Document

i-like-robots commented 5 years ago

for now, i'm going to use the parts of the shell that Shell includes within the Next.js custom Document

When we've tried Next.js with Page Kit before this is exactly what we did. The shell component provides a set of opinions about how to structure and bootstrap a web page but my assumption is that apps using Next.js would prefer to utilise that frameworks opinions instead.

It would be interesting to know more about this as we didn't look much beyond the shared UI components which are hopefully quite straightforward to implement within Next.js. We did not consider meta data or ads for example which the graphics page must need 🤔

i-like-robots commented 5 years ago

Something worth considering... because the graphics app is only one of the twenty apps we need to migrate any changes required to the shell or other packages in order to accommodate it will need to be balanced against the needs of the other 95%.

apaleslimghost commented 5 years ago

maybe a good middle ground would be exporting Shell's subcomponents from the package? right now i'm having to dip into dist/node/components which feels like a hack