File tree Expand file tree Collapse file tree 8 files changed +7372
-4930
lines changed
discussions/discussions-home Expand file tree Collapse file tree 8 files changed +7372
-4930
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,12 @@ Cloning and Startup
5252
5353The dev server is running at `http://localhost:2002 <http://localhost:2002 >`_.
5454
55+ Plugins
56+ =======
57+ This MFE can be customized using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework >`_.
58+
59+ The parts of this MFE that can be customized in that manner are documented `here </src/plugin-slots >`_.
60+
5561Getting Help
5662============
5763Please tag **@openedx/edx-infinity ** on any PRs or issues. Thanks.
Original file line number Diff line number Diff line change 3434 },
3535 "dependencies" : {
3636 "@edx/brand" : " npm:@openedx/brand-openedx@^1.2.2" ,
37- "@edx/frontend-component-footer" : " ^13.0.2 " ,
37+ "@edx/frontend-component-footer" : " ^13.2.0 " ,
3838 "@edx/frontend-component-header" : " ^5.0.2" ,
3939 "@edx/frontend-platform" : " ^7.1.0" ,
4040 "@edx/openedx-atlas" : " ^0.6.0" ,
41+ "@openedx/frontend-plugin-framework" : " ^1.1.2" ,
4142 "@openedx/paragon" : " ^22.1.1" ,
4243 "@reduxjs/toolkit" : " 1.9.7" ,
4344 "@tinymce/tinymce-react" : " 3.13.1" ,
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ import { selectPostEditorVisible } from '../posts/data/selectors';
2727import { isCourseStatusValid } from '../utils' ;
2828import useFeedbackWrapper from './FeedbackWrapper' ;
2929
30- const Footer = lazy ( ( ) => import ( '@edx/frontend-component-footer' ) ) ;
30+ const FooterSlot = lazy ( ( ) => import ( '@edx/frontend-component-footer' ) . then ( module => ( { default : module . FooterSlot } ) ) ) ;
3131const PostActionsBar = lazy ( ( ) => import ( '../posts/post-actions-bar/PostActionsBar' ) ) ;
3232const CourseTabsNavigation = lazy ( ( ) => import ( '../../components/NavigationBar/CourseTabsNavigation' ) ) ;
3333const LegacyBreadcrumbMenu = lazy ( ( ) => import ( '../navigation/breadcrumb-menu/LegacyBreadcrumbMenu' ) ) ;
@@ -175,7 +175,7 @@ const DiscussionsHome = () => {
175175 ) }
176176 { ! enableInContextSidebar && isEnrolled && ( < DiscussionsProductTour /> ) }
177177 </ main >
178- { ! enableInContextSidebar && < Footer /> }
178+ { ! enableInContextSidebar && < FooterSlot /> }
179179 </ DiscussionContext . Provider >
180180 </ Suspense >
181181 ) ;
Original file line number Diff line number Diff line change 1+ # Footer Slot
2+
3+ ### Slot ID: ` footer_slot `
4+
5+ ## Description
6+
7+ This slot is used to replace/modify/hide the footer.
8+
9+ The implementation of the ` FooterSlot ` component lives in [ the ` frontend-component-footer ` repository] ( https://github.com/openedx/frontend-component-footer/tree/master/src/components/footer-slot ) .
10+
11+ ## Example
12+
13+ The following ` env.config.jsx ` will replace the default footer.
14+
15+ ![ Screenshot of Default Footer] ( ./images/default_footer.png )
16+
17+ with a simple custom footer
18+
19+ ![ Screenshot of Custom Footer] ( ./images/custom_footer.png )
20+
21+ ``` js
22+ import { DIRECT_PLUGIN , PLUGIN_OPERATIONS } from ' @openedx/frontend-plugin-framework' ;
23+
24+ const config = {
25+ pluginSlots: {
26+ footer_slot: {
27+ plugins: [
28+ {
29+ // Hide the default footer
30+ op: PLUGIN_OPERATIONS .Hide ,
31+ widgetId: ' default_contents' ,
32+ },
33+ {
34+ // Insert a custom footer
35+ op: PLUGIN_OPERATIONS .Insert ,
36+ widget: {
37+ id: ' custom_footer' ,
38+ type: DIRECT_PLUGIN ,
39+ RenderWidget : () => (
40+ < h1 style= {{textAlign: ' center' }}> 🦶< / h1>
41+ ),
42+ },
43+ },
44+ ]
45+ }
46+ },
47+ }
48+
49+ export default config ;
50+ ```
Original file line number Diff line number Diff line change 1+ # ` frontend-app-discussions ` Plugin Slots
2+
3+ * [ ` footer_slot ` ] ( ./FooterSlot/ )
You can’t perform that action at this time.
0 commit comments