@@ -97,12 +97,12 @@ useEffect(() => {
9797 const fetchArchivedCourses = async () => {
9898 const client = getAuthenticatedHttpClient ();
9999 const lmsBaseUrl = getConfig ().LMS_BASE_URL ;
100-
100+
101101 const response = await client .get (
102102 ` ${ lmsBaseUrl} /sample-plugin/api/v1/course-archive-status/` ,
103103 { params: { is_archived: true } }
104104 );
105-
105+
106106 const archivedCourseIds = new Set (
107107 response .data .results .map ((item ) => item .course_id )
108108 );
@@ -153,15 +153,15 @@ const [loadingStates, setLoadingStates] = useState(new Map());
153153
154154const handleArchiveToggle = async (courseId , isCurrentlyArchived ) => {
155155 setLoadingStates ((prev ) => new Map (prev).set (courseId, true ));
156-
156+
157157 try {
158158 // API calls to backend
159159 if (isCurrentlyArchived) {
160160 // Unarchive logic
161161 } else {
162162 // Archive logic
163163 }
164-
164+
165165 // Update local state
166166 setArchivedCourses ((prev ) => {
167167 const newSet = new Set (prev);
@@ -195,7 +195,7 @@ const handleArchiveToggle = async (courseId, isCurrentlyArchived) => {
195195
196196``` javascript
197197import { DIRECT_PLUGIN , PLUGIN_OPERATIONS } from ' @openedx/frontend-plugin-framework' ;
198- import { CourseList } from ' @feanil /sample-plugin' ;
198+ import { CourseList } from ' @openedx /sample-plugin' ;
199199
200200const config = {
201201 pluginSlots: {
@@ -232,7 +232,7 @@ const config = {
232232Each slot provides specific props. For CourseListSlot:
233233
234234``` jsx
235- const CourseList = ({
235+ const CourseList = ({
236236 courseListData, // Course data from platform
237237 // Other props depend on the slot
238238}) => {
@@ -277,7 +277,7 @@ try {
277277 data: error .response ? .data ,
278278 message: error .message ,
279279 });
280-
280+
281281 // User feedback
282282 // Consider using toast notifications or error states
283283}
@@ -323,7 +323,7 @@ Create `env.config.jsx` in your MFE root (not committed to repo):
323323
324324``` javascript
325325import { DIRECT_PLUGIN , PLUGIN_OPERATIONS } from ' @openedx/frontend-plugin-framework' ;
326- import { CourseList } from ' @feanil /sample-plugin' ;
326+ import { CourseList } from ' @openedx /sample-plugin' ;
327327
328328const config = {
329329 pluginSlots: {
@@ -355,7 +355,7 @@ Create `module.config.js` for local development:
355355module .exports = {
356356 localModules: [
357357 {
358- moduleName: ' @feanil /sample-plugin' ,
358+ moduleName: ' @openedx /sample-plugin' ,
359359 dir: ' /path/to/sample-plugin/frontend'
360360 },
361361 ],
@@ -398,9 +398,9 @@ describe('CourseList Plugin', () => {
398398 const mockCourseData = {
399399 visibleList: [/* mock course data */ ]
400400 };
401-
401+
402402 render (< CourseList courseListData= {mockCourseData} / > );
403-
403+
404404 expect (screen .getByText (' Archive' )).toBeInTheDocument ();
405405 });
406406});
@@ -448,7 +448,7 @@ PLUGIN_SLOTS.add_items([
448448
449449** API Performance** :
450450- Implement proper caching strategies
451- - Use pagination for large datasets
451+ - Use pagination for large datasets
452452- Optimize backend API response times
453453
454454** User Experience** :
@@ -530,7 +530,7 @@ const CourseList = ({ courseListData }) => (
530530 {courses .map (course => (
531531 < Card key= {course .id }>
532532 {/* Course info */ }
533- < ArchiveButton
533+ < ArchiveButton
534534 courseId= {course .id }
535535 isArchived= {isArchived (course .id )}
536536 onToggle= {handleArchiveToggle}
@@ -547,7 +547,7 @@ const CourseList = ({ courseListData }) => (
547547
548548** Plugin Not Loading** :
549549- Check ` env.config.jsx ` slot name matches target slot
550- - Verify plugin is installed (` npm list @feanil /sample-plugin ` )
550+ - Verify plugin is installed (` npm list @openedx /sample-plugin ` )
551551- Ensure MFE supports the plugin framework version
552552- Check browser console for JavaScript errors
553553
@@ -600,4 +600,4 @@ console.log("DEBUG: Archive states:", Array.from(archivedCourses));
6006003 . ** Community** : [ Open edX Slack #frontend-platform channel] ( https://openedx.org/slack )
6016014 . ** Issues** : Report bugs in relevant MFE repositories or this sample repository
602602
603- This frontend plugin demonstrates the power and flexibility of the Open edX Frontend Plugin Framework. By following these patterns, you can create rich customizations that integrate seamlessly with the Open edX ecosystem.
603+ This frontend plugin demonstrates the power and flexibility of the Open edX Frontend Plugin Framework. By following these patterns, you can create rich customizations that integrate seamlessly with the Open edX ecosystem.
0 commit comments