From 6795147255f470b3f9f68df17f2c2ebb98210a31 Mon Sep 17 00:00:00 2001 From: Brian Smith <112954497+brian-smith-tcril@users.noreply.github.com> Date: Thu, 17 Apr 2025 17:35:52 -0400 Subject: [PATCH] feat: move `FooterSlot` and `StudioFooterSlot` in from `slot-footer` (#521) Co-authored-by: Muhammad Anas <88967643+Anas12091101@users.noreply.github.com> --- README.rst | 4 +- package-lock.json | 8 +-- package.json | 3 +- src/components/Footer.test.jsx | 3 +- .../studio-footer/StudioFooter.test.jsx | 4 +- src/index.js | 4 +- src/plugin-slots/FooterSlot/README.md | 51 ++++++++++++++++++ .../FooterSlot/images/custom_footer.png | Bin 0 -> 6395 bytes .../FooterSlot/images/default_footer.png | Bin 0 -> 6679 bytes src/plugin-slots/FooterSlot/index.jsx | 11 ++++ src/plugin-slots/README.md | 4 +- .../StudioFooterLogoSlot/README.md | 11 ++-- .../StudioFooterLogoSlot/index.jsx | 2 +- src/plugin-slots/StudioFooterSlot/README.md | 51 ++++++++++++++++++ .../StudioFooterSlot/images/custom_footer.png | Bin 0 -> 6395 bytes .../images/default_studio_footer.png | Bin 0 -> 81173 bytes src/plugin-slots/StudioFooterSlot/index.jsx | 11 ++++ 17 files changed, 150 insertions(+), 17 deletions(-) create mode 100644 src/plugin-slots/FooterSlot/README.md create mode 100644 src/plugin-slots/FooterSlot/images/custom_footer.png create mode 100644 src/plugin-slots/FooterSlot/images/default_footer.png create mode 100644 src/plugin-slots/FooterSlot/index.jsx create mode 100644 src/plugin-slots/StudioFooterSlot/README.md create mode 100644 src/plugin-slots/StudioFooterSlot/images/custom_footer.png create mode 100644 src/plugin-slots/StudioFooterSlot/images/default_studio_footer.png create mode 100644 src/plugin-slots/StudioFooterSlot/index.jsx diff --git a/README.rst b/README.rst index 66dcc6dc..d1cfd83b 100644 --- a/README.rst +++ b/README.rst @@ -95,9 +95,9 @@ This library has the following exports: Plugin ====== -The footer can be replaced using using `Frontend Plugin Framework `_. +The footer can be replaced or modified using `Frontend Plugin Framework `_. -Information on how to utilize the ``FooterSlot`` component to do so is available in the `frontend-slot-footer repository `_. +Information on how to replace or modify the footer is available `here `_. Examples ======== diff --git a/package-lock.json b/package-lock.json index 834d4bb4..4f0529e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@fortawesome/free-regular-svg-icons": "6.7.2", "@fortawesome/free-solid-svg-icons": "6.7.2", "@fortawesome/react-fontawesome": "0.2.2", - "@openedx/frontend-plugin-framework": "^1.5.0", + "@openedx/frontend-plugin-framework": "^1.7.0", "classnames": "^2.5.1", "jest-environment-jsdom": "^29.7.0", "lodash": "^4.17.21", @@ -4048,9 +4048,9 @@ } }, "node_modules/@openedx/frontend-plugin-framework": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@openedx/frontend-plugin-framework/-/frontend-plugin-framework-1.6.0.tgz", - "integrity": "sha512-zgP+/hs/cvcPmFOgVm2xt/qgX1nheNsfipzCO7I3bON4hHyOhmOyzwFZJ7pz7GzCJwKlMVguh3HcJgf4p/BPKQ==", + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/@openedx/frontend-plugin-framework/-/frontend-plugin-framework-1.7.0.tgz", + "integrity": "sha512-8tGkuHvtzhbqb9dU4sXUtR0K44+Hjh1uGR6DvhZAt9wSKQC1v4RBk34ef8DFzQhoNQa/Jtn6BJuta4Un6MmHmw==", "license": "AGPL-3.0", "dependencies": { "@edx/brand": "npm:@openedx/brand-openedx@^1.2.2", diff --git a/package.json b/package.json index f64fe4e2..da3a21f9 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "build": "make build", "i18n_extract": "fedx-scripts formatjs extract", "lint": "fedx-scripts eslint --ext .js --ext .jsx .", + "lint:fix": "fedx-scripts eslint --fix --ext .js --ext .jsx .", "snapshot": "fedx-scripts jest --updateSnapshot", "start": "fedx-scripts webpack-dev-server --progress", "start:with-theme": "paragon install-theme && npm start && npm install", @@ -55,7 +56,7 @@ "@fortawesome/free-regular-svg-icons": "6.7.2", "@fortawesome/free-solid-svg-icons": "6.7.2", "@fortawesome/react-fontawesome": "0.2.2", - "@openedx/frontend-plugin-framework": "^1.5.0", + "@openedx/frontend-plugin-framework": "^1.7.0", "classnames": "^2.5.1", "jest-environment-jsdom": "^29.7.0", "lodash": "^4.17.21", diff --git a/src/components/Footer.test.jsx b/src/components/Footer.test.jsx index 5364aeb7..e605ca9e 100644 --- a/src/components/Footer.test.jsx +++ b/src/components/Footer.test.jsx @@ -7,6 +7,7 @@ import { IntlProvider } from '@edx/frontend-platform/i18n'; import { AppContext } from '@edx/frontend-platform/react'; import Footer from './Footer'; +import FooterSlot from '../plugin-slots/FooterSlot'; const FooterWithContext = ({ locale = 'es' }) => { const contextValue = useMemo(() => ({ @@ -22,7 +23,7 @@ const FooterWithContext = ({ locale = 'es' }) => { -