Skip to content

Conversation

@alexjmpb
Copy link

Description

This PR is part of the work to make it possible to configure the frontend applications at runtime (you can referer to this openedx/wg-frontend#103).

Changes

  • Update frontend-platform to version 2.5.1.
  • Update the footer and header to avoid peer dependency errors.
  • Create a component Head, that uses Helmet library and integrates internationalization to change the MFE name in the title tag according to the language, and change the favicon in runtime.
  • Add react-helmet, enzyme and enzyme-adapter-react-16.

Screenshot

In progress

How to test

To allow runtime configuration set a new environment variables MFE_CONFIG_API_URL and APP_ID in the env file and add the api url ( To test this you can use the API from this 

https://github.com/openedx/edx-platform/pull/30473 or use an external tool to mock the API response).
The API should respond with a JSON with the config values, something like:

{
"SITE_NAME": "Test Site",
"LOGO_URL": "https://testimage.com/logo.svg",
"LOGO_TRADEMARK_URL": "https://testimage.com/logo.svg",
"LOGO_WHITE_URL": "https://testimage.com/logo.svg",
"FAVICON_URL": "https://testimage.com/favicon.ico",
}

The initialize process should work normally.
Note: You can combine buildtime and runtime configuration

@dcoa
Copy link
Contributor

dcoa commented Oct 18, 2022

Close in favor of #104

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants