From ff6a5d99d6db0003ab7ffcb3038de5365b555306 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chris=20Ch=C3=A1vez?= Date: Thu, 18 May 2023 08:55:33 -0500 Subject: [PATCH] [FAL-3383] Implement new video UX flow on new video editor (#498) * feat: Video Gallery URL updated to match to the new flow needs * chore: Video Gallery Url updated and blockId added --- src/CourseAuthoringRoutes.jsx | 8 +++---- src/CourseAuthoringRoutes.test.jsx | 2 +- src/selectors/VideoSelectorContainer.jsx | 21 ++++++++++++------- .../VideoSelectorContainer.test.jsx.snap | 1 + 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/CourseAuthoringRoutes.jsx b/src/CourseAuthoringRoutes.jsx index 33441abd9..916bd7567 100644 --- a/src/CourseAuthoringRoutes.jsx +++ b/src/CourseAuthoringRoutes.jsx @@ -35,18 +35,18 @@ const CourseAuthoringRoutes = ({ courseId }) => { - + {process.env.ENABLE_NEW_EDITOR_PAGES === 'true' && ( - )} - + {process.env.ENABLE_NEW_EDITOR_PAGES === 'true' && ( - )} diff --git a/src/CourseAuthoringRoutes.test.jsx b/src/CourseAuthoringRoutes.test.jsx index 471322b1c..e8b214d2b 100644 --- a/src/CourseAuthoringRoutes.test.jsx +++ b/src/CourseAuthoringRoutes.test.jsx @@ -106,7 +106,7 @@ describe('', () => { it('renders the VideoSelectorContainer component when the course videos route is active', () => { render( - + , diff --git a/src/selectors/VideoSelectorContainer.jsx b/src/selectors/VideoSelectorContainer.jsx index 1b3d0aedb..24ecd4116 100644 --- a/src/selectors/VideoSelectorContainer.jsx +++ b/src/selectors/VideoSelectorContainer.jsx @@ -1,19 +1,24 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { useParams } from 'react-router'; import { VideoSelectorPage } from '@edx/frontend-lib-content-components'; import { getConfig } from '@edx/frontend-platform'; const VideoSelectorContainer = ({ courseId, -}) => ( -
- -
+}) => { + const { blockId } = useParams(); + return ( +
+ +
); +}; VideoSelectorContainer.propTypes = { courseId: PropTypes.string.isRequired, diff --git a/src/selectors/__snapshots__/VideoSelectorContainer.test.jsx.snap b/src/selectors/__snapshots__/VideoSelectorContainer.test.jsx.snap index 16c968b4c..a05e8349d 100644 --- a/src/selectors/__snapshots__/VideoSelectorContainer.test.jsx.snap +++ b/src/selectors/__snapshots__/VideoSelectorContainer.test.jsx.snap @@ -5,6 +5,7 @@ exports[`Video Selector Container snapshots rendering correctly with expected In className="selector-page" >