Skip to content

feat: expose footer as a layout-replaceable slot#257

Merged
arbrandes merged 1 commit intoopenedx:mainfrom
arbrandes:arbrandes/footer-replacement
May 3, 2026
Merged

feat: expose footer as a layout-replaceable slot#257
arbrandes merged 1 commit intoopenedx:mainfrom
arbrandes:arbrandes/footer-replacement

Conversation

@arbrandes
Copy link
Copy Markdown
Contributor

Description

The footer in frontend-base did not have a full-replacement seam analogous to what the header already exposes, which is what issue #256 documents. This change moves the inline footer composition (the <footer> element, the column layout, and <PoweredBy>) out of Footer.tsx into a new DesktopFooterLayout widget, registered as the default widget for a new top-level slot, org.openedx.frontend.slot.footer.desktop.v1. Footer.tsx collapses to a single <Slot>, mirroring Header.tsx.

After this change, replacing the whole footer is symmetric with replacing the whole header: a WidgetOperationTypes.REPLACE against org.openedx.frontend.widget.footer.desktopLayout.v1, or a LayoutOperationTypes.REPLACE against org.openedx.frontend.slot.footer.desktop.v1. The change is purely additive: every existing inner slot id and default widget id is preserved verbatim, so plugins targeting desktopCenterLinks.v1, the column sub-slots, desktopTop.v1, and the rest keep working without modification. The DOM tree for default deployments is identical aside from one extra <Slot> rendering pass.

ADR 0016 documents the pattern (top-level shell regions are bare <Slot> shells; default composition lives in a layout widget) and references ADRs 0009 and 0011 as adjacent contracts. Three tests cover the default render and both replacement seams.

Closes #256

LLM usage notice

Built with assistance from Claude.

Move the inline footer composition (the <footer> element, the column
layout, and PoweredBy) out of Footer.tsx into a new DesktopFooterLayout
widget registered as the default for a new top-level slot,
org.openedx.frontend.slot.footer.desktop.v1.  Footer.tsx collapses to a
single <Slot>, mirroring Header.tsx.

Replacing the entire footer is now symmetric with replacing the entire
header: a WidgetOperationTypes.REPLACE against the layout widget id, or a
LayoutOperationTypes.REPLACE against the slot id.  All existing inner
slot ids and default widget ids are preserved, so plugins targeting them
keep working unchanged.

Adds ADR 0016 documenting the pattern and three tests covering the
default render plus both replacement seams.

Refs openedx#256

Co-Authored-By: Claude <noreply@anthropic.com>
@arbrandes arbrandes force-pushed the arbrandes/footer-replacement branch from 7a0b5cf to a517f39 Compare May 3, 2026 21:42
@arbrandes arbrandes merged commit a517f39 into openedx:main May 3, 2026
5 checks passed
@arbrandes arbrandes deleted the arbrandes/footer-replacement branch May 3, 2026 23:03
@openedx-semantic-release-bot
Copy link
Copy Markdown

🎉 This PR is included in version 1.0.0-alpha.44 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer lacks a full-replacement seam

2 participants