Skip to content

Commit 94e4a62

Browse files
committed
docs: change @edx for @openedx in the package management and docs
1 parent 9814fb3 commit 94e4a62

File tree

4 files changed

+1384
-2038
lines changed

4 files changed

+1384
-2038
lines changed

README.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
[![Build Status](https://github.com/openedx/frontend-platform/actions/workflows/ci.yml/badge.svg)](https://github.com/openedx/frontend-platform/actions/workflows/ci.yml)
22
[![Codecov](https://img.shields.io/codecov/c/github/edx/frontend-platform)](https://codecov.io/gh/edx/frontend-platform)
3-
[![NPM Version](https://img.shields.io/npm/v/@edx/frontend-platform.svg)](https://www.npmjs.com/package/@edx/frontend-platform)
4-
[![npm_downloads](https://img.shields.io/npm/dt/@edx/frontend-platform.svg)](https://www.npmjs.com/package/@edx/frontend-platform)
5-
[![license](https://img.shields.io/npm/l/@edx/frontend-platform.svg)](https://github.com/openedx/frontend-platform/blob/master/LICENSE)
3+
[![NPM Version](https://img.shields.io/npm/v/@openedx/frontend-platform.svg)](https://www.npmjs.com/package/@openedx/frontend-platform)
4+
[![npm_downloads](https://img.shields.io/npm/dt/@openedx/frontend-platform.svg)](https://www.npmjs.com/package/@opeedx/frontend-platform)
5+
[![license](https://img.shields.io/npm/l/@openedx/frontend-platform.svg)](https://github.com/openedx/frontend-platform/blob/master/LICENSE)
66
[![semantic release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)
77

88
# Overview
@@ -13,11 +13,11 @@ frontend-platform is a modest application framework for Open edX micro-frontend
1313

1414
| Service | Module location |
1515
|------------------------------------|----------------------------------|
16-
| Analytics | @edx/frontend-platform/analytics |
17-
| Logging | @edx/frontend-platform/logging |
18-
| Authenticated API client (auth) | @edx/frontend-platform/auth |
19-
| Internationalization (i18n) | @edx/frontend-platform/i18n |
20-
| Misc (init, config, pubSub, utils) | @edx/frontend-platform |
16+
| Analytics | @openedx/frontend-platform/analytics |
17+
| Logging | @openedx/frontend-platform/logging |
18+
| Authenticated API client (auth) | @openedx/frontend-platform/auth |
19+
| Internationalization (i18n) | @openedx/frontend-platform/i18n |
20+
| Misc (init, config, pubSub, utils) | @openedx/frontend-platform |
2121

2222
-------------------------------------------------------------------------
2323

@@ -101,7 +101,7 @@ initialize({
101101
When using runtime configuration via `mergeConfig` noted above, `getConfig` must be called within a component's render lifecycle for the added keys and values to be returned in the configuration object. If `getConfig` is called outside of a component's render lifecycle, the custom configuration key/value pairs will not initially be part of the object returned by `getConfig`. For example:
102102

103103
```jsx
104-
import { getConfig } from '@edx/frontend-platform/config';
104+
import { getConfig } from '@openedx/frontend-platform/config';
105105

106106
// The runtime configuration `CUSTOM_VARIABLE` added in the above code snippet will not appear here. This is
107107
// because `getConfig` is called before `mergeConfig` is executed to add the custom runtime configuration.

docs/how_tos/theming.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
## Overview
44

5-
This document serves as a guide to using `@edx/frontend-platform` to support MFE theming with Paragon using theme CSS loaded externally (e.g., from a CDN).
5+
This document serves as a guide to using `@openedx/frontend-platform` to support MFE theming with Paragon using theme CSS loaded externally (e.g., from a CDN).
66

77
To do this, configured URLs pointing to relevant CSS files from `@openedx/paragon` and (optionally) `@openedx/brand-openedx` are loaded and injected to the HTML document at runtime. This differs than the consuming application importing the styles from `@openedx/paragon` and `@openedx/brand-openedx` directly, which includes these styles in the application's production assets.
88

99
By serving CSS loaded externally, consuming applications of Paragon no longer need to be responsible for compiling the theme SCSS to CSS themselves and instead use a pre-compiled CSS file. In doing so, this allows making changes to the Paragon theme without needing to necessarily re-build and re-deploy all consuming applications.
1010

1111
### Dark mode and theme variant preferences
1212

13-
`@edx/frontend-platform` supports both `light` (required) and `dark` (optional) theme variants. The choice of which theme variant should be applied on page load is based on the following preference cascade:
13+
`@openedx/frontend-platform` supports both `light` (required) and `dark` (optional) theme variants. The choice of which theme variant should be applied on page load is based on the following preference cascade:
1414

1515
1. **Get theme preference from localStorage.** Supports persisting and loading the user's preference for their selected theme variant, until cleared.
1616
1. **Detect user system settings.** Rely on the `prefers-color-scheme` media query to detect if the user's system indicates a preference for dark mode. If so, use the default dark theme variant, if one is configured.
@@ -26,7 +26,7 @@ If your use case necessitates additional variants beyond the default supported `
2626

2727
There is also a meaningful improvement in performance as loading the compiled theme CSS from an external CDN means micro-frontends (MFEs) can include cached styles instead of needing to load essentially duplicate theme styles included in each individual MFE as users navigate across the platform.
2828

29-
However, as the styles from `@openedx/paragon` and `@openedx/brand-openedx` get loaded at runtime by `@edx/frontend-platform`, the associated CSS files do not get processed through the consuming application's Webpack build process (e.g., if the MFE used PurgeCSS or any custom PostCSS plugins specifically for Paragon).
29+
However, as the styles from `@openedx/paragon` and `@openedx/brand-openedx` get loaded at runtime by `@openedx/frontend-platform`, the associated CSS files do not get processed through the consuming application's Webpack build process (e.g., if the MFE used PurgeCSS or any custom PostCSS plugins specifically for Paragon).
3030

3131
### Falling back to styles installed in consuming application
3232

@@ -118,7 +118,7 @@ export default config;
118118

119119
### MFE runtime configuration API
120120

121-
`@edx/frontend-platform` additionally supports loading application configuration from the MFE runtime configuration API via `edx-platform`. The configuration is served by the `http://localhost:18000/api/mfe_config/v1` API endpoint. For more information, refer to [this documentation](https://github.com/openedx/edx-platform/blob/master/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst) about the MFE runtime configuration API, please see these docs.
121+
`@openedx/frontend-platform` additionally supports loading application configuration from the MFE runtime configuration API via `edx-platform`. The configuration is served by the `http://localhost:18000/api/mfe_config/v1` API endpoint. For more information, refer to [this documentation](https://github.com/openedx/edx-platform/blob/master/lms/djangoapps/mfe_config_api/docs/decisions/0001-mfe-config-api.rst) about the MFE runtime configuration API, please see these docs.
122122

123123
The application configuration may be setup via Django settings as follows:
124124

@@ -154,7 +154,7 @@ https://cdn.jsdelivr.net/npm/@openedx/paragon@$paragonVersion/dist/core.min.css
154154
https://cdn.jsdelivr.net/npm/@openedx/paragon@$paragonVersion/dist/light.min.css
155155
```
156156

157-
In the event the other Paragon CSS urls are configured via one of the other documented mechanisms, but they fail to load (e.g., the CDN url throws a 404), `@edx/frontend-platform` will attempt to fallback to injecting the locally installed Paragon CSS from the consuming application into the HTML document.
157+
In the event the other Paragon CSS urls are configured via one of the other documented mechanisms, but they fail to load (e.g., the CDN url throws a 404), `@openedx/frontend-platform` will attempt to fallback to injecting the locally installed Paragon CSS from the consuming application into the HTML document.
158158

159159
## Usage with `@openedx/brand-openedx`
160160

@@ -201,4 +201,4 @@ https://cdn.jsdelivr.net/npm/@openedx/brand-openedx@$brandVersion/dist/core.min.
201201
https://cdn.jsdelivr.net/npm/@openedx/brand-openedx@$brandVersion/dist/light.min.css
202202
```
203203

204-
In the event the other brand override CSS urls are configured via one of the other documented mechanisms, but they fail to load (e.g., the CDN is down), `@edx/frontend-platform` will attempt to fallback to injecting the locally installed brand override CSS urls from the consuming application into the HTML document.
204+
In the event the other brand override CSS urls are configured via one of the other documented mechanisms, but they fail to load (e.g., the CDN is down), `@openedx/frontend-platform` will attempt to fallback to injecting the locally installed brand override CSS urls from the consuming application into the HTML document.

0 commit comments

Comments
 (0)