Skip to content

Commit 8116956

Browse files
authored
feat: remove widgets in favor of plugins (#708)
1 parent 8d23e75 commit 8116956

File tree

10 files changed

+9
-19
lines changed

10 files changed

+9
-19
lines changed

README.rst

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,12 @@ The parts of this MFE that can be customized in that manner are documented `here
3939
Contributing
4040
------------
4141

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.
42+
Contributions are very welcome. Please read `So you want to contribute to Open edX <https://docs.openedx.org/en/latest/developers/quickstarts/so_you_want_to_contribute.html>`_ for details on how to get started as an Open edX contributor.
43+
44+
This project is currently accepting all types of contributions — bug fixes, security fixes, maintenance work, or new features.
45+
However, if you intend to add a new feature, make sure it has gone through the `Product Review process <https://openedx.atlassian.net/wiki/spaces/COMM/pages/3875962884/How+to+submit+an+open+source+contribution+for+Product+Review>`_.
46+
47+
When proposing a change, create an issue in this repo to get the discussion started.
5848

5949
License
6050
-------

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import track from 'tracking';
2222

2323
import fakeData from 'data/services/lms/fakeData/courses';
2424

25-
import AppWrapper from 'containers/WidgetContainers/AppWrapper';
25+
import AppWrapper from 'containers/AppWrapper';
2626
import LearnerDashboardHeader from 'containers/LearnerDashboardHeader';
2727

2828
import { getConfig } from '@edx/frontend-platform';

src/App.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jest.mock('@edx/frontend-component-footer', () => ({
1313
}));
1414
jest.mock('containers/Dashboard', () => jest.fn(() => <div>Dashboard</div>));
1515
jest.mock('containers/LearnerDashboardHeader', () => jest.fn(() => <div>LearnerDashboardHeader</div>));
16-
jest.mock('containers/WidgetContainers/AppWrapper', () => jest.fn(({ children }) => <div className="AppWrapper">{children}</div>));
16+
jest.mock('containers/AppWrapper', () => jest.fn(({ children }) => <div className="AppWrapper">{children}</div>));
1717
jest.mock('data/redux', () => ({
1818
selectors: 'redux.selectors',
1919
actions: 'redux.actions',

src/plugin-slots/WidgetSidebarSlot/index.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import React from 'react';
22

33
import { PluginSlot } from '@openedx/frontend-plugin-framework';
4-
import LookingForChallengeWidget from 'widgets/LookingForChallengeWidget';
4+
import LookingForChallengeWidget from 'plugins/LookingForChallengeWidget';
55

66
// eslint-disable-next-line arrow-body-style
77
export const WidgetSidebarSlot = () => (

0 commit comments

Comments
 (0)