UNStats / gatsby-themes

Gatsby themes for @UNDataForum websites.
https://mockup.undataforum.vercel.app
5 stars 2 forks source link

Make microfrontends work separately of main site #359

Closed maiertech closed 3 years ago

maiertech commented 4 years ago

This is a way to make local development scale better when there are content collections with many items. Rather than developing against the entire site you can develop against one microfrontend.

maiertech commented 4 years ago

The issue is that the microfrontends that were implemented are not self-contained. E.g., the profiles microfrontend needs access to the allPost collection, which the blog microfrontend provides. And the blog microfrontend needs access to type Profile, which is provided by the profiles microfrontend.

To make microfrontends work, each Gatsby theme needs to be made truly independent from the other themes. E.g., gatsby-theme-blog assumes it can query profiles, which creates an implicit dependency. Or gatsby-them-profiles assumes it can query blog posts for an author, which also creates an implicit dependency.

For gatsby-theme-blog this is addresses in https://github.com/UNDataForum/gatsby-themes/issues/355.

maiertech commented 4 years ago

Since #355 failed, it is unclear whether this is still feasible. Unfortunately, profiles are very tightly coupled to blog and events.

maiertech commented 3 years ago

Decided to get rid of microfrontends. Done in #567.