Skip to content

Commit d59e179

Browse files
bra-i-amrenovate[bot]brian-smith-tcril
authored
perf: update redwood branch with upstream (#8)
* chore(deps): update dependency glob to v10.3.15 * fix(deps): update dependency @edx/frontend-component-header to v5.3.1 * fix(deps): update dependency @edx/frontend-component-footer to v13.2.0 * fix: update footer to resolve (not so) optional peer dependency issue (openedx#1022) * feat: use frontend-plugin-framework to provide a FooterSlot (openedx#1017) * perf: add css-variables support to redwood (#6) * refactor: update package-lock * refactor: solve issues with package-lock --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Brian Smith <[email protected]>
1 parent 1e53e0e commit d59e179

File tree

8 files changed

+140
-24
lines changed

8 files changed

+140
-24
lines changed

README.rst

+6
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ Profile MFE for local development via the `devstack`_.
7171
7272
Once the dev server is up, visit http://localhost:1995/u/staff.
7373

74+
Plugins
75+
=======
76+
This MFE can be customized using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
77+
78+
The parts of this MFE that can be customized in that manner are documented `here </src/plugin-slots>`_.
79+
7480
Configuration
7581
=============
7682

package-lock.json

+77-20
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
],
3131
"dependencies": {
3232
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
33-
"@edx/frontend-component-footer": "npm:@edunext/[email protected]",
3433
"@edx/frontend-component-header": "npm:@edunext/[email protected]",
3534
"@edx/frontend-platform": "npm:@edunext/[email protected]",
3635
"@edx/openedx-atlas": "^0.6.0",
@@ -39,6 +38,7 @@
3938
"@fortawesome/free-regular-svg-icons": "6.5.2",
4039
"@fortawesome/free-solid-svg-icons": "6.5.2",
4140
"@fortawesome/react-fontawesome": "0.2.0",
41+
"@openedx/frontend-slot-footer": "^1.0.2",
4242
"@openedx/paragon": "23.0.0-alpha.1",
4343
"@pact-foundation/pact": "^11.0.2",
4444
"@redux-devtools/extension": "3.3.0",
@@ -72,7 +72,7 @@
7272
"@openedx/frontend-build": "github:edunext/frontend-build#ednx-release/css-variables-13.1.4",
7373
"@testing-library/jest-dom": "6.4.5",
7474
"@testing-library/react": "12.1.5",
75-
"glob": "10.3.12",
75+
"glob": "10.3.15",
7676
"reactifex": "1.1.1",
7777
"redux-mock-store": "1.5.4"
7878
}

src/index.jsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import React from 'react';
1717
import ReactDOM from 'react-dom';
1818

1919
import Header from '@edx/frontend-component-header';
20-
import Footer from '@edx/frontend-component-footer';
20+
import FooterSlot from '@openedx/frontend-slot-footer';
2121

2222
import messages from './i18n';
2323
import configureStore from './data/configureStore';
@@ -35,7 +35,7 @@ subscribe(APP_READY, () => {
3535
<main id="main">
3636
<AppRoutes />
3737
</main>
38-
<Footer />
38+
<FooterSlot />
3939
</AppProvider>,
4040
document.getElementById('root'),
4141
);

src/plugin-slots/FooterSlot/README.md

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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-slot-footer` repository](https://github.com/openedx/frontend-slot-footer/).
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+
```jsx
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+
```
Loading
Loading

src/plugin-slots/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# `frontend-app-profile` Plugin Slots
2+
3+
* [`footer_slot`](./FooterSlot/)

0 commit comments

Comments
 (0)