Open arbrandes opened 4 months ago
Footer Slots:
Other Slots:
We re-examined our stance on asking users that fork frontend-component-footer
to take action after this work lands, and are going instead with an approach that takes that customization path into account. From the updated description:
For each MFE supported by
tutor-mfe
, we'll give operators the option to use the Footer as a PluginSlot instead of forkingfrontend-component-footer
.To achieve this, we'll create a separate repository called
frontend-slot-footer
that provides a<FooterSlot />
implementation with<Footer />
fromfrontend-component-footer
as its default content. Relevant MFEs will then be changed to depend onfrontend-slot-footer
instead offrontend-component-footer
and replace all instances of<Footer />
with<FooterSlot />
. This way, users that forkfrontend-component-footer
for customization will not need to take any action post-merge, while others that want to try out the new slot will be able to do so transparently.
Would it make sense to just put FooterSlot in the existing footer repository, or in frontend-platform to avoid needing another repository? (I haven't thought this through completely, but figure you have)
Would it make sense to just put FooterSlot in the existing footer repository
We tried this first, but ran into issues. The options to make this possible would either be:
Footer
component includes the FooterSlot
FooterSlot
component as a named export
or in frontend-platform
Hadn't considered that.
Description
With this issue we're aiming to coordinate the following:
Standardize plugin slot name conventions
Every slot should adhere to the following conventions:
footer_slot
_slot
Standardize how slots are exposed
Instead of inserting
PluginSlot
s randomly throughout the code, they should each be implemented in their own subdirectory ofplugin-slots
, like so:The component name itself should be suffixed with
Slot
.Add clear documentation
The main README should have a section dedicated to pointing users to the README in the
src/plugin-slots
directory, whin in turn should contain a list of all slots available in the MFE in question. Each slot entry should then link to the README for each individual slot implementation, as per the directory structure below:An individual slot's README should:
Create slots as an example on every MFE supported by Tutor in Redwood
For each MFE supported by
tutor-mfe
, we'll give operators the option to use the Footer as a PluginSlot instead of forkingfrontend-component-footer
.To achieve this, we'll create a separate repository called
frontend-slot-footer
that provides a<FooterSlot />
implementation with<Footer />
fromfrontend-component-footer
as its default content. Relevant MFEs will then be changed to depend onfrontend-slot-footer
instead offrontend-component-footer
and replace all instances of<Footer />
with<FooterSlot />
. This way, users that forkfrontend-component-footer
for customization will not need to take any action post-merge, while others that want to try out the new slot will be able to do so transparently.