Skip to content

Commit

Permalink
Merge pull request #30 from davidjoy/main
Browse files Browse the repository at this point in the history
feat: Adding runtime module management and updating code from source repositories
  • Loading branch information
davidjoy authored Sep 13, 2024
2 parents 7efcebc + cc9ea02 commit 6d0ae1c
Show file tree
Hide file tree
Showing 141 changed files with 3,095 additions and 17,717 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ const config = require('./tools/eslint/.eslintrc.js');

module.exports = merge(config, {
ignorePatterns: [
'test-app',
'test-project',
'docs',
'.eslintrc.js',
'frontend-base.d.ts',
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
npm run build
npm pack
mv openedx-frontend-base* openedx-frontend-base.tgz
cd test-app
cd test-project
npm i ../openedx-frontend-base.tgz
npm ci
- name: Lint
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ Description fields are now required on all i18n messages in the repository. Thi

### 12. SVGR "ReactComponent" imports have been removed.

We have removed the `@svgr/webpack` loader because it was incompatible with more modern tooling (it requires Babel). As a result, the ability to import SVG files into JS as the `ReactComponent` export no longer works. We know of a total of 5 places where this is happening today in Open edX MFEs - frontend-app-learning and frontend-app-profile use it. Please replace that export with the default URL export and set the URL as the source of an `<img>` tag, rather than using `ReactComponent`. You can see an example of normal SVG imports in `test-app/src/App.jsx`.
We have removed the `@svgr/webpack` loader because it was incompatible with more modern tooling (it requires Babel). As a result, the ability to import SVG files into JS as the `ReactComponent` export no longer works. We know of a total of 5 places where this is happening today in Open edX MFEs - frontend-app-learning and frontend-app-profile use it. Please replace that export with the default URL export and set the URL as the source of an `<img>` tag, rather than using `ReactComponent`. You can see an example of normal SVG imports in `test-project/src/ExamplePage.tsx`.

### 13. Import `createConfig` and `getBaseConfig` from `@openedx/frontend-base/config`

Expand Down Expand Up @@ -422,7 +422,7 @@ You must then import this new stylesheet into your `site.config` file:
```diff
+ import './project.scss';

const config: SiteConfig = {
const config: ProjectSiteConfig = {
// config document
}

Expand All @@ -443,6 +443,15 @@ Then work through the conflicts and use a merge commit to add the history into t

Then move the files out of the way (move src to some other sub-dir, mostly) to make room for the next repo.

### Latest repository merges

- frontend-component-header - Up to date as of 9/12/2024
- frontend-component-footer - Up to date as of 9/12/2024
- frontend-build - Up to date as of 9/12/2024

- frontend-platform - Up to date as of 9/13/2024
- frontend-plugin-framework - Up to date as of 9/13/2024

# Other notable changes

- Cease using `AUTHN_MINIMAL_HEADER`, replace it with an actual minimal header.
Expand Down
27 changes: 15 additions & 12 deletions example-plugin-app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions example-plugin-app/src/DefaultIframe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { Plugin } from '@openedx/frontend-plugin-framework';
function DefaultComponent() {
return (
<section className="bg-light p-3 h-100">
<h3>Default iFrame Widget</h3>
<h4>Default iFrame Widget</h4>
<p>
This is a component that lives in the example-plugins-app and is provided in this host MFE via iFrame.
</p>
Expand All @@ -17,7 +17,7 @@ function DefaultComponent() {
function ErrorFallback(error) {
return (
<div className="text-center">
<p className="h3 text-muted">
<p className="h4 text-muted">
Oops! An error occurred. Please refresh the screen to try again.
</p>
<br />
Expand Down
2 changes: 1 addition & 1 deletion example-plugin-app/src/PluginIframe.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default function PluginIframe() {
return (
<Plugin>
<section className="bg-light p-3 h-100">
<h3>Inserted iFrame Plugin</h3>
<h4>Inserted iFrame Plugin</h4>
<p>
This is a component that lives in the example-plugins-app and is provided in this host MFE via iFrame plugin.
</p>
Expand Down
3 changes: 0 additions & 3 deletions example/.eslintignore

This file was deleted.

15 changes: 0 additions & 15 deletions example/.eslintrc.js

This file was deleted.

Empty file removed example/assets/.gitkeep
Empty file.
Empty file removed example/data/.gitkeep
Empty file.
4 changes: 0 additions & 4 deletions example/data/README.rst

This file was deleted.

Loading

0 comments on commit 6d0ae1c

Please sign in to comment.