Skip to content

Commit 89559a4

Browse files
committed
refactor: migrate to frontend-base
BREAKING CHANGE: refactors the MFE for frontend-base.
1 parent c4205e9 commit 89559a4

File tree

251 files changed

+9594
-7069
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

251 files changed

+9594
-7069
lines changed

.env

Lines changed: 0 additions & 44 deletions
This file was deleted.

.env.development

Lines changed: 0 additions & 50 deletions
This file was deleted.

.env.test

Lines changed: 0 additions & 49 deletions
This file was deleted.

.eslintrc.js

Lines changed: 0 additions & 22 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.DS_Store
22
.eslintcache
3-
env.config.*
43
node_modules
54
npm-debug.log
65
coverage
@@ -26,4 +25,4 @@ module.config.js
2625
### transifex ###
2726
src/i18n/transifex_input.json
2827
temp
29-
src/i18n/messages
28+
src/i18n/messages

Makefile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,10 +47,9 @@ pull_translations:
4747
&& atlas pull $(ATLAS_OPTIONS) \
4848
translations/frontend-platform/src/i18n/messages:frontend-platform \
4949
translations/paragon/src/i18n/messages:paragon \
50-
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
5150
translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard
5251

53-
$(intl_imports) frontend-platform paragon frontend-component-footer frontend-app-learner-dashboard
52+
$(intl_imports) frontend-platform paragon frontend-app-learner-dashboard
5453

5554
# This target is used by CI.
5655
validate-no-uncommitted-package-lock-changes:

README.rst

Lines changed: 4 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ frontend-app-learner-dashboard
1818
The Learner Home app is a microfrontend (MFE) course listing experience for the Open edX Learning Management System
1919
(LMS). This experience was designed to provide a clean and functional interface to allow learners to view all of their
2020
open enrollments, as well as take relevant actions on those enrollments. It also serves as host to a number of exposed
21-
"widget" containers to provide upsell and discovery widgets as sidebar/footer components.
21+
"widget" containers to provide upsell and discovery widgets as sidebar components.
2222

2323
Quickstart
2424
----------
@@ -30,31 +30,10 @@ To start the MFE and enable the feature in LMS:
3030
From there, simply load the configured address/port. You should be prompted to log into your LMS if you are not
3131
already, and then redirected to your home page.
3232

33-
Plugins
33+
Widgets
3434
-------
35-
This MFE can be customized using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.
36-
37-
The parts of this MFE that can be customized in that manner are documented `here </src/plugin-slots>`_.
38-
39-
Contributing
40-
------------
41-
42-
A core goal of this app is to provide a clean experimentation interface. To promote this end, we have provided a
43-
silo'ed code directory at ``src/widgets`` in which contributors should add their custom widget components. In order to
44-
ensure our ability to maintain the code stability of the app, the code for these widgets should be strictly contained
45-
within the bounds of that directory.
46-
47-
Once written, the widgets can be configured into one of our widget containers at ``src/containers/WidgetContainers``.
48-
This can include conditional logic, as well as Optimizely triggers. It is important to note that our integration tests
49-
will isolate and ignore these containers, and thus testing your widget is the response of the creator/maintainer of the
50-
widget itself.
51-
52-
Some guidelines for writing widgets:
53-
54-
* Code for the widget should be strictly confined to the ``src/widgets`` directory.
55-
* You can load data from the redux store, but should not add or modify fields in that structure.
56-
* Network events should be managed in component hooks, though can use our ``data/constants/requests:requestStates`` for
57-
ease of tracking the request states.
35+
This MFE can be customized with widgets. The parts of this MFE that can be customized in that manner are documented
36+
`here </src/slots>`_.
5837

5938
License
6039
-------

app.d.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/// <reference types="@openedx/frontend-base" />
2+
3+
declare module 'site.config' {
4+
export default SiteConfig;
5+
}
6+
7+
declare module '*.svg' {
8+
const content: string;
9+
export default content;
10+
}

babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const { createConfig } = require('@openedx/frontend-base/config');
2+
3+
module.exports = createConfig('babel');

eslint.config.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// @ts-check
2+
3+
const { createLintConfig } = require('@openedx/frontend-base/config');
4+
5+
module.exports = createLintConfig(
6+
{
7+
files: [
8+
'src/**/*',
9+
'site.config.*',
10+
],
11+
},
12+
{
13+
ignores: [
14+
'coverage/*',
15+
'dist/*',
16+
'documentation/*',
17+
'node_modules/*',
18+
'**/__mocks__/*',
19+
'**/__snapshots__/*',
20+
],
21+
},
22+
);

0 commit comments

Comments
 (0)