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 #654

Merged
merged 1 commit into from
Nov 30, 2022

Conversation

dcoa
Copy link
Contributor

@dcoa dcoa commented Oct 14, 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.0
  • Use Helmet library to change the favicon in runtime.

Screenshot
auth-logo

Values come from runtime configuration
auth-response

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

openedx-webhooks commented Oct 14, 2022

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 14, 2022
@dcoa dcoa marked this pull request as ready for review October 14, 2022 21:15
@arbrandes arbrandes linked an issue Oct 20, 2022 that may be closed by this pull request
6 tasks
@codecov
Copy link

codecov bot commented Oct 25, 2022

Codecov Report

Base: 81.01% // Head: 81.01% // No change to project coverage 👍

Coverage data is based on head (1219f05) compared to base (35dfc72).
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #654   +/-   ##
=======================================
  Coverage   81.01%   81.01%           
=======================================
  Files          86       86           
  Lines        1849     1849           
  Branches      522      522           
=======================================
  Hits         1498     1498           
  Misses        336      336           
  Partials       15       15           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@arbrandes
Copy link
Contributor

@zainab-amir, mind reviewing this one? It's required if we want to include it in Tutor/Olive.

@zainab-amir
Copy link
Contributor

@arbrandes I have created a ticket for this in our current sprint.

@arbrandes
Copy link
Contributor

@zainab-amir, thanks! 👍🏼

@zainab-amir
Copy link
Contributor

@dcoa the changes look good. Kindly rebase the branch and I'll re-review it.

@dcoa
Copy link
Contributor Author

dcoa commented Nov 29, 2022

Hi @zainab-amir, I already rebase the branch and made the suggested change :)

@zainab-amir zainab-amir merged commit 8ea457f into openedx:master Nov 30, 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.

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.

None yet

4 participants