generated from openedx/frontend-template-application
-
Notifications
You must be signed in to change notification settings - Fork 16
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!: Add JS-based configuration capabilities to Learner Record #275
Merged
+571
−475
Merged
Changes from 13 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
b943fee
feat!: Add support for JS-based configuration
jsnwesson 5d1648f
Merge branch 'master' into jwesson/add-js-config
jsnwesson 9788e72
docs: add some explanation for jest configuration
jsnwesson 797fd31
fix: add ariaLabel in SelectableBox.Set as part of Paragon WCAG compl…
jsnwesson f453256
docs: adjust wording around jest and env.config.js fallback
jsnwesson 68a9e75
fix: remove jest configuration and fallback
jsnwesson 40c748e
refactor: remove unnecessary changes for custom webpack dev/prod configs
jsnwesson 8115b51
test: mock child component NavigationBar for ProgramRecordsList and P…
jsnwesson f1347b9
refactor: move webpack config logic to node_modules via patch-package
jsnwesson a4689a5
refactor: expand ternary operator logic in patches and add env.config…
jsnwesson 2ad54d9
fix: add back in the webpack.prod.config as patch-package will only w…
jsnwesson 760051e
refactor: remove webpack.prod.config now that postinstall script is a…
jsnwesson e7b851a
docs: revise example.env.config comments
jsnwesson 8f062be
refactor: simplify gitignore of env.config files
jsnwesson cec5f45
fix: remove unnecessary console logs
jsnwesson File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
Learner Record is now able to handle JS-based configuration! | ||
|
||
For the time being, the `.env.*` files are still made available when cloning down this repo or pulling from | ||
the master branch. To switch to using `env.config.js(x)`: | ||
|
||
Note: having both .env and env.config.js(x) files will follow a predictable order, in which non-empty values in the | ||
JS-based config will overwrite the .env environment variables. | ||
|
||
frontend-platform's getConfig loads configuration in the following sequence: | ||
- .env file config | ||
- optional handlers (commonly used to merge MFE-specific config in via additional process.env variables) | ||
- env.config.js file config | ||
- runtime config | ||
*/ | ||
|
||
module.exports = { | ||
NODE_ENV: 'development', | ||
PORT: 1990, | ||
ACCESS_TOKEN_COOKIE_NAME: 'edx-jwt-cookie-header-payload', | ||
BASE_URL: 'http://localhost:1990', | ||
CREDENTIALS_BASE_URL: 'http://localhost:18150', | ||
CSRF_TOKEN_API_PATH: '/csrf/api/v1/token', | ||
ECOMMERCE_BASE_URL: 'http://localhost:18130', | ||
LANGUAGE_PREFERENCE_COOKIE_NAME: 'openedx-language-preference', | ||
LMS_BASE_URL: 'http://localhost:18000', | ||
LOGIN_URL: 'http://localhost:18000/login', | ||
LOGOUT_URL: 'http://localhost:18000/logout', | ||
LOGO_URL: 'https://edx-cdn.org/v3/default/logo.svg', | ||
LOGO_TRADEMARK_URL: 'https://edx-cdn.org/v3/default/logo-trademark.svg', | ||
LOGO_WHITE_URL: 'https://edx-cdn.org/v3/default/logo-white.svg', | ||
FAVICON_URL: 'https://edx-cdn.org/v3/default/favicon.ico', | ||
jsnwesson marked this conversation as resolved.
Show resolved
Hide resolved
|
||
MARKETING_SITE_BASE_URL: 'http://localhost:18000', | ||
ORDER_HISTORY_URL: 'http://localhost:1996/orders', | ||
REFRESH_ACCESS_TOKEN_ENDPOINT: 'http://localhost:18000/login_refresh', | ||
SEGMENT_KEY: '', | ||
SITE_NAME: 'localhost', | ||
USER_INFO_COOKIE_NAME: 'edx-user-info', | ||
SUPPORT_URL_LEARNER_RECORDS: 'https://support.edx.org/hc/en-us/sections/360001216693-Learner-records', | ||
APP_ID: '', | ||
MFE_CONFIG_API_URL: '', | ||
ENABLE_VERIFIABLE_CREDENTIALS: true, | ||
SUPPORT_URL_VERIFIABLE_CREDENTIALS: '', | ||
}; |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: might be able to tackle both of these in 1 line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm learning something new every day haha. Thanks for the suggestion!