Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: allow runtime configuration #786

Merged
merged 1 commit into from
Nov 8, 2022

Conversation

dcoa
Copy link
Contributor

@dcoa dcoa commented Oct 18, 2022

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
  • Use Helmet library to change the favicon in runtime.
  • Use getConfig() to insert configuration.

Screenshot

Values come from runtime configuration

publisher evidence

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 feat: add mfe config api edx-platform#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

@openedx-webhooks
Copy link

Thanks for the pull request, @dcoa! Please note that it may take us up to several weeks or months to complete a review and merge your PR.

Feel free to add as much of the following information to the ticket as you can:

  • supporting documentation
  • Open edX discussion forum threads
  • timeline information ("this must be merged by XX date", and why that is)
  • partner information ("this is a course on edx.org")
  • any other information that can help Product understand the context for the PR

All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here.

Please let us know once your PR is ready for our review and all tests are green.

@openedx-webhooks openedx-webhooks added the open-source-contribution PR author is not from Axim or 2U label Oct 18, 2022
@arbrandes arbrandes linked an issue Oct 20, 2022 that may be closed by this pull request
6 tasks
@mphilbrick211
Copy link

@azanbinzahid could you please review and enable tests to run?

Copy link
Contributor

@Ali-D-Akbar Ali-D-Akbar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Haven't tested on local but the changes look good.

@dcoa
Copy link
Contributor Author

dcoa commented Nov 6, 2022

Thanks, @Ali-D-Akbar, and @ansabgillani for your review.

Let me know if you need more information to merge it. :)

C.C @arbrandes

@Ali-D-Akbar Ali-D-Akbar merged commit c4d00fe into openedx:master Nov 8, 2022
@openedx-webhooks
Copy link

@dcoa 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future.

abdullahwaheed pushed a commit to abdullahwaheed/frontend-app-publisher that referenced this pull request Nov 18, 2022
abdullahwaheed pushed a commit to abdullahwaheed/frontend-app-publisher that referenced this pull request Nov 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
open-source-contribution PR author is not from Axim or 2U
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

5 participants