diff --git a/package-lock.json b/package-lock.json index 0cb11bbc25..619ccdcfb1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23,7 +23,7 @@ "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "^0.1.4", "@openedx/frontend-build": "^14.5.0", - "@openedx/frontend-plugin-framework": "^1.6.0", + "@openedx/frontend-plugin-framework": "^1.7.0", "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.16.0", "@popperjs/core": "2.11.8", diff --git a/package.json b/package.json index 2adaba4a41..01320f946c 100644 --- a/package.json +++ b/package.json @@ -46,7 +46,7 @@ "@fortawesome/free-solid-svg-icons": "5.15.4", "@fortawesome/react-fontawesome": "^0.1.4", "@openedx/frontend-build": "^14.5.0", - "@openedx/frontend-plugin-framework": "^1.6.0", + "@openedx/frontend-plugin-framework": "^1.7.0", "@openedx/frontend-slot-footer": "^1.0.2", "@openedx/paragon": "^22.16.0", "@popperjs/core": "2.11.8", diff --git a/src/course-home/outline-tab/OutlineTab.jsx b/src/course-home/outline-tab/OutlineTab.jsx index 35f28e6047..db33f55fc5 100644 --- a/src/course-home/outline-tab/OutlineTab.jsx +++ b/src/course-home/outline-tab/OutlineTab.jsx @@ -5,7 +5,7 @@ import { sendTrackEvent } from '@edx/frontend-platform/analytics'; import { getAuthenticatedUser } from '@edx/frontend-platform/auth'; import { useIntl } from '@edx/frontend-platform/i18n'; import { Button } from '@openedx/paragon'; -import { PluginSlot } from '@openedx/frontend-plugin-framework'; +import { CourseOutlineTabNotificationsSlot } from '../../plugin-slots/CourseOutlineTabNotificationsSlot'; import { AlertList } from '../../generic/user-messages'; import CourseDates from './widgets/CourseDates'; @@ -181,13 +181,7 @@ const OutlineTab = () => { /> )} - + diff --git a/src/course-home/outline-tab/OutlineTab.test.jsx b/src/course-home/outline-tab/OutlineTab.test.jsx index 8a95e66ae7..39852568b7 100644 --- a/src/course-home/outline-tab/OutlineTab.test.jsx +++ b/src/course-home/outline-tab/OutlineTab.test.jsx @@ -139,7 +139,7 @@ describe('Outline Tab', () => { }); await fetchAndRender(); - expect(screen.getByTestId('outline_tab_notifications_slot')).toBeInTheDocument(); + expect(screen.getByTestId('org.openedx.frontend.learning.course_outline_tab_notifications.v1')).toBeInTheDocument(); }); it('handles expand/collapse all button click', async () => { diff --git a/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.test.tsx b/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.test.tsx index ce89c30a4b..70205f65f9 100644 --- a/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.test.tsx +++ b/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.test.tsx @@ -90,7 +90,7 @@ describe('NotificationsWidget', () => { , ); - expect(screen.getByTestId('notification_widget_slot')).toBeInTheDocument(); + expect(screen.getByTestId('org.openedx.frontend.learning.notification_widget.v1')).toBeInTheDocument(); }); it('renders no notifications bar if no verified mode', async () => { diff --git a/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.tsx b/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.tsx index 50644782c6..a9ade46d85 100644 --- a/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.tsx +++ b/src/courseware/course/new-sidebar/sidebars/discussions-notifications/notifications/NotificationsWidget.tsx @@ -1,10 +1,10 @@ import React, { useContext, useEffect, useMemo } from 'react'; import { sendTrackEvent } from '@edx/frontend-platform/analytics'; -import { PluginSlot } from '@openedx/frontend-plugin-framework'; import { useModel } from '../../../../../../generic/model-store'; import { WIDGETS } from '../../../../../../constants'; import SidebarContext from '../../../SidebarContext'; +import { NotificationWidgetSlot } from '../../../../../../plugin-slots/NotificationWidgetSlot'; const NotificationsWidget = () => { const { @@ -67,15 +67,11 @@ const NotificationsWidget = () => { return (
-
); diff --git a/src/courseware/course/sequence/Unit/ContentIFrame.jsx b/src/courseware/course/sequence/Unit/ContentIFrame.jsx index 725d71c2a2..9767b4177e 100644 --- a/src/courseware/course/sequence/Unit/ContentIFrame.jsx +++ b/src/courseware/course/sequence/Unit/ContentIFrame.jsx @@ -4,9 +4,8 @@ import React from 'react'; import { ErrorPage } from '@edx/frontend-platform/react'; import { StrictDict } from '@edx/react-unit-test-utils'; import { ModalDialog, Modal } from '@openedx/paragon'; -import { PluginSlot } from '@openedx/frontend-plugin-framework'; +import { ContentIFrameLoaderSlot } from '../../../../plugin-slots/ContentIFrameLoaderSlot'; -import PageLoading from '@src/generic/PageLoading'; import * as hooks from './hooks'; /** @@ -84,17 +83,7 @@ const ContentIFrame = ({ return ( <> {(shouldShowContent && !hasLoaded) && ( - showError ? : ( - , - courseId, - }} - > - - - ) + showError ? : )} {shouldShowContent && (
diff --git a/src/courseware/course/sequence/Unit/ContentIFrame.test.jsx b/src/courseware/course/sequence/Unit/ContentIFrame.test.jsx index bc2443a464..610d771e09 100644 --- a/src/courseware/course/sequence/Unit/ContentIFrame.test.jsx +++ b/src/courseware/course/sequence/Unit/ContentIFrame.test.jsx @@ -6,6 +6,7 @@ import { shallow } from '@edx/react-unit-test-utils'; import PageLoading from '@src/generic/PageLoading'; +import { ContentIFrameLoaderSlot } from '@src/plugin-slots/ContentIFrameLoaderSlot'; import * as hooks from './hooks'; import ContentIFrame, { IFRAME_FEATURE_POLICY, testIDs } from './ContentIFrame'; @@ -99,8 +100,8 @@ describe('ContentIFrame Component', () => { }); it('displays PageLoading component if not showError', () => { el = shallow(); - [component] = el.instance.findByType(PageLoading); - expect(component.props.srMessage).toEqual(props.loadingMessage); + [component] = el.instance.findByType(ContentIFrameLoaderSlot); + expect(component.props.loadingMessage).toEqual(props.loadingMessage); }); }); describe('hasLoaded', () => { diff --git a/src/courseware/course/sequence/Unit/UnitSuspense.jsx b/src/courseware/course/sequence/Unit/UnitSuspense.jsx index 09843a7164..63203ef7b3 100644 --- a/src/courseware/course/sequence/Unit/UnitSuspense.jsx +++ b/src/courseware/course/sequence/Unit/UnitSuspense.jsx @@ -2,14 +2,13 @@ import React, { Suspense } from 'react'; import PropTypes from 'prop-types'; import { useIntl } from '@edx/frontend-platform/i18n'; -import { PluginSlot } from '@openedx/frontend-plugin-framework'; import { useModel } from '@src/generic/model-store'; import PageLoading from '@src/generic/PageLoading'; +import { GatedUnitContentMessageSlot } from '../../../../plugin-slots/GatedUnitContentMessageSlot'; import messages from '../messages'; import HonorCode from '../honor-code'; -import LockPaywall from '../lock-paywall'; import * as hooks from './hooks'; import { modelKeys } from './constants'; @@ -29,14 +28,7 @@ const UnitSuspense = ({ <> {shouldDisplayContentGating && ( }> - - - + )} {shouldDisplayHonorCode && ( diff --git a/src/courseware/course/sequence/Unit/UnitSuspense.test.jsx b/src/courseware/course/sequence/Unit/UnitSuspense.test.jsx index f47ee6b241..db829eaa46 100644 --- a/src/courseware/course/sequence/Unit/UnitSuspense.test.jsx +++ b/src/courseware/course/sequence/Unit/UnitSuspense.test.jsx @@ -5,6 +5,7 @@ import { formatMessage, shallow } from '@edx/react-unit-test-utils'; import { useModel } from '@src/generic/model-store'; import PageLoading from '@src/generic/PageLoading'; +import { GatedUnitContentMessageSlot } from '@src/plugin-slots/GatedUnitContentMessageSlot'; import messages from '../messages'; import HonorCode from '../honor-code'; import LockPaywall from '../lock-paywall'; @@ -78,10 +79,9 @@ describe('UnitSuspense component', () => { beforeEach(() => { mockModels(true, true); }); it('displays LockPaywall in Suspense wrapper with PageLoading fallback', () => { el = shallow(); - const [component] = el.instance.findByType(LockPaywall); - expect(component.parent.type).toEqual('PluginSlot'); - expect(component.parent.parent.type).toEqual('Suspense'); - expect(component.parent.parent.props.fallback) + const [component] = el.instance.findByType(GatedUnitContentMessageSlot); + expect(component.parent.type).toEqual('Suspense'); + expect(component.parent.props.fallback) .toEqual(); expect(component.props.courseId).toEqual(props.courseId); }); diff --git a/src/courseware/course/sequence/Unit/index.test.jsx b/src/courseware/course/sequence/Unit/index.test.jsx index db21d9c7b0..0e3a0ff6f9 100644 --- a/src/courseware/course/sequence/Unit/index.test.jsx +++ b/src/courseware/course/sequence/Unit/index.test.jsx @@ -57,7 +57,7 @@ describe('', () => { describe('unit title', () => { it('has two children', () => { renderComponent(defaultProps); - const unitTitleWrapper = screen.getByTestId('unit_title_slot').children[0]; + const unitTitleWrapper = screen.getByTestId('org.openedx.frontend.learning.unit_title.v1').children[0]; expect(unitTitleWrapper.children).toHaveLength(3); }); diff --git a/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.jsx b/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.jsx index 5b4f0ec590..deb7577c07 100644 --- a/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.jsx +++ b/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.jsx @@ -2,9 +2,9 @@ import { useIntl } from '@edx/frontend-platform/i18n'; import classNames from 'classnames'; import { useContext, useEffect, useMemo } from 'react'; import { sendTrackEvent } from '@edx/frontend-platform/analytics'; -import { PluginSlot } from '@openedx/frontend-plugin-framework'; import { getAuthenticatedUser } from '@edx/frontend-platform/auth'; import { useModel } from '@src/generic/model-store'; +import { NotificationTraySlot } from '../../../../../plugin-slots/NotificationTraySlot'; import messages from '../../../messages'; import SidebarBase from '../../common/SidebarBase'; @@ -76,14 +76,10 @@ const NotificationTray = () => { >
{verifiedMode ? ( - ) : (

{intl.formatMessage(messages.noNotificationsMessage)}

diff --git a/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.test.jsx b/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.test.jsx index 269a35f7a0..309747242f 100644 --- a/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.test.jsx +++ b/src/courseware/course/sidebar/sidebars/notifications/NotificationTray.test.jsx @@ -91,7 +91,7 @@ describe('NotificationTray', () => { , ); - expect(screen.getByTestId('notification_tray_slot')).toBeInTheDocument(); + expect(screen.getByTestId('org.openedx.frontend.learning.notification_tray.v1')).toBeInTheDocument(); }); it('renders no notifications message if no verified mode', async () => { diff --git a/src/plugin-slots/ContentIFrameLoaderSlot/README.md b/src/plugin-slots/ContentIFrameLoaderSlot/README.md new file mode 100644 index 0000000000..9ee49e5d27 --- /dev/null +++ b/src/plugin-slots/ContentIFrameLoaderSlot/README.md @@ -0,0 +1,10 @@ +# Content iframe Loader Slot + +### Slot ID: `org.openedx.frontend.learning.content_iframe_loader.v1` + +### Slot ID Aliases +* `content_iframe_loader_slot` + +### Props: +* `courseId` +* `defaultLoaderComponent` diff --git a/src/plugin-slots/ContentIFrameLoaderSlot/index.tsx b/src/plugin-slots/ContentIFrameLoaderSlot/index.tsx new file mode 100644 index 0000000000..d13909fac9 --- /dev/null +++ b/src/plugin-slots/ContentIFrameLoaderSlot/index.tsx @@ -0,0 +1,25 @@ +import React, { ReactNode } from 'react'; + +import { PluginSlot } from '@openedx/frontend-plugin-framework'; +import PageLoading from '../../generic/PageLoading'; + +export const ContentIFrameLoaderSlot = ({ + courseId, + loadingMessage, +} : ContentIFrameLoaderSlotProps) => ( + , + courseId, + }} + > + + +); + +interface ContentIFrameLoaderSlotProps { + courseId: string; + loadingMessage: ReactNode; +} diff --git a/src/plugin-slots/CourseBreadcrumbsSlot/README.md b/src/plugin-slots/CourseBreadcrumbsSlot/README.md index 38de9a0550..12863d4e08 100644 --- a/src/plugin-slots/CourseBreadcrumbsSlot/README.md +++ b/src/plugin-slots/CourseBreadcrumbsSlot/README.md @@ -1,6 +1,9 @@ # Course Breadcrumbs Slot -### Slot ID: `course_breadcrumbs_slot` +### Slot ID: `org.openedx.frontend.learning.course_breadcrumbs.v1` + +### Slot ID Aliases +* `course_breadcrumbs_slot` ## Description @@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - course_breadcrumbs_slot: { + 'org.openedx.frontend.learning.course_breadcrumbs.v1': { keepDefault: false, plugins: [ { diff --git a/src/plugin-slots/CourseBreadcrumbsSlot/index.tsx b/src/plugin-slots/CourseBreadcrumbsSlot/index.tsx index 504c4c2549..8a438968a1 100644 --- a/src/plugin-slots/CourseBreadcrumbsSlot/index.tsx +++ b/src/plugin-slots/CourseBreadcrumbsSlot/index.tsx @@ -16,7 +16,8 @@ export const CourseBreadcrumbsSlot : React.FC = ({ courseId, sectionId, sequenceId, unitId, isStaff, }) => ( = ({ expandAll, sections, sectionIds, }) => (
    diff --git a/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/README.md b/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/README.md index 317dee73b6..923e0aea34 100644 --- a/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/README.md +++ b/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/README.md @@ -1,6 +1,9 @@ # Course Outline Mobile Sidebar Trigger Slot -### Slot ID: `course_outline_mobile_sidebar_trigger_slot` +### Slot ID: `org.openedx.frontend.learning.course_outline_mobile_sidebar_trigger.v1` + +### Slot ID Aliases +* `course_outline_mobile_sidebar_trigger_slot` ## Description @@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - course_outline_mobile_sidebar_trigger_slot: { + 'org.openedx.frontend.learning.course_outline_mobile_sidebar_trigger.v1': { keepDefault: false, plugins: [ { diff --git a/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/index.tsx b/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/index.tsx index f192003b01..199c0322da 100644 --- a/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/index.tsx +++ b/src/plugin-slots/CourseOutlineMobileSidebarTriggerSlot/index.tsx @@ -6,7 +6,8 @@ import CourseOutlineTrigger from '../../courseware/course/sidebar/sidebars/cours export const CourseOutlineMobileSidebarTriggerSlot : React.FC = () => ( ( = ({ sectionId, sequenceId, unitId, isStaff, }) => ( ( + +); + +interface CourseOutlineTabNotificationsSlotProps { + courseId: string; +} diff --git a/src/plugin-slots/CourseRecommendationsSlot/README.md b/src/plugin-slots/CourseRecommendationsSlot/README.md index efaf5528cb..ca8f5e9b91 100644 --- a/src/plugin-slots/CourseRecommendationsSlot/README.md +++ b/src/plugin-slots/CourseRecommendationsSlot/README.md @@ -1,6 +1,10 @@ # Unit Title Slot -### Slot ID: `course_recommendations_slot` +### Slot ID: `org.openedx.frontend.learning.course_recommendations.v1` + +### Slot ID Aliases +* `course_recommendations_slot` + ### Props: * `variant` @@ -19,7 +23,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - course_recommendations_slot: { + 'org.openedx.frontend.learning.course_recommendations.v1': { plugins: [ { op: PLUGIN_OPERATIONS.Insert, diff --git a/src/plugin-slots/CourseRecommendationsSlot/index.jsx b/src/plugin-slots/CourseRecommendationsSlot/index.jsx index 040af6fabe..c286ba51a0 100644 --- a/src/plugin-slots/CourseRecommendationsSlot/index.jsx +++ b/src/plugin-slots/CourseRecommendationsSlot/index.jsx @@ -3,7 +3,10 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework'; import CourseRecommendations from '../../courseware/course/course-exit/CourseRecommendations'; const CourseRecommendationsSlot = ({ variant }) => ( - + ); diff --git a/src/plugin-slots/GatedUnitContentMessageSlot/README.md b/src/plugin-slots/GatedUnitContentMessageSlot/README.md new file mode 100644 index 0000000000..2083abbe50 --- /dev/null +++ b/src/plugin-slots/GatedUnitContentMessageSlot/README.md @@ -0,0 +1,9 @@ +# Gated Unit Content Message Slot + +### Slot ID: `org.openedx.frontend.learning.gated_unit_content_message.v1` + +### Slot ID Aliases +* `gated_unit_content_message_slot` + +### Props: +* `courseId` diff --git a/src/plugin-slots/GatedUnitContentMessageSlot/index.tsx b/src/plugin-slots/GatedUnitContentMessageSlot/index.tsx new file mode 100644 index 0000000000..cefdd1999e --- /dev/null +++ b/src/plugin-slots/GatedUnitContentMessageSlot/index.tsx @@ -0,0 +1,22 @@ +import React from 'react'; + +import { PluginSlot } from '@openedx/frontend-plugin-framework'; +import LockPaywall from '../../courseware/course/sequence/lock-paywall'; + +export const GatedUnitContentMessageSlot = ({ + courseId, +} : GatedUnitContentMessageSlotProps) => ( + + + +); + +interface GatedUnitContentMessageSlotProps { + courseId: string; +} diff --git a/src/plugin-slots/HeaderSlot/README.md b/src/plugin-slots/HeaderSlot/README.md index 4f49d6ca87..0a9962d5fe 100644 --- a/src/plugin-slots/HeaderSlot/README.md +++ b/src/plugin-slots/HeaderSlot/README.md @@ -1,6 +1,10 @@ # Header Slot -### Slot ID: `header_slot` +### Slot ID: `org.openedx.frontend.layout.header_learning.v1` + +### Slot ID Aliases +* `header_slot` + ### Props: * `courseOrg` * `courseNumber` @@ -22,7 +26,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - header_slot: { + 'org.openedx.frontend.layout.header_learning.v1': { keepDefault: false, plugins: [ { diff --git a/src/plugin-slots/HeaderSlot/index.jsx b/src/plugin-slots/HeaderSlot/index.jsx index 11808f2190..c696a23440 100644 --- a/src/plugin-slots/HeaderSlot/index.jsx +++ b/src/plugin-slots/HeaderSlot/index.jsx @@ -7,7 +7,8 @@ const HeaderSlot = ({ courseOrg, courseNumber, courseTitle, showUserDropdown, }) => ( = ({ isAtTop, }) => ( ( + +); + +interface NotificationTraySlotProps { + courseId: string; + notificationCurrentState: UpgradeNotificationState; + setNotificationCurrentState: React.Dispatch; +} diff --git a/src/plugin-slots/NotificationWidgetSlot/README.md b/src/plugin-slots/NotificationWidgetSlot/README.md new file mode 100644 index 0000000000..206139d5c8 --- /dev/null +++ b/src/plugin-slots/NotificationWidgetSlot/README.md @@ -0,0 +1,13 @@ +# Notification Widget Slot + +### Slot ID: `org.openedx.frontend.learning.notification_widget.v1` + +### Slot ID Aliases +* `notification_widget_slot` + +### Props: +* `courseId` +* `model` +* `notificationCurrentState` +* `setNotificationCurrentState` +* `toggleSidebar` diff --git a/src/plugin-slots/NotificationWidgetSlot/index.tsx b/src/plugin-slots/NotificationWidgetSlot/index.tsx new file mode 100644 index 0000000000..ebe5d396c9 --- /dev/null +++ b/src/plugin-slots/NotificationWidgetSlot/index.tsx @@ -0,0 +1,30 @@ +import React from 'react'; + +import { PluginSlot } from '@openedx/frontend-plugin-framework'; +import { UpgradeNotificationState } from '../../courseware/course/new-sidebar/SidebarContext'; + +export const NotificationWidgetSlot = ({ + courseId, + notificationCurrentState, + setNotificationCurrentState, + toggleSidebar, +} : NotificationWidgetSlotProps) => ( + +); + +interface NotificationWidgetSlotProps { + courseId: string; + notificationCurrentState: UpgradeNotificationState; + setNotificationCurrentState: React.Dispatch; + toggleSidebar: () => void; +} diff --git a/src/plugin-slots/NotificationsDiscussionsSidebarSlot/README.md b/src/plugin-slots/NotificationsDiscussionsSidebarSlot/README.md index 418d041426..b70c306735 100644 --- a/src/plugin-slots/NotificationsDiscussionsSidebarSlot/README.md +++ b/src/plugin-slots/NotificationsDiscussionsSidebarSlot/README.md @@ -1,6 +1,9 @@ # Notifications Discussions Sidebar Slot -### Slot ID: `notifications_discussions_sidebar_slot` +### Slot ID: `org.openedx.frontend.learning.notifications_discussions_sidebar.v1` + +### Slot ID Aliases +* `notifications_discussions_sidebar_slot` ## Description @@ -21,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - notifications_discussions_sidebar_slot: { + 'org.openedx.frontend.learning.notifications_discussions_sidebar.v1': { keepDefault: false, plugins: [ { diff --git a/src/plugin-slots/NotificationsDiscussionsSidebarSlot/index.tsx b/src/plugin-slots/NotificationsDiscussionsSidebarSlot/index.tsx index 3f7454d8c5..03a0bf4ffc 100644 --- a/src/plugin-slots/NotificationsDiscussionsSidebarSlot/index.tsx +++ b/src/plugin-slots/NotificationsDiscussionsSidebarSlot/index.tsx @@ -17,7 +17,8 @@ export const NotificationsDiscussionsSidebarSlot : React.FC = ({ courseId return ( = ({ c return ( { const config = { pluginSlots: { - progress_certificate_status_slot: { + 'org.openedx.frontend.learning.progress_certificate_status.v1': { keepDefault: true, plugins: [{ op: PLUGIN_OPERATIONS.Modify, diff --git a/src/plugin-slots/ProgressCertificateStatusSlot/index.jsx b/src/plugin-slots/ProgressCertificateStatusSlot/index.jsx index 6f7e554cb1..d2ace8387b 100644 --- a/src/plugin-slots/ProgressCertificateStatusSlot/index.jsx +++ b/src/plugin-slots/ProgressCertificateStatusSlot/index.jsx @@ -3,7 +3,8 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework'; const ProgressCertificateStatusSlot = ({ courseId, children }) => ( {children} diff --git a/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/README.md b/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/README.md index f2fe797ef3..d5464540a7 100644 --- a/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/README.md +++ b/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/README.md @@ -1,6 +1,10 @@ # Progress Tab Certificate Status Slot -### Slot ID: `progress_tab_certificate_status_main_body_slot` +### Slot ID: `org.openedx.frontend.learning.progress_tab_certificate_status_main_body.v1` + +### Slot ID Aliases +* `progress_tab_certificate_status_main_body_slot` + ### Props: ## Description @@ -20,7 +24,7 @@ import { useContextId } from './src/data/hooks'; const config = { pluginSlots: { - progress_tab_certificate_status_main_body_slot: { + 'org.openedx.frontend.learning.progress_tab_certificate_status_main_body.v1': { plugins: [ { // Insert custom content after certificate status diff --git a/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/index.jsx b/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/index.jsx index 563217fb0b..e768a93551 100644 --- a/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/index.jsx +++ b/src/plugin-slots/ProgressTabCertificateStatusMainBodySlot/index.jsx @@ -7,7 +7,8 @@ const ProgressTabCertificateStatusMainBodySlot = () => { const wideScreen = windowWidth >= breakpoints.large.minWidth; return ( {windowWidth && !wideScreen && } diff --git a/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/README.md b/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/README.md index 83f73643db..e661a03788 100644 --- a/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/README.md +++ b/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/README.md @@ -1,6 +1,10 @@ # Progress Tab Certificate Status Slot -### Slot ID: `progress_tab_certificate_status_side_panel_slot` +### Slot ID: `org.openedx.frontend.learning.progress_tab_certificate_status_side_panel.v1` + +### Slot ID Aliases +* `progress_tab_certificate_status_side_panel_slot` + ### Props: ## Description @@ -20,7 +24,7 @@ import { useContextId } from './src/data/hooks'; const config = { pluginSlots: { - progress_tab_certificate_status_side_panel_slot: { + 'org.openedx.frontend.learning.progress_tab_certificate_status_side_panel.v1': { plugins: [ { // Insert custom content after certificate status diff --git a/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/index.jsx b/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/index.jsx index e8354c9f47..7af2701f9a 100644 --- a/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/index.jsx +++ b/src/plugin-slots/ProgressTabCertificateStatusSidePanelSlot/index.jsx @@ -7,7 +7,8 @@ const ProgressTabCertificateStatusSidePanelSlot = () => { const wideScreen = windowWidth >= breakpoints.large.minWidth; return ( {windowWidth && wideScreen && } diff --git a/src/plugin-slots/ProgressTabCourseGradeSlot/README.md b/src/plugin-slots/ProgressTabCourseGradeSlot/README.md index 8c0d738132..1e5a343e32 100644 --- a/src/plugin-slots/ProgressTabCourseGradeSlot/README.md +++ b/src/plugin-slots/ProgressTabCourseGradeSlot/README.md @@ -1,6 +1,10 @@ # Progress Tab Course Grade Slot -### Slot ID: `progress_tab_course_grade_slot` +### Slot ID: `org.openedx.frontend.learning.progress_tab_course_grade.v1` + +### Slot ID Aliases +* `progress_tab_course_grade_slot` + ### Props: ## Description @@ -19,7 +23,7 @@ import { useContextId } from './src/data/hooks'; const config = { pluginSlots: { - progress_tab_course_grade_slot: { + 'org.openedx.frontend.learning.progress_tab_course_grade.v1': { plugins: [ { // Insert custom content after course grade widget diff --git a/src/plugin-slots/ProgressTabCourseGradeSlot/index.jsx b/src/plugin-slots/ProgressTabCourseGradeSlot/index.jsx index fa4bf95693..6ea96f2f59 100644 --- a/src/plugin-slots/ProgressTabCourseGradeSlot/index.jsx +++ b/src/plugin-slots/ProgressTabCourseGradeSlot/index.jsx @@ -3,7 +3,8 @@ import CourseGrade from '../../course-home/progress-tab/grades/course-grade/Cour const ProgressTabCourseGradeSlot = () => ( diff --git a/src/plugin-slots/ProgressTabGradeBreakdownSlot/README.md b/src/plugin-slots/ProgressTabGradeBreakdownSlot/README.md index 85465e69c4..06d7bc2129 100644 --- a/src/plugin-slots/ProgressTabGradeBreakdownSlot/README.md +++ b/src/plugin-slots/ProgressTabGradeBreakdownSlot/README.md @@ -1,6 +1,10 @@ # Progress Tab Grade Breakdown Slot -### Slot ID: `progress_tab_grade_breakdown_slot` +### Slot ID: `org.openedx.frontend.learning.progress_tab_grade_breakdown.v1` + +### Slot ID Aliases +* `progress_tab_grade_breakdown_slot` + ### Props: ## Description @@ -19,7 +23,7 @@ import { useContextId } from './src/data/hooks'; const config = { pluginSlots: { - progress_tab_grade_breakdown_slot: { + 'org.openedx.frontend.learning.progress_tab_grade_breakdown.v1': { plugins: [ { // Insert custom content after grade summary widget diff --git a/src/plugin-slots/ProgressTabGradeBreakdownSlot/index.jsx b/src/plugin-slots/ProgressTabGradeBreakdownSlot/index.jsx index f54f1f7cee..54fccfaffc 100644 --- a/src/plugin-slots/ProgressTabGradeBreakdownSlot/index.jsx +++ b/src/plugin-slots/ProgressTabGradeBreakdownSlot/index.jsx @@ -11,7 +11,8 @@ const ProgressTabGradeBreakdownSlot = () => { const applyLockedOverlay = gradesFeatureIsFullyLocked ? 'locked-overlay' : ''; return (
    ( diff --git a/src/plugin-slots/README.md b/src/plugin-slots/README.md index 2b404e6a9b..401b27e47b 100644 --- a/src/plugin-slots/README.md +++ b/src/plugin-slots/README.md @@ -1,11 +1,26 @@ # `frontend-app-learning` Plugin Slots -* [`header_slot`](./HeaderSlot/) * [`footer_slot`](./FooterSlot/) -* [`sequence_container_slot`](./SequenceContainerSlot/) -* [`unit_title_slot`](./UnitTitleSlot/) -* [`course_outline_sidebar_slot`](./CourseOutlineSidebarSlot/) -* [`course_outline_sidebar_trigger_slot`](./CourseOutlineSidebarTriggerSlot) -* [`course_outline_mobile_sidebar_trigger_slot`](./CourseOutlineMobileSidebarTriggerSlot/) -* [`notifications_discussions_sidebar_slot`](./NotificationsDiscussionsSidebarSlot/) -* [`notifications_discussions_sidebar_trigger_slot`](./NotificationsDiscussionsSidebarTriggerSlot/) +* [`org.openedx.frontend.layout.header_learning.v1`](./HeaderSlot/) +* [`org.openedx.frontend.learning.content_iframe_loader.v1`](./ContentIFrameLoaderSlot/) +* [`org.openedx.frontend.learning.course_breadcrumbs.v1`](./CourseBreadcrumbsSlot/) +* [`org.openedx.frontend.learning.course_home_section_outline.v1`](./CourseHomeSectionOutlineSlot/) +* [`org.openedx.frontend.learning.course_outline_mobile_sidebar_trigger.v1`](./CourseOutlineMobileSidebarTriggerSlot/) +* [`org.openedx.frontend.learning.course_outline_sidebar_trigger.v1`](./CourseOutlineSidebarTriggerSlot) +* [`org.openedx.frontend.learning.course_outline_sidebar.v1`](./CourseOutlineSidebarSlot/) +* [`org.openedx.frontend.learning.course_outline_tab_notifications.v1`](./CourseOutlineTabNotificationsSlot/) +* [`org.openedx.frontend.learning.course_recommendations.v1`](./CourseRecommendationsSlot/) +* [`org.openedx.frontend.learning.gated_unit_content_message.v1`](./GatedUnitContentMessageSlot/) +* [`org.openedx.frontend.learning.next_unit_top_nav_trigger.v1`](./NextUnitTopNavTriggerSlot/) +* [`org.openedx.frontend.learning.notification_tray.v1`](./NotificationTraySlot/) +* [`org.openedx.frontend.learning.notification_widget.v1`](./NotificationWidgetSlot/) +* [`org.openedx.frontend.learning.notifications_discussions_sidebar_trigger.v1`](./NotificationsDiscussionsSidebarTriggerSlot/) +* [`org.openedx.frontend.learning.notifications_discussions_sidebar.v1`](./NotificationsDiscussionsSidebarSlot/) +* [`org.openedx.frontend.learning.progress_certificate_status.v1`](./ProgressCertificateStatusSlot/) +* [`org.openedx.frontend.learning.progress_tab_certificate_status_main_body.v1`](./ProgressTabCertificateStatusMainBodySlot/) +* [`org.openedx.frontend.learning.progress_tab_certificate_status_side_panel.v1`](./ProgressTabCertificateStatusSidePanelSlot/) +* [`org.openedx.frontend.learning.progress_tab_course_grade.v1`](./ProgressTabCourseGradeSlot/) +* [`org.openedx.frontend.learning.progress_tab_grade_breakdown.v1`](./ProgressTabGradeBreakdownSlot/) +* [`org.openedx.frontend.learning.progress_tab_related_links.v1`](./ProgressTabRelatedLinksSlot/) +* [`org.openedx.frontend.learning.sequence_container.v1`](./SequenceContainerSlot/) +* [`org.openedx.frontend.learning.unit_title.v1`](./UnitTitleSlot/) diff --git a/src/plugin-slots/SequenceContainerSlot/README.md b/src/plugin-slots/SequenceContainerSlot/README.md index 9f96c9d62c..6c741116c2 100644 --- a/src/plugin-slots/SequenceContainerSlot/README.md +++ b/src/plugin-slots/SequenceContainerSlot/README.md @@ -1,6 +1,10 @@ # Sequence Container Slot -### Slot ID: `sequence_container_slot` +### Slot ID: `org.openedx.frontend.learning.sequence_container.v1` + +### Slot ID Aliases +* `sequence_container_slot` + ### Props: * `courseId` * `unitId` @@ -20,7 +24,7 @@ import { DIRECT_PLUGIN, PLUGIN_OPERATIONS } from '@openedx/frontend-plugin-frame const config = { pluginSlots: { - sequence_container_slot: { + 'org.openedx.frontend.learning.sequence_container.v1': { plugins: [ { // Insert custom content after sequence content diff --git a/src/plugin-slots/SequenceContainerSlot/index.jsx b/src/plugin-slots/SequenceContainerSlot/index.jsx index 37b789d977..535f4ab224 100644 --- a/src/plugin-slots/SequenceContainerSlot/index.jsx +++ b/src/plugin-slots/SequenceContainerSlot/index.jsx @@ -3,7 +3,8 @@ import { PluginSlot } from '@openedx/frontend-plugin-framework'; const SequenceContainerSlot = ({ courseId, unitId }) => (