We use React contexts for diffent stuffs, like theming, and Layouts are the page root and the perfect place to add context providers to share data across features.
The problem comes when Layouts needs to know some config (maybe for a specific page or feature pack rendered for that page) ahead of time, they need to be parameterized with custom fields like features do.
Hi Raul, we have reviewed this idea with the team again and decided not to implement due to the complexity this will bring in the triaging issues when arises.
There are currently two paths we allow developers to do what you are trying to do:
You can use metadata or,
Create custom layouts with correct names and use the appropriate layout for your page/template.
We're going to reach out directly to better understand this use case.
In my case, I need a theme per feature-pack, we need to manage themes at feature-pack level because we have several subteams working on diferent feature packs, and the have their own theming needs, and sharing the same theme is gonna be a mess. I know it's maybe a design issue, and that a brand should have a uniform theming, but shit happens, and parameterizing Layouts could be good to avoid layouts build for specific situations.