diff --git a/docs/decisions/0016-shell-layout-replacement-seams.rst b/docs/decisions/0016-shell-layout-replacement-seams.rst new file mode 100644 index 00000000..fefeb6b9 --- /dev/null +++ b/docs/decisions/0016-shell-layout-replacement-seams.rst @@ -0,0 +1,107 @@ +################################### +Shell layout replacement seams +################################### + +Status +====== + +Proposed + + +Context +======= + +The shell's header and footer both compose multiple slots into a single +visible region. Operators occasionally need to swap one of these regions out +wholesale (for example, replacing the default footer with a fully custom +brand footer), without touching the dozens of inner slots that make up the +default composition. + +The header was already structured to support this. ``Header.tsx`` is a thin +shell containing only top-level slots, and the desktop and mobile layouts are +registered as default widgets on those slots in ``shell/header/app.tsx``:: + + { + slotId: 'org.openedx.frontend.slot.header.desktop.v1', + id: 'org.openedx.frontend.widget.header.desktopLayout.v1', + op: WidgetOperationTypes.APPEND, + component: DesktopLayout, + } + +Replacing the entire desktop header is a single ``WidgetOperationTypes.REPLACE`` +against ``desktopLayout.v1`` (or a ``LayoutOperationTypes.REPLACE`` against +the slot itself, depending on the operator's intent). + +The footer did not follow this pattern. ``Footer.tsx`` composed a +``