From 84c92678da5974bc0e15f9a6a1fee4876e4c90f6 Mon Sep 17 00:00:00 2001 From: hinakhadim Date: Fri, 16 Aug 2024 16:09:44 +0500 Subject: [PATCH 1/3] fix: account-mfe bug --- tutorindigo/plugin.py | 19 +++++++++++---- tutorindigo/templates/indigo/env.config.jsx | 27 +++++++++++++++++++++ 2 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 tutorindigo/templates/indigo/env.config.jsx diff --git a/tutorindigo/plugin.py b/tutorindigo/plugin.py index 982983f16..1659e31bc 100644 --- a/tutorindigo/plugin.py +++ b/tutorindigo/plugin.py @@ -108,7 +108,9 @@ def _override_openedx_docker_image( """ RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.0.0'{% if INDIGO_ENABLE_DARK_THEME %} --theme=dark{% endif %} RUN npm install '@edx/frontend-component-header@npm:@edly-io/indigo-frontend-component-header@^3.0.0' -RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^2.0.0' +RUN npm install @edly-io/indigo-frontend-component-footer@^2.0.0 + +COPY indigo/env.config.jsx /openedx/app/ """, ), ( @@ -124,14 +126,18 @@ def _override_openedx_docker_image( """ RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.0.0'{% if INDIGO_ENABLE_DARK_THEME %} --theme=dark{% endif %} RUN npm install '@edx/frontend-component-header@npm:@edly-io/indigo-frontend-component-header@^3.0.0' -RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^2.0.0' +RUN npm install @edly-io/indigo-frontend-component-footer@^2.0.0 + +COPY indigo/env.config.jsx /openedx/app/ """, ), ( "mfe-dockerfile-post-npm-install-learner-dashboard", """ RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.0.0'{% if INDIGO_ENABLE_DARK_THEME %} --theme=dark{% endif %} -RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^2.0.0' +RUN npm install @edly-io/indigo-frontend-component-footer@^2.0.0 + +COPY indigo/env.config.jsx /openedx/app/ """, ), ( @@ -139,8 +145,9 @@ def _override_openedx_docker_image( """ RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.0.0'{% if INDIGO_ENABLE_DARK_THEME %} --theme=dark{% endif %} RUN npm install '@edx/frontend-component-header@npm:@edly-io/indigo-frontend-component-header@^3.0.0' -RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^2.0.0' +RUN npm install @edly-io/indigo-frontend-component-footer@^2.0.0 +COPY indigo/env.config.jsx /openedx/app/ """, ), ( @@ -148,7 +155,9 @@ def _override_openedx_docker_image( """ RUN npm install '@edx/brand@npm:@edly-io/indigo-brand-openedx@^2.0.0'{% if INDIGO_ENABLE_DARK_THEME %} --theme=dark{% endif %} RUN npm install '@edx/frontend-component-header@npm:@edly-io/indigo-frontend-component-header@^3.0.0' -RUN npm install '@edx/frontend-component-footer@npm:@edly-io/indigo-frontend-component-footer@^2.0.0' +RUN npm install @edly-io/indigo-frontend-component-footer@^2.0.0 + +COPY indigo/env.config.jsx /openedx/app/ """, ), ] diff --git a/tutorindigo/templates/indigo/env.config.jsx b/tutorindigo/templates/indigo/env.config.jsx new file mode 100644 index 000000000..d43741b27 --- /dev/null +++ b/tutorindigo/templates/indigo/env.config.jsx @@ -0,0 +1,27 @@ +import React, { useEffect } from 'react'; + +import Footer from '@edly-io/indigo-frontend-component-footer'; +import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-framework'; + +const themePluginSlot = { + keepDefault: false, + plugins: [ + { + op: PLUGIN_OPERATIONS.Insert, + widget: { + id: 'default_contents', + type: DIRECT_PLUGIN, + priority: 1, + RenderWidget: