Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 0 additions & 44 deletions .env

This file was deleted.

50 changes: 0 additions & 50 deletions .env.development

This file was deleted.

49 changes: 0 additions & 49 deletions .env.test

This file was deleted.

22 changes: 0 additions & 22 deletions .eslintrc.js

This file was deleted.

3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.DS_Store
.eslintcache
env.config.*
node_modules
npm-debug.log
coverage
Expand All @@ -26,4 +25,4 @@ module.config.js
### transifex ###
src/i18n/transifex_input.json
temp
src/i18n/messages
src/i18n/messages
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,9 @@ pull_translations:
&& atlas pull $(ATLAS_OPTIONS) \
translations/frontend-platform/src/i18n/messages:frontend-platform \
translations/paragon/src/i18n/messages:paragon \
translations/frontend-component-footer/src/i18n/messages:frontend-component-footer \
translations/frontend-app-learner-dashboard/src/i18n/messages:frontend-app-learner-dashboard

$(intl_imports) frontend-platform paragon frontend-component-footer frontend-app-learner-dashboard
$(intl_imports) frontend-platform paragon frontend-app-learner-dashboard

# This target is used by CI.
validate-no-uncommitted-package-lock-changes:
Expand Down
29 changes: 4 additions & 25 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ frontend-app-learner-dashboard
The Learner Home app is a microfrontend (MFE) course listing experience for the Open edX Learning Management System
(LMS). This experience was designed to provide a clean and functional interface to allow learners to view all of their
open enrollments, as well as take relevant actions on those enrollments. It also serves as host to a number of exposed
"widget" containers to provide upsell and discovery widgets as sidebar/footer components.
"widget" containers to provide upsell and discovery widgets as sidebar components.

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

Plugins
Widgets
-------
This MFE can be customized using `Frontend Plugin Framework <https://github.com/openedx/frontend-plugin-framework>`_.

The parts of this MFE that can be customized in that manner are documented `here </src/plugin-slots>`_.

Contributing
------------

A core goal of this app is to provide a clean experimentation interface. To promote this end, we have provided a
silo'ed code directory at ``src/widgets`` in which contributors should add their custom widget components. In order to
ensure our ability to maintain the code stability of the app, the code for these widgets should be strictly contained
within the bounds of that directory.

Once written, the widgets can be configured into one of our widget containers at ``src/containers/WidgetContainers``.
This can include conditional logic, as well as Optimizely triggers. It is important to note that our integration tests
will isolate and ignore these containers, and thus testing your widget is the response of the creator/maintainer of the
widget itself.

Some guidelines for writing widgets:

* Code for the widget should be strictly confined to the ``src/widgets`` directory.
* You can load data from the redux store, but should not add or modify fields in that structure.
* Network events should be managed in component hooks, though can use our ``data/constants/requests:requestStates`` for
ease of tracking the request states.
This MFE can be customized with widgets. The parts of this MFE that can be customized in that manner are documented
`here </src/slots>`_.

License
-------
Expand Down
10 changes: 10 additions & 0 deletions app.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/// <reference types="@openedx/frontend-base" />

declare module 'site.config' {
export default SiteConfig;
}

declare module '*.svg' {
const content: string;
export default content;
}
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { createConfig } = require('@openedx/frontend-base/config');

module.exports = createConfig('babel');
22 changes: 22 additions & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// @ts-check

const { createLintConfig } = require('@openedx/frontend-base/config');

module.exports = createLintConfig(
{
files: [
'src/**/*',
'site.config.*',
],
},
{
ignores: [
'coverage/*',
'dist/*',
'documentation/*',
'node_modules/*',
'**/__mocks__/*',
'**/__snapshots__/*',
],
},
);
72 changes: 0 additions & 72 deletions example.env.config.js

This file was deleted.

11 changes: 7 additions & 4 deletions jest.config.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
const { createConfig } = require('@openedx/frontend-build');
const { createConfig } = require('@openedx/frontend-base/config');

module.exports = createConfig('jest', {
module.exports = createConfig('test', {
setupFilesAfterEnv: [
'jest-expect-message',
'<rootDir>/src/setupTest.jsx',
],
modulePaths: ['<rootDir>/src/'],
coveragePathIgnorePatterns: [
'src/segment.js',
'src/postcss.config.js',
'testUtils', // don't unit test jest mocking tools
'src/data/services/lms/fakeData', // don't unit test mock data
'src/test', // don't unit test integration test utils
'src/__mocks__',
],
moduleNameMapper: {
'\\.svg$': '<rootDir>/src/__mocks__/svg.js',
'\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$': '<rootDir>/src/__mocks__/file.js',
},
testTimeout: 120000,
testEnvironment: 'jsdom',
});
Loading