Skip to content

Commit cb1de82

Browse files
feat: standardize slot ids (#608)
1 parent 2337843 commit cb1de82

File tree

12 files changed

+48
-19
lines changed

12 files changed

+48
-19
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
"@fortawesome/free-brands-svg-icons": "^5.15.4",
4141
"@fortawesome/free-solid-svg-icons": "^5.15.4",
4242
"@fortawesome/react-fontawesome": "^0.2.0",
43-
"@openedx/frontend-plugin-framework": "^1.6.0",
43+
"@openedx/frontend-plugin-framework": "^1.7.0",
4444
"@openedx/frontend-slot-footer": "^1.0.2",
4545
"@openedx/paragon": "^22.16.0",
4646
"@redux-devtools/extension": "3.3.0",

src/plugin-slots/CourseCardActionSlot/README.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
# Course Card Action Slot
22

3-
### Slot ID: `course_card_action_slot`
3+
### Slot ID: `org.openedx.frontend.learner_dashboard.course_card_action.v1`
4+
5+
### Slot ID Aliases
6+
* `course_card_action_slot`
7+
48
### Props:
59
* `cardId`
610

@@ -20,7 +24,7 @@ import ActionButton from 'containers/CourseCard/components/CourseCardActions/Act
2024

2125
const config = {
2226
pluginSlots: {
23-
course_card_action_slot: {
27+
'org.openedx.frontend.learner_dashboard.course_card_action.v1': {
2428
keepDefault: false,
2529
plugins: [
2630
{

src/plugin-slots/CourseCardActionSlot/index.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework';
44

55
const CourseCardActionSlot = ({ cardId }) => (
66
<PluginSlot
7-
id="course_card_action_slot"
7+
id="org.openedx.frontend.learner_dashboard.course_card_action.v1"
8+
idAliases={['course_card_action_slot']}
89
pluginProps={{
910
cardId,
1011
}}

src/plugin-slots/CourseListSlot/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Course List Slot
22

3-
### Slot ID: `course_list_slot`
3+
### Slot ID: `org.openedx.frontend.learner_dashboard.course_list.v1`
4+
5+
### Slot ID Aliases
6+
* `course_list_slot`
47

58
## Plugin Props
69

@@ -25,7 +28,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
2528

2629
const config = {
2730
pluginSlots: {
28-
course_list_slot: {
31+
'org.openedx.frontend.learner_dashboard.course_list.v1': {
2932
// Hide the default CourseList component
3033
keepDefault: false,
3134
plugins: [

src/plugin-slots/CourseListSlot/index.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework';
44
import { CourseList, courseListDataShape } from 'containers/CoursesPanel/CourseList';
55

66
export const CourseListSlot = ({ courseListData }) => (
7-
<PluginSlot id="course_list_slot" pluginProps={{ courseListData }}>
7+
<PluginSlot
8+
id="org.openedx.frontend.learner_dashboard.course_list.v1"
9+
idAliases={['course_list_slot']}
10+
pluginProps={{ courseListData }}
11+
>
812
<CourseList courseListData={courseListData} />
913
</PluginSlot>
1014
);

src/plugin-slots/NoCoursesViewSlot/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# No Courses View Slot
22

3-
### Slot ID: `no_courses_view_slot`
3+
### Slot ID: `org.openedx.frontend.learner_dashboard.no_courses_view.v1`
4+
5+
### Slot ID Aliases
6+
* `no_courses_view_slot`
47

58
## Description
69

@@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
2124

2225
const config = {
2326
pluginSlots: {
24-
no_courses_view_slot: {
27+
'org.openedx.frontend.learner_dashboard.no_courses_view.v1': {
2528
// Hide the default NoCoursesView component
2629
keepDefault: false,
2730
plugins: [

src/plugin-slots/NoCoursesViewSlot/index.jsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework';
44
import NoCoursesView from 'containers/CoursesPanel/NoCoursesView';
55

66
export const NoCoursesViewSlot = () => (
7-
<PluginSlot id="no_courses_view_slot">
7+
<PluginSlot
8+
id="org.openedx.frontend.learner_dashboard.no_courses_view.v1"
9+
idAliases={['no_courses_view_slot']}
10+
>
811
<NoCoursesView />
912
</PluginSlot>
1013
);

src/plugin-slots/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# `frontend-app-learner-dashboard` Plugin Slots
22

3-
* [`course_card_action_slot`](./CourseCardActionSlot/)
3+
* [`org.openedx.frontend.learner_dashboard.course_card_action.v1`](./CourseCardActionSlot/)
44
* [`footer_slot`](./FooterSlot/)
5-
* [`widget_sidebar_slot`](./WidgetSidebarSlot/)
6-
* [`course_list_slot`](./CourseListSlot/)
7-
* [`no_courses_view_slot`](./NoCoursesViewSlot/)
5+
* [`org.openedx.frontend.learner_dashboard.widget_sidebar.v1`](./WidgetSidebarSlot/)
6+
* [`org.openedx.frontend.learner_dashboard.course_list.v1`](./CourseListSlot/)
7+
* [`org.openedx.frontend.learner_dashboard.no_courses_view.v1`](./NoCoursesViewSlot/)
88
* [`org.openedx.frontend.learner_dashboard.dashboard_modal.v1`](./DashboardModalSlot)

src/plugin-slots/WidgetSidebarSlot/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# Widget Sidebar Slot
22

3-
### Slot ID: `widget_sidebar_slot`
3+
### Slot ID: `org.openedx.frontend.learner_dashboard.widget_sidebar.v1`
4+
5+
### Slot ID Aliases
6+
* `widget_sidebar_slot`
47

58
## Description
69

@@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame
2124

2225
const config = {
2326
pluginSlots: {
24-
widget_sidebar_slot: {
27+
'org.openedx.frontend.learner_dashboard.widget_sidebar.v1': {
2528
// Hide the default LookingForChallenge component
2629
keepDefault: false,
2730
plugins: [

0 commit comments

Comments
 (0)