diff --git a/.env b/.env index cce0b78ef..c33fe8af1 100644 --- a/.env +++ b/.env @@ -27,6 +27,19 @@ USER_INFO_COOKIE_NAME='' ENABLE_PROGRESS_GRAPH_SETTINGS=false ENABLE_TEAM_TYPE_SETTING=false ENABLE_NEW_EDITOR_PAGES=true +ENABLE_NEW_HOME_PAGE = false +ENABLE_NEW_COURSE_OUTLINE_PAGE = false +ENABLE_NEW_UPDATES_PAGE = false +ENABLE_NEW_FILES_UPLOADS_PAGE = false +ENABLE_NEW_VIDEO_UPLOAD_PAGE = false +ENABLE_NEW_SCHEDULE_DETAILS_PAGE = false +ENABLE_NEW_GRADING_PAGE = false +ENABLE_NEW_COURSE_TEAM_PAGE = false +ENABLE_NEW_ADVANCED_SETTINGS_PAGE = false +ENABLE_NEW_IMPORT_PAGE = false +ENABLE_NEW_EXPORT_PAGE = false +ENABLE_UNIT_PAGE = false +ENABLE_NEW_CUSTOM_PAGES = false BBB_LEARN_MORE_URL='' HOTJAR_APP_ID='' HOTJAR_VERSION=6 diff --git a/.env.development b/.env.development index 82a140c35..19a2b78cd 100644 --- a/.env.development +++ b/.env.development @@ -29,6 +29,19 @@ USER_INFO_COOKIE_NAME='edx-user-info' ENABLE_PROGRESS_GRAPH_SETTINGS=false ENABLE_TEAM_TYPE_SETTING=false ENABLE_NEW_EDITOR_PAGES=true +ENABLE_NEW_HOME_PAGE = false +ENABLE_NEW_COURSE_OUTLINE_PAGE = false +ENABLE_NEW_UPDATES_PAGE = false +ENABLE_NEW_FILES_UPLOADS_PAGE = false +ENABLE_NEW_VIDEO_UPLOAD_PAGE = false +ENABLE_NEW_SCHEDULE_DETAILS_PAGE = false +ENABLE_NEW_GRADING_PAGE = false +ENABLE_NEW_COURSE_TEAM_PAGE = false +ENABLE_NEW_ADVANCED_SETTINGS_PAGE = false +ENABLE_NEW_IMPORT_PAGE = false +ENABLE_NEW_EXPORT_PAGE = false +ENABLE_UNIT_PAGE = false +ENABLE_NEW_CUSTOM_PAGES = false BBB_LEARN_MORE_URL='' HOTJAR_APP_ID='' HOTJAR_VERSION=6 diff --git a/.env.test b/.env.test index cef8e39e4..b778ac52f 100644 --- a/.env.test +++ b/.env.test @@ -28,4 +28,17 @@ USER_INFO_COOKIE_NAME='edx-user-info' ENABLE_PROGRESS_GRAPH_SETTINGS=false ENABLE_TEAM_TYPE_SETTING=false ENABLE_NEW_EDITOR_PAGES=true +ENABLE_NEW_HOME_PAGE = false +ENABLE_NEW_COURSE_OUTLINE_PAGE = true +ENABLE_NEW_UPDATES_PAGE = true +ENABLE_NEW_FILES_UPLOADS_PAGE = true +ENABLE_NEW_VIDEO_UPLOAD_PAGE = true +ENABLE_NEW_SCHEDULE_DETAILS_PAGE = true +ENABLE_NEW_GRADING_PAGE = true +ENABLE_NEW_COURSE_TEAM_PAGE = true +ENABLE_NEW_ADVANCED_SETTINGS_PAGE = true +ENABLE_NEW_IMPORT_PAGE = true +ENABLE_NEW_EXPORT_PAGE = true +ENABLE_UNIT_PAGE = true +ENABLE_NEW_CUSTOM_PAGES = true BBB_LEARN_MORE_URL='' diff --git a/src/CourseAuthoringRoutes.jsx b/src/CourseAuthoringRoutes.jsx index 916bd7567..f40c8da0d 100644 --- a/src/CourseAuthoringRoutes.jsx +++ b/src/CourseAuthoringRoutes.jsx @@ -2,6 +2,7 @@ import React from 'react'; import PropTypes from 'prop-types'; import { Switch, useRouteMatch } from 'react-router'; import { PageRoute } from '@edx/frontend-platform/react'; +import Placeholder from '@edx/frontend-lib-content-components'; import CourseAuthoringPage from './CourseAuthoringPage'; import { PagesAndResources } from './pages-and-resources'; import ProctoredExamSettings from './proctored-exam-settings/ProctoredExamSettings'; @@ -29,12 +30,48 @@ const CourseAuthoringRoutes = ({ courseId }) => { return ( + + {process.env.ENABLE_NEW_COURSE_OUTLINE_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_UPDATES_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_FILES_UPLOADS_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_VIDEO_UPLOAD_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_CUSTOM_PAGES === 'true' + && ( + + )} + + + {process.env.ENABLE_UNIT_PAGE === 'true' + && ( + + )} + {process.env.ENABLE_NEW_EDITOR_PAGES === 'true' && ( @@ -51,6 +88,42 @@ const CourseAuthoringRoutes = ({ courseId }) => { /> )} + + {process.env.ENABLE_NEW_SCHEDULE_DETAILS_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_GRADING_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_COURSE_TEAM_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_ADVANCED_SETTINGS_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_IMPORT_PAGE === 'true' + && ( + + )} + + + {process.env.ENABLE_NEW_EXPORT_PAGE === 'true' + && ( + + )} + ); diff --git a/src/index.jsx b/src/index.jsx index 7723901f6..6746a9fa2 100755 --- a/src/index.jsx +++ b/src/index.jsx @@ -11,6 +11,7 @@ import { Route, Switch } from 'react-router-dom'; import { initializeHotjar } from '@edx/frontend-enterprise-hotjar'; import { logError } from '@edx/frontend-platform/logging'; +import Placeholder from '@edx/frontend-lib-content-components'; import messages from './i18n'; import initializeStore from './store'; @@ -37,6 +38,12 @@ const App = () => { + + {process.env.ENABLE_NEW_HOME_PAGE === 'true' + && ( + + )} + { diff --git a/src/studio-header/Header.jsx b/src/studio-header/Header.jsx index 607a75e86..348f0b214 100644 --- a/src/studio-header/Header.jsx +++ b/src/studio-header/Header.jsx @@ -27,6 +27,16 @@ const Header = ({ }) => { const { authenticatedUser, config } = useContext(AppContext); + const getPagePath = (isMfePageEnabled, urlParameter) => { + if (isMfePageEnabled === 'true') { + if (urlParameter === 'tabs') { + return `/course/${courseId}/pages-and-resources`; + } + return `/course/${courseId}/${urlParameter}`; + } + return `${config.STUDIO_BASE_URL}/${urlParameter}/${courseId}`; + }; + const mainMenu = [ { type: 'submenu', @@ -34,22 +44,22 @@ const Header = ({ submenuContent: ( <>
- {intl.formatMessage(messages['header.links.outline'])} + {intl.formatMessage(messages['header.links.outline'])}
- {intl.formatMessage(messages['header.links.updates'])} + {intl.formatMessage(messages['header.links.updates'])}
- {intl.formatMessage(messages['header.links.pages'])} + {intl.formatMessage(messages['header.links.pages'])}
- {intl.formatMessage(messages['header.links.filesAndUploads'])} + {intl.formatMessage(messages['header.links.filesAndUploads'])}
{intl.formatMessage(messages['header.links.textbooks'])}
- {intl.formatMessage(messages['header.links.videoUploads'])} + {intl.formatMessage(messages['header.links.videoUploads'])}
), @@ -60,19 +70,19 @@ const Header = ({ submenuContent: ( <>
- {intl.formatMessage(messages['header.links.scheduleAndDetails'])} + {intl.formatMessage(messages['header.links.scheduleAndDetails'])}
- {intl.formatMessage(messages['header.links.grading'])} + {intl.formatMessage(messages['header.links.grading'])}
- {intl.formatMessage(messages['header.links.courseTeam'])} + {intl.formatMessage(messages['header.links.courseTeam'])}
{intl.formatMessage(messages['header.links.groupConfigurations'])}
- {intl.formatMessage(messages['header.links.advancedSettings'])} + {intl.formatMessage(messages['header.links.advancedSettings'])}
{intl.formatMessage(messages['header.links.certificates'])} @@ -86,10 +96,10 @@ const Header = ({ submenuContent: ( <>
- {intl.formatMessage(messages['header.links.import'])} + {intl.formatMessage(messages['header.links.import'])}
- {intl.formatMessage(messages['header.links.export'])} + {intl.formatMessage(messages['header.links.export'])}
{intl.formatMessage(messages['header.links.checklists'])} @@ -143,7 +153,7 @@ const Header = ({ > {courseOrg} {courseNumber} @@ -156,7 +166,7 @@ const Header = ({ logo: config.LOGO_URL, logoAltText: 'Studio edX', siteName: 'edX', - logoDestination: config.STUDIO_BASE_URL, + logoDestination: process.env.ENABLE_NEW_HOME_PAGE === 'true' ? '/home' : config.STUDIO_BASE_URL, courseLockUp, courseId, username: authenticatedUser !== null ? authenticatedUser.username : null,